#!/bin/bash ## src2pkg-helpers-sources.build ## Gilbert Ashley ## This script assembles the sources for the various ## libraries and binaries needed by src2pkg into one ## src2pkg-helpers-x.x.tar.bz2 archive. ## The combined archive contains the sources for ## libsentry, tar-1.13 and coreutils and unionfs-fuse ## Some extraneous material is removed from the original ## archives by this script, to save space in the archive. # Everything is done locally for this build, as it is really # only of use to me for preparing the archive which gets # included in the src2pkg package. SRC_PKG_HELPERS_VERSION=1.5 TAR_VERSION=1.13c LIBSENTRY_VERSION=0.7.0 COREUTILS_VERSION=5.2.1b UNIONFS_FUSE_VERSION=0.24 CWD=$(pwd) # remove stale working directory if present [[ -d src2pkg-helpers-$SRC_PKG_HELPERS_VERSION ]] && echo "Removing existing build directory" && rm -rf src2pkg-helpers-$SRC_PKG_HELPERS_VERSION # create a fresh directory to work in mkdir -p src2pkg-helpers-$SRC_PKG_HELPERS_VERSION # remove stale archive if present [[ -f src2pkg-helpers-$SRC_PKG_HELPERS_VERSION.tar.bz2 ]] && echo "Removing existing archive" && rm -rf src2pkg-helpers-$SRC_PKG_HELPERS_VERSION.tar.bz2 [[ -f ../src2pkg-helpers-$SRC_PKG_HELPERS_VERSION.tar.bz2 ]] && echo "Removing existing archive" && rm -rf ../src2pkg-helpers-$SRC_PKG_HELPERS_VERSION.tar.bz2 cd src2pkg-helpers-$SRC_PKG_HELPERS_VERSION ; echo "Unpacking coreutils" tar xjf $CWD/coreutils-$COREUTILS_VERSION.tar.bz2 echo "Unpacking libsentry" tar xjf $CWD/libsentry-$LIBSENTRY_VERSION.tar.bz2 echo "Unpacking tar-1.13" tar xjf $CWD/tar-$TAR_VERSION.tar.bz2 echo "Unpacking unionfs-fuse" tar xjf $CWD/unionfs-fuse-$UNIONFS_FUSE_VERSION.tar.bz2 cd $CWD ; # copy any needed patches into the directory cp *.diff src2pkg-helpers-$SRC_PKG_HELPERS_VERSION 2> /dev/null cat README > src2pkg-helpers-$SRC_PKG_HELPERS_VERSION/README # create our final source archive echo "Creating tar archive of src2pkg-helpers-$SRC_PKG_HELPERS_VERSION" tar -cf src2pkg-helpers-$SRC_PKG_HELPERS_VERSION.tar src2pkg-helpers-$SRC_PKG_HELPERS_VERSION echo "Creating src2pkg-helpers-$SRC_PKG_HELPERS_VERSION.tar.bz2" bzip2 src2pkg-helpers-$SRC_PKG_HELPERS_VERSION.tar # remove temporary working directory if present [[ -d src2pkg-helpers-$SRC_PKG_HELPERS_VERSION ]] && echo "Removing existing build directory" && rm -rf src2pkg-helpers-$SRC_PKG_HELPERS_VERSION # move the finished archive up one level mv src2pkg-helpers-$SRC_PKG_HELPERS_VERSION.tar.bz2 ../src2pkg-helpers-$SRC_PKG_HELPERS_VERSION.tar.bz2 echo "Done"