#!/bin/bash #NEED:xz #DEP:acl ROOT=`pwd` PACKAGE=tar VERSION=1.27.1 PKGROOT=/tmp/tar mkdir $PKGROOT -p tar -xzf $PACKAGE-$VERSION.tar.gz ||exit 1 cd $PACKAGE-$VERSION ||exit 1 #export CFLAGS="-std=c89" export CFLAGS="-fgnu89-inline" #If "multiple definition of `foo'" Also see http://gcc.gnu.org/gcc-4.3/porting_to.html FORCE_UNSAFE_CONFIGURE=1 ./configure --prefix=/usr --bindir=/bin ||exit 1 make ||exit 1 make install DESTDIR=$PKGROOT ||exit 1 mkdir -p $PKGROOT/usr/bin ln -s /bin/tar $PKGROOT/usr/bin/tar || exit 1 #speciale tar voor pkgtools nodig cp $ROOT/tar-1.13 $PKGROOT/bin || exit 1 chmod +x $PKGROOT/bin/tar-1.13 || exit 1 cd $PKGROOT ||exit 1 # Strip binaries: ( cd $PKGROOT find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null find . | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | xargs strip -g 2> /dev/null ) makepkg -l y -c n $ROOT/$PACKAGE.pkg > /dev/null && echo $VERSION > $ROOT/$PACKAGE.version && arch > $ROOT/$PACKAGE.arch