Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/build_stage1_package.sh
diff options
context:
space:
mode:
authorAndreas Baumann <mail@andreasbaumann.cc>2018-02-01 16:02:22 +0100
committerAndreas Baumann <mail@andreasbaumann.cc>2018-02-01 16:02:22 +0100
commit854da672db23e3a73ec8c006a042b1b3334e4b63 (patch)
treee952d8ca01f8d040975daec842ace8d4701e7d3d /build_stage1_package.sh
parentab6c622e801c15627beac5cdc0e0f6d9270316aa (diff)
building up to util-linux
added support for additional packages to install (ADDITIONAL_INSTALL_PACKAGE)
Diffstat (limited to 'build_stage1_package.sh')
-rwxr-xr-xbuild_stage1_package.sh11
1 files changed, 9 insertions, 2 deletions
diff --git a/build_stage1_package.sh b/build_stage1_package.sh
index 7513611..f685ff3 100755
--- a/build_stage1_package.sh
+++ b/build_stage1_package.sh
@@ -62,7 +62,9 @@ if test $(pacman --config "$STAGE1_CHROOT/etc/pacman.conf" -r "$STAGE1_CHROOT" -
fi
# copy bigger patches into the build area
- cp $SCRIPT_DIR/patches-$TARGET_CPU-stage1/$PACKAGE-*.patch .
+ if test $(find SCRIPT_DIR/patches-$TARGET_CPU-stage1/$PACKAGE-*.patch 2>/dev/null | grep -q .); then
+ cp $SCRIPT_DIR/patches-$TARGET_CPU-stage1/$PACKAGE-*.patch .
+ fi
# disable or enable parallel builds
@@ -99,13 +101,18 @@ if test $(pacman --config "$STAGE1_CHROOT/etc/pacman.conf" -r "$STAGE1_CHROOT" -
# install into chroot via pacman
sudo pacman --noconfirm --config "$STAGE1_CHROOT/etc/pacman.conf" -r "$STAGE1_CHROOT" -Syy "$PACKAGE"
- pacman --noconfirm --config "$STAGE1_CHROOT/etc/pacman.conf" -r "$STAGE1_CHROOT" -Q
+ if test "x$ADDITIONAL_INSTALL_PACKAGE" != "x"; then
+ sudo pacman --noconfirm --config "$STAGE1_CHROOT/etc/pacman.conf" -r "$STAGE1_CHROOT" -Syy "$ADDITIONAL_INSTALL_PACKAGE"
+ fi
# optionally install into cross-compiler sysroot with bsdtar
if test "$SYSROOT_INSTALL" = 1; then
cd "$XTOOLS_ARCH/$TARGET_CPU-unknown-linux-gnu/sysroot" || exit 1
sudo bsdtar xvf $STAGE1_CHROOT/packages/$TARGET_CPU/$PACKAGE-*.pkg.tar.xz
+ if test "x$ADDITIONAL_INSTALL_PACKAGE" != "x"; then
+ sudo bsdtar xvf $STAGE1_CHROOT/packages/$TARGET_CPU/$ADDITIONAL_INSTALL_PACKAGE-*.pkg.tar.xz
+ fi
cd "$STAGE1_BUILD/$PACKAGE" || exit 1
fi