From 854da672db23e3a73ec8c006a042b1b3334e4b63 Mon Sep 17 00:00:00 2001 From: Andreas Baumann Date: Thu, 1 Feb 2018 16:02:22 +0100 Subject: building up to util-linux added support for additional packages to install (ADDITIONAL_INSTALL_PACKAGE) --- build_stage1_package.sh | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'build_stage1_package.sh') 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 -- cgit v1.2.3-54-g00ecf