added fs info to metadata
This commit is contained in:
		
							parent
							
								
									8541658e8e
								
							
						
					
					
						commit
						cbbe7641e9
					
				
					 6 changed files with 167 additions and 0 deletions
				
			
		
							
								
								
									
										4
									
								
								.gitignore
									
										
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										4
									
								
								.gitignore
									
										
									
									
										vendored
									
									
										Normal file
									
								
							|  | @ -0,0 +1,4 @@ | ||||||
|  | src/ | ||||||
|  | out/ | ||||||
|  | pkgs/*/src | ||||||
|  | pkgs/*/out | ||||||
|  | @ -1,2 +1,3 @@ | ||||||
| # lazybox | # lazybox | ||||||
| UNIX like software distribution with no GNU components | UNIX like software distribution with no GNU components | ||||||
|  | 
 | ||||||
|  |  | ||||||
							
								
								
									
										22
									
								
								example.build.sh
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										22
									
								
								example.build.sh
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,22 @@ | ||||||
|  | fetch() { | ||||||
|  | 	# in ./src | ||||||
|  | 	# for fetching and patching source files | ||||||
|  | } | ||||||
|  | 
 | ||||||
|  | build() { | ||||||
|  | 	# in ./src | ||||||
|  | 	# configure and build | ||||||
|  | 	./configure --prefix=/ | ||||||
|  | 	# make is bmake | ||||||
|  | 	make | ||||||
|  | } | ||||||
|  | 
 | ||||||
|  | package() { | ||||||
|  | 	# in ./src | ||||||
|  | 	# make is bmake | ||||||
|  | 	make install DESTDIR=$pkgdir | ||||||
|  | 	# samurai is the default ninja implementation | ||||||
|  | 	DESTDIR=$pkgdir samu install | ||||||
|  | 	# for rust programs we just do this | ||||||
|  | 	install -Dm755 target/release/$pkgname $pkgdir/bin | ||||||
|  | } | ||||||
							
								
								
									
										80
									
								
								lazypkg.sh
									
										
									
									
									
										Executable file
									
								
							
							
						
						
									
										80
									
								
								lazypkg.sh
									
										
									
									
									
										Executable file
									
								
							|  | @ -0,0 +1,80 @@ | ||||||
|  | #!/bin/dash | ||||||
|  | 
 | ||||||
|  | . ./build.sh | ||||||
|  | dir=$(pwd) | ||||||
|  | mkdir -p src | ||||||
|  | cd src | ||||||
|  | srcdir=$(pwd) | ||||||
|  | 
 | ||||||
|  | fetch | ||||||
|  | cd $srcdir | ||||||
|  | 
 | ||||||
|  | build | ||||||
|  | cd $srcdir | ||||||
|  | 
 | ||||||
|  | echo " | ||||||
|  | . $dir/build.sh | ||||||
|  | mkdir -p $dir/out/$pkgname | ||||||
|  | pkgdir=$dir/out/$pkgname package | ||||||
|  | 
 | ||||||
|  | 
 | ||||||
|  | mkdir -p $dir/out/$pkgname/lib/lazypkg | ||||||
|  | 
 | ||||||
|  | cat > $dir/out/$pkgname/lib/lazypkg/$pkgname << EOF | ||||||
|  | [pkg] | ||||||
|  | name=$pkgname | ||||||
|  | ver=$pkgver | ||||||
|  | 
 | ||||||
|  | [license] | ||||||
|  | EOF | ||||||
|  | 
 | ||||||
|  | chmod 644 $dir/out/$pkgname/lib/lazypkg/$pkgname | ||||||
|  | cd $srcdir | ||||||
|  | license >> $dir/out/$pkgname/lib/lazypkg/$pkgname | ||||||
|  | 
 | ||||||
|  | echo >> $dir/out/$pkgname/lib/lazypkg/$pkgname | ||||||
|  | echo [fs] >> $dir/out/$pkgname/lib/lazypkg/$pkgname | ||||||
|  | 
 | ||||||
|  | cd $dir/out/$pkgname/ | ||||||
|  | find * >> $dir/out/$pkgname/lib/lazypkg/$pkgname | ||||||
|  | 
 | ||||||
|  | cd $dir/out/$pkgname | ||||||
|  | tar -cJf ../$pkgname.$pkgver.tar.xz * | ||||||
|  | 
 | ||||||
|  | echo $ext | tr ':' '\n' | while read e; do | ||||||
|  | 	echo \$e | ||||||
|  | 
 | ||||||
|  |     cd $srcdir | ||||||
|  |     mkdir -p $dir/out/$pkgname-\$e | ||||||
|  |     pkgdir=$dir/out/$pkgname-\$e | ||||||
|  |     package_\$e | ||||||
|  | 
 | ||||||
|  |     mkdir -p $dir/out/$pkgname-\$e/lib/lazypkg | ||||||
|  | 
 | ||||||
|  |     cat > $dir/out/$pkgname-\$e/lib/lazypkg/$pkgname-\$e << EOF | ||||||
|  | [pkg] | ||||||
|  | name=$pkgname-\$e | ||||||
|  | ver=$pkgver | ||||||
|  | 
 | ||||||
|  | [license] | ||||||
|  | EOF | ||||||
|  | 
 | ||||||
|  |     chmod 644 $dir/out/$pkgname-\$e/lib/lazypkg/$pkgname-\$e | ||||||
|  |     cd $srcdir | ||||||
|  |     license >> $dir/out/$pkgname-\$e/lib/lazypkg/$pkgname-\$e | ||||||
|  | 
 | ||||||
|  |     echo >> $dir/out/$pkgname-\$e/lib/lazypkg/$pkgname-\$e | ||||||
|  |     echo [fs] >> $dir/out/$pkgname-\$e/lib/lazypkg/$pkgname-\$e | ||||||
|  | 
 | ||||||
|  |     cd $dir/out/$pkgname-\$e | ||||||
|  | 
 | ||||||
|  | 	find * >> $dir/out/$pkgname-\$e/lib/lazypkg/$pkgname-\$e | ||||||
|  | 
 | ||||||
|  |     cd $dir/out/$pkgname-\$e | ||||||
|  |     tar -cJf ../$pkgname-\$e.$pkgver.tar.xz * | ||||||
|  | 
 | ||||||
|  | done | ||||||
|  | 
 | ||||||
|  | 
 | ||||||
|  | " | fakeroot sh | ||||||
|  | cd $dir | ||||||
							
								
								
									
										35
									
								
								pkgs/musl/build.sh
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										35
									
								
								pkgs/musl/build.sh
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,35 @@ | ||||||
|  | pkgver=1.2.1 | ||||||
|  | pkgname=musl | ||||||
|  | bad="gmake" | ||||||
|  | ext="dev" | ||||||
|  | 
 | ||||||
|  | fetch() { | ||||||
|  | 	curl "https://musl.libc.org/releases/$pkgname-$pkgver.tar.gz" -o $pkgname-$pkgver.tar.gz | ||||||
|  | 	tar -xf $pkgname-$pkgver.tar.gz | ||||||
|  | } | ||||||
|  | 
 | ||||||
|  | build() { | ||||||
|  | 	cd $pkgname-$pkgver | ||||||
|  | 	./configure --prefix=/ --enable-wrapper=no | ||||||
|  | 	make | ||||||
|  | } | ||||||
|  | 
 | ||||||
|  | package() { | ||||||
|  | 	cd $pkgname-$pkgver | ||||||
|  | 	make install DESTDIR=$pkgdir | ||||||
|  | 	rm -r $pkgdir/include | ||||||
|  | 	rm $pkgdir/lib/*.a | ||||||
|  | 	rm $pkgdir/lib/*.o | ||||||
|  | } | ||||||
|  | 
 | ||||||
|  | package_dev() { | ||||||
|  | 	cd $pkgname-$pkgver | ||||||
|  | 	make install DESTDIR=$pkgdir | ||||||
|  | 	rm $pkgdir/lib/*.so | ||||||
|  | 	rm $pkgdir/lib/*.so.? | ||||||
|  | } | ||||||
|  | 
 | ||||||
|  | license() { | ||||||
|  | 	cd $pkgname-$pkgver | ||||||
|  | 	cat COPYRIGHT | ||||||
|  | } | ||||||
							
								
								
									
										25
									
								
								pkgs/toybox/build.sh
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										25
									
								
								pkgs/toybox/build.sh
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,25 @@ | ||||||
|  | pkgver=0.8.4 | ||||||
|  | pkgname=toybox | ||||||
|  | pkgrel=1 | ||||||
|  | 
 | ||||||
|  | fetch() { | ||||||
|  | 	curl "http://www.landley.net/toybox/downloads/$pkgname-$pkgver.tar.gz" -o $pkgname-$pkgver.tar.gz | ||||||
|  | 	tar -xf $pkgname-$pkgver.tar.gz | ||||||
|  | } | ||||||
|  | 
 | ||||||
|  | build() { | ||||||
|  | 	cd $pkgname-$pkgver | ||||||
|  | 	make defconfig | ||||||
|  | 	make | ||||||
|  | } | ||||||
|  | 
 | ||||||
|  | package() { | ||||||
|  | 	cd $pkgname-$pkgver | ||||||
|  | 	install -d $pkgdir/bin | ||||||
|  | 	install -Dm755 ./toybox $pkgdir/bin/ | ||||||
|  | } | ||||||
|  | 
 | ||||||
|  | license() { | ||||||
|  | 	cd $pkgname-$pkgver | ||||||
|  | 	cat LICENSE | ||||||
|  | } | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue