From b2fb3e34c3ed855f246b66d01abed4cce90994d0 Mon Sep 17 00:00:00 2001 From: r00t Date: Tue, 23 Dec 2014 22:25:42 -0500 Subject: [PATCH] adding further optimizations... friggin' aur maintainers. --- extra/packages.both | 2 +- lib/05-jenny_craig.func.sh | 1 + lib/mk.chroot.sh | 9 +++++++++ 3 files changed, 11 insertions(+), 1 deletion(-) diff --git a/extra/packages.both b/extra/packages.both index f3d9e2b..250df62 100644 --- a/extra/packages.both +++ b/extra/packages.both @@ -157,7 +157,7 @@ lsscsi lxde lynx lz4 -lzip +#lzip lzo lzop macchanger diff --git a/lib/05-jenny_craig.func.sh b/lib/05-jenny_craig.func.sh index 92d57d7..1e96c72 100644 --- a/lib/05-jenny_craig.func.sh +++ b/lib/05-jenny_craig.func.sh @@ -40,6 +40,7 @@ function jenny_craig () { # DISABLE when no longer building custom kernel find ${BUILDDIR}/usr/lib/modules/ -maxdepth 1 -iname "*-ARCH" -exec rm -rf '{}' \; find ${BUILDDIR}/ -type f -name "*.pacnew" -exec rm -rf '{}' \; + sed -i -e '/^MAKEFLAGS=.*$/d' ${BUILDDIR}/etc/makepkg.conf rm -rf ${BUILDDIR}/usr/share/locale/* mv -f ${BUILDDIR}/tmp/locale.alias ${BUILDDIR}/usr/share/locale/. rm -rf ${BUILDDIR}/var/cache/pacman/* diff --git a/lib/mk.chroot.sh b/lib/mk.chroot.sh index d3f579e..7b7335f 100755 --- a/lib/mk.chroot.sh +++ b/lib/mk.chroot.sh @@ -181,6 +181,15 @@ EOF ${CHROOTCMD} ${CHROOTDIR64}/ 'pacman --noconfirm -R gcc-libs libtool' >> "${LOGFILE}.${FUNCNAME}" 2>&1 ${CHROOTCMD} ${CHROOTDIR64}/ 'pacman --noconfirm -S multilib-devel' >> "${LOGFILE}.${FUNCNAME}" 2>&1 fi + + # And let's do some more optimization. + if [[ "${I_AM_A_RACECAR}" == "y" ]]; + then + CPUCNT=$(grep processor /proc/cpuinfo | wc -l) + ((CPUCNT++)) + sed -i -e "/^[[:space:]]*#*MAKEFLAGS=.*$/aMAKEFLAGS=\"-j${CPUCNT}\"" ${CHROOTDIR64}/etc/makepkg.conf + sed -i -e "/^[[:space:]]*#*MAKEFLAGS=.*$/aMAKEFLAGS=\"-j${CPUCNT}\"" ${CHROOTDIR32}/etc/makepkg.conf + fi # preprocessing sed -i -e '/base-devel/d ; /multilib-devel/d' ${BASEDIR}/extra/packages.*