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 # Variables coming from configuration export JH_PACK_INSTALL=" " export JH_SRC_ARCHIVE=" " export JH_SRC_SUBDIRS=" " export JH_BUILD_ROOT=" " export JH_BUILD_SUBDIRS=" " export JH_KEEP_FILES=" " unset CFLAGS export CFLAGS=" " unset CXXFLAGS export CXXFLAGS=" " unset LDFLAGS export LDFLAGS=" " export MAKEFLAGS="-j $(nproc)" " unset NINJAJOBS export NINJAJOBS=" " unset MAKELEVEL unset MAKE_TERMOUT unset MAKE_TERMERR if [ -r /etc/profile ]; then source /etc/profile; fi # End of environment 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-${JH_PKG_DIR} TESTLOG=$(pwd)/test-${JH_PKG_DIR} echo MAKEFLAGS: $MAKEFLAGS > $INFOLOG echo NINJAJOBS: $NINJAJOBS >> $INFOLOG : > $TESTLOG PKG_DEST=${BUILD_DIR}/dest sudo 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 $BUILD_DIR) >> $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 ADDITIONAL="$(find . -mindepth 1 -maxdepth 1 -type l)" if [ -n "$ADDITIONAL" ]; then cp $ADDITIONAL $JH_UNPACKDIR fi ;; 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 cat > ~/.vimrc <<EOF 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 $BUILD_DIR) >> $INFOLOG echo Time before test: ${SECONDS} >> $INFOLOG # make -k >> $TESTLOG 2>&1 || true echo Time after test: ${SECONDS} >> $INFOLOG echo Size after test: $(sudo du -skx --exclude home $BUILD_DIR) >> $INFOLOG echo Time before install: ${SECONDS} >> $INFOLOG \$ \` \\ echo Time after install: ${SECONDS} >> $INFOLOG echo Size after install: $(sudo du -skx --exclude home $BUILD_DIR) >> $INFOLOG make DESTDIR=$PKG_DEST DESTDIR=$PKG_DEST ninja >$PKG_DEST/ $PKG_DEST/ &&