diff options
author | Andreas Baumann <mail@andreasbaumann.cc> | 2018-02-05 21:46:28 +0100 |
---|---|---|
committer | Andreas Baumann <mail@andreasbaumann.cc> | 2018-02-05 21:46:28 +0100 |
commit | 7c7a001ee6b8642121d28191bcc913c2ea452900 (patch) | |
tree | f6c94f1fa52ea89994a1c2d2e2ee3f382d0bc287 /build_stage1_package.sh | |
parent | ae49983b15e102ff4850e2b387ebafc839cdc9e5 (diff) | |
download | bootstrap32-7c7a001ee6b8642121d28191bcc913c2ea452900.tar.xz |
building up to pacman pre-requisites, pacman itself doesn't work yet
changed checkout method parameter, we have asp, yaourt and packages32 now
Diffstat (limited to 'build_stage1_package.sh')
-rwxr-xr-x | build_stage1_package.sh | 33 |
1 files changed, 25 insertions, 8 deletions
diff --git a/build_stage1_package.sh b/build_stage1_package.sh index 06ecfcd..585f2db 100755 --- a/build_stage1_package.sh +++ b/build_stage1_package.sh @@ -35,16 +35,26 @@ if test $(pacman --config "$STAGE1_CHROOT/etc/pacman.conf" -r "$STAGE1_CHROOT" - PACKAGE_DIR="$SCRIPT_DIR/$TARGET_CPU-stage1/$PACKAGE" PACKAGE_CONF="$PACKAGE_DIR/DESCR" if test -f $PACKAGE_CONF; then - if test $(grep -c NEEDS_YAOURT $PACKAGE_CONF) = 1; then - NEEDS_YAOURT=$(grep NEEDS_YAOURT $PACKAGE_CONF | cut -f 2 -d =) + if test $(grep -c FETCH_METHOD $PACKAGE_CONF) = 1; then + FETCH_METHOD=$(grep FETCH_METHOD $PACKAGE_CONF | cut -f 2 -d = | tr -d '"') fi fi - if test "$NEEDS_YAOURT"; then - yaourt -G "$PACKAGE" - else - asp export "$PACKAGE" - fi - + case $FETCH_METHOD in + "asp") + asp export "$PACKAGE" + ;; + "yaourt") + yaourt -G "$PACKAGE" + ;; + "packages32") + # (we assume, we only take core packages) + cp -a $ARCHLINUX32_PACKAGES/core/$PACKAGE . + ;; + *) + print "ERROR: unknown FETCH_METHOD '$FETCH_METHOD'.." >2 + exit 1 + esac + cd "$PACKAGE" || exit 1 # attach our destination platform to be a supported architecture @@ -57,6 +67,13 @@ if test $(pacman --config "$STAGE1_CHROOT/etc/pacman.conf" -r "$STAGE1_CHROOT" - cat "$DIFF_PKGBUILD" >> PKGBUILD fi + # copy all other files from Archlinux32, if they exist + # (we assume, we only take core packages during stage1) + if test -f "$DIFF_PKGBUILD"; then + find $ARCHLINUX32_PACKAGES/core/pacman-mirrorlist/* ! -name PKGBUILD \ + -exec cp {} . \; + fi + # source package descriptions, sets variables for this script # and executes whatever is needed to build the package |