diff options
-rwxr-xr-x | build-template | 16 | ||||
-rw-r--r-- | def/a/bash (renamed from def/bash) | 0 | ||||
-rw-r--r-- | def/a/binutils (renamed from def/binutils) | 0 | ||||
-rw-r--r-- | def/a/bzip2 (renamed from def/bzip2) | 0 | ||||
-rw-r--r-- | def/a/coreutils (renamed from def/coreutils) | 0 | ||||
-rw-r--r-- | def/a/curl (renamed from def/curl) | 0 | ||||
-rw-r--r-- | def/a/diffutils (renamed from def/diffutils) | 0 | ||||
-rw-r--r-- | def/a/file (renamed from def/file) | 0 | ||||
-rw-r--r-- | def/a/findutils (renamed from def/findutils) | 0 | ||||
-rw-r--r-- | def/a/gawk (renamed from def/gawk) | 0 | ||||
-rw-r--r-- | def/a/gcc (renamed from def/gcc) | 0 | ||||
-rw-r--r-- | def/a/gmp (renamed from def/gmp) | 0 | ||||
-rw-r--r-- | def/a/grep (renamed from def/grep) | 0 | ||||
-rw-r--r-- | def/a/gzip (renamed from def/gzip) | 0 | ||||
-rw-r--r-- | def/a/libarchive (renamed from def/libarchive) | 0 | ||||
-rw-r--r-- | def/a/libressl (renamed from def/libressl) | 0 | ||||
-rw-r--r-- | def/a/m4 (renamed from def/m4) | 0 | ||||
-rw-r--r-- | def/a/make (renamed from def/make) | 0 | ||||
-rw-r--r-- | def/a/mpc (renamed from def/mpc) | 0 | ||||
-rw-r--r-- | def/a/mpfr (renamed from def/mpfr) | 0 | ||||
-rw-r--r-- | def/a/musl (renamed from def/musl) | 0 | ||||
-rw-r--r-- | def/a/patch (renamed from def/patch) | 0 | ||||
-rw-r--r-- | def/a/sed (renamed from def/sed) | 0 | ||||
-rw-r--r-- | def/a/xz (renamed from def/xz) | 0 | ||||
-rw-r--r-- | def/a/zlib (renamed from def/zlib) | 0 | ||||
-rw-r--r-- | def/chroot/util-linux (renamed from def/chroot-util-linux) | 4 | ||||
-rwxr-xr-x | install-pkg | 5 | ||||
-rw-r--r-- | lib2.sh | 3 |
28 files changed, 18 insertions, 10 deletions
diff --git a/build-template b/build-template index 5fe652c..7d51a3a 100755 --- a/build-template +++ b/build-template @@ -3,11 +3,21 @@ rm -rf dst mkdir dst -cat lib1.sh $1 lib2.sh | ./enter-newroot +x=$1 +pkgname=${x##*/} +x=${x%/*} +pkgcat=${x##*/} -for d in dst/*/*; do +{ + echo "export pkgname=$pkgname pkgcat=$pkgcat;" + cat lib1.sh $1 lib2.sh +} | ./enter-newroot + +for d in dst/$pkgcat/$pkgname/*; do [ -d "$d" ] || continue - tar czvf pkg/$( echo "$d" | sed 's/^dst\///; s:/:@:g' ).tar.xz -C $d . --sort=name --mtime="@0" --owner=0 --group=0 --numeric-owner + mkdir -p pkg/$pkgcat + tar czvf pkg/$pkgcat/$pkgname@${d##*/}.tar.xz -C dst $pkgcat/$pkgname \ + --sort=name --mtime="@0" --owner=0 --group=0 --numeric-owner echo $d done diff --git a/def/bash b/def/a/bash index 0ab65a1..0ab65a1 100644 --- a/def/bash +++ b/def/a/bash diff --git a/def/binutils b/def/a/binutils index 1f97a66..1f97a66 100644 --- a/def/binutils +++ b/def/a/binutils diff --git a/def/bzip2 b/def/a/bzip2 index 00c66db..00c66db 100644 --- a/def/bzip2 +++ b/def/a/bzip2 diff --git a/def/coreutils b/def/a/coreutils index 8a9ef4e..8a9ef4e 100644 --- a/def/coreutils +++ b/def/a/coreutils diff --git a/def/curl b/def/a/curl index a780cc7..a780cc7 100644 --- a/def/curl +++ b/def/a/curl diff --git a/def/diffutils b/def/a/diffutils index 1b1a8e5..1b1a8e5 100644 --- a/def/diffutils +++ b/def/a/diffutils diff --git a/def/file b/def/a/file index 11b61f1..11b61f1 100644 --- a/def/file +++ b/def/a/file diff --git a/def/findutils b/def/a/findutils index 7305e9d..7305e9d 100644 --- a/def/findutils +++ b/def/a/findutils diff --git a/def/gawk b/def/a/gawk index 664bead..664bead 100644 --- a/def/gawk +++ b/def/a/gawk diff --git a/def/gcc b/def/a/gcc index 56d8d8e..56d8d8e 100644 --- a/def/gcc +++ b/def/a/gcc diff --git a/def/gmp b/def/a/gmp index dc00b4d..dc00b4d 100644 --- a/def/gmp +++ b/def/a/gmp diff --git a/def/grep b/def/a/grep index 5e7b10f..5e7b10f 100644 --- a/def/grep +++ b/def/a/grep diff --git a/def/gzip b/def/a/gzip index f9d008e..f9d008e 100644 --- a/def/gzip +++ b/def/a/gzip diff --git a/def/libarchive b/def/a/libarchive index fd3eadf..fd3eadf 100644 --- a/def/libarchive +++ b/def/a/libarchive diff --git a/def/libressl b/def/a/libressl index aea9f10..aea9f10 100644 --- a/def/libressl +++ b/def/a/libressl diff --git a/def/m4 b/def/a/m4 index d70b61f..d70b61f 100644 --- a/def/m4 +++ b/def/a/m4 diff --git a/def/make b/def/a/make index 824f7e9..824f7e9 100644 --- a/def/make +++ b/def/a/make diff --git a/def/mpc b/def/a/mpc index 6a91e23..6a91e23 100644 --- a/def/mpc +++ b/def/a/mpc diff --git a/def/mpfr b/def/a/mpfr index 6be4b72..6be4b72 100644 --- a/def/mpfr +++ b/def/a/mpfr diff --git a/def/musl b/def/a/musl index dfe73d4..dfe73d4 100644 --- a/def/musl +++ b/def/a/musl diff --git a/def/patch b/def/a/patch index b99aea5..b99aea5 100644 --- a/def/patch +++ b/def/a/patch diff --git a/def/sed b/def/a/sed index 847ab9f..847ab9f 100644 --- a/def/sed +++ b/def/a/sed diff --git a/def/xz b/def/a/xz index c9e3802..c9e3802 100644 --- a/def/xz +++ b/def/a/xz diff --git a/def/zlib b/def/a/zlib index c7a4824..c7a4824 100644 --- a/def/zlib +++ b/def/a/zlib diff --git a/def/chroot-util-linux b/def/chroot/util-linux index 61a5cb6..499c70e 100644 --- a/def/chroot-util-linux +++ b/def/chroot/util-linux @@ -1,6 +1,6 @@ -pkgname=chroot-util-linux +pkgname=util-linux version=2.32.1 -distfiles="https://www.kernel.org/pub/linux/utils/util-linux/v${version%.*}/util-linux-${version}.tar.xz" +distfiles="https://www.kernel.org/pub/linux/utils/${pkgname}/v${version%.*}/${pkgname}-${version}.tar.xz" configure_args=" --without-ncurses --without-ncursesw --without-udev --without-systemd --disable-libuuid --disable-libblkid --disable-libmount diff --git a/install-pkg b/install-pkg index 2201c96..619d821 100755 --- a/install-pkg +++ b/install-pkg @@ -2,8 +2,5 @@ set -e for pkg; do - name=${pkg##*/} - name=${name%.tar.xz} - mkdir -p newroot/pkg/$(echo "$name" | sed 's:@:/:g') - tar xf $pkg -C newroot/pkg/$(echo "$name" | sed 's:@:/:g') + tar xf $pkg -C newroot/pkg/ done diff --git a/lib2.sh b/lib2.sh index ea7cbe0..a4e3cea 100644 --- a/lib2.sh +++ b/lib2.sh @@ -1,3 +1,4 @@ +[ -z "$pkgcat" ] && error "pkgcat unset" [ -z "$pkgname" ] && error "pkgname unset" [ -z "$version" ] && error "version unset" @@ -13,7 +14,7 @@ configure_args="--prefix=/usr --sysconfdir=/etc --sbindir=/usr/bin --bindir=/usr : ${LDFLAGS:=-Wl,-z,relro -Wl,-z,now} : ${make_install_target:=install} : ${make_install_args:=} -: ${DESTDIR:=/dst/$pkgname/$version} +: ${DESTDIR:=/dst/$pkgcat/$pkgname/$version} for s in fetch extract configure build check install; do verbose pre_$s |