systemd sysv for libdir in /lib /usr/lib $(find /opt -name lib); do find $libdir -name \*.la ! -path \*ImageMagick\* -delete done 00 0 SCRIPT is FTPDIR is #!/bin/bash set -e export JH_PKG_DIR= SRC_DIR=${JH_SRC_ARCHIVE}${JH_SRC_SUBDIRS:+/${JH_PKG_DIR}} BUILD_DIR=${JH_BUILD_ROOT}${JH_BUILD_SUBDIRS:+/${JH_PKG_DIR}} mkdir -p $SRC_DIR mkdir -p $BUILD_DIR INFOLOG=$(pwd)/info-${PKG_DIR} TESTLOG=$(pwd)/test-${PKG_DIR} unset MAKEFLAGS #MAKEFLAGS=-j4 echo MAKEFLAGS: $MAKEFLAGS > $INFOLOG > $TESTLOG PKG_DEST=${BUILD_DIR}/dest rm -rf $PKG_DEST cd $BUILD_DIR [[ -n "$JH_KEEP_FILES" ]] || sudo rm -rf $JH_UNPACKDIR unpacked exit cd $SRC_DIR cd $BUILD_DIR find . -maxdepth 1 -mindepth 1 -type d | xargs sudo rm -rf echo Start Size: $(sudo du -skx --exclude home /) >> $INFOLOG case $PACKAGE in *.tar.gz|*.tar.bz2|*.tar.xz|*.tgz|*.tar.lzma) tar -xvf $SRC_DIR/$PACKAGE > unpacked JH_UNPACKDIR=`grep '[^./]\+' unpacked | head -n1 | sed 's@^\./@@;s@/.*@@'` ;; *.tar.lz) bsdtar -xvf $SRC_DIR/$PACKAGE 2> unpacked JH_UNPACKDIR=`head -n1 unpacked | cut -d" " -f2 | sed 's@^\./@@;s@/.*@@'` ;; *.zip) zipinfo -1 $SRC_DIR/$PACKAGE > unpacked JH_UNPACKDIR="$(sed 's@/.*@@' unpacked | uniq )" if test $(wc -w <<< $JH_UNPACKDIR) -eq 1; then unzip $SRC_DIR/$PACKAGE else JH_UNPACKDIR=${PACKAGE%.zip} unzip -d $JH_UNPACKDIR $SRC_DIR/$PACKAGE fi ;; *) JH_UNPACKDIR=$JH_PKG_DIR-build mkdir $JH_UNPACKDIR cp $SRC_DIR/$PACKAGE $JH_UNPACKDIR cp $(find . -mindepth 1 -maxdepth 1 -type l) $JH_UNPACKDIR ;; esac export JH_UNPACKDIR cd $JH_UNPACKDIR echo Start Time: ${SECONDS} >> $INFOLOG sudo /sbin/ ldconfig = if [[ ! -f $ ]] ; then if [[ -f $JH_SRC_ARCHIVE/$ ]] ; then cp $JH_SRC_ARCHIVE/$ $ else wget -T 30 -t 5 || wget -T 30 -t 5 || wget -T 30 -t 5 ${JH_FTP_SERVER}svn/ /$ fi fi echo " $ " | md5sum -c - [[ "$SRC_DIR" != "$BUILD_DIR" ]] && ln -sf $SRC_DIR/$ $BUILD_DIR PATCH PACKAGE1 sudo -E sh << ROOT_EOF if [ -r "$JH_PACK_INSTALL" ]; then source $JH_PACK_INSTALL export -f wrapInstall export -f packInstall fi wrapInstall ' ' packInstall ROOT_EOF sudo -E sh << ROOT_EOF ROOT_EOF BOOTPKG_DIR=blfs- BOOTSRC_DIR=${JH_SRC_ARCHIVE}${JH_SRC_SUBDIRS:+/${BOOTPKG_DIR}} BOOTBUILD_DIR=${JH_BUILD_ROOT}${JH_BUILD_SUBDIRS:+/${BOOTPKG_DIR}} mkdir -p $BOOTSRC_DIR mkdir -p $BOOTBUILD_DIR pushd $BOOTSRC_DIR URL= BOOTPACKG=$(basename $URL) if [[ ! -f $BOOTPACKG ]] ; then if [[ -f $JH_SRC_ARCHIVE/$BOOTPACKG ]] ; then cp $JH_SRC_ARCHIVE/$BOOTPACKG $BOOTPACKG else wget -T 30 -t 5 $URL fi rm -f $BOOTBUILD_DIR/unpacked fi cd $BOOTBUILD_DIR if [[ -e unpacked ]] ; then BOOTUNPACKDIR=`head -n1 unpacked | sed 's@^./@@;s@/.*@@'` if ! [[ -d $BOOTUNPACKDIR ]]; then tar -xvf $BOOTSRC_DIR/$BOOTPACKG > unpacked BOOTUNPACKDIR=`head -n1 unpacked | sed 's@^./@@;s@/.*@@'` fi else tar -xvf $BOOTSRC_DIR/$BOOTPACKG > unpacked BOOTUNPACKDIR=`head -n1 unpacked | sed 's@^./@@;s@/.*@@'` fi cd $BOOTUNPACKDIR popd echo Time after make: ${SECONDS} >> $INFOLOG echo Size after make: $(sudo du -skx --exclude home /) >> $INFOLOG echo Time before test: ${SECONDS} >> $INFOLOG # make -k >> $TESTLOG 2>&1 || true ' make -j1 \$ \` \\ '\'' **EDITME EDITME** **EDITME EDITME** echo Time after tests: ${SECONDS} >> $INFOLOG echo Size after tests: $(sudo du -skx --exclude home /) >> $INFOLOG echo Time before install: ${SECONDS} >> $INFOLOG echo Time after install: ${SECONDS} >> $INFOLOG echo Size after install: $(sudo du -skx --exclude home /) >> $INFOLOG make DESTDIR=$PKG_DEST DESTDIR=$PKG_DEST ninja >$PKG_DEST/ $PKG_DEST/