#!/ffp/bin/sh # # zip/unzip build script for funplug set -e CWD=`pwd` PKGNAME=zip PKG=$CWD/package-$PKGNAME ZIPTAR=30 UNZIPTAR=60 PKGVER=${ZIPTAR} BUILD=1 TAG=jag PKGDIR=/ffp/var/cache/packages URL=http://softlayer.dl.sourceforge.net/project/infozip CLEANUP=yes # Make the package directory if not found: if [ ! -d $PKGDIR ]; then mkdir -p $PKGDIR fi # Grab the source: ( mkdir -p source && cd source wget -N $URL/UnZip%206.x%20%28latest%29/UnZip%206.0/unzip$UNZIPTAR.tar.gz wget -N $URL/Zip%203.x%20%28latest%29/3.0/zip$ZIPTAR.tar.gz ) rm -rf $PKG mkdir -p $PKG echo echo "zip-$ZIPTAR source is now extracting..." rm -rf zip$ZIPTAR tar xf $CWD/source/zip${ZIPTAR}.tar.gz cd zip$ZIPTAR chown -R root:root . sed -i 's/man\/man/share\/man\/man/' unix/Makefile sed -i 's/DUNIX/DUNIX -march=armv5te/' unix/Makefile make prefix=/ffp -f unix/Makefile generic_gcc make prefix=$PKG/ffp -f unix/Makefile install cd $CWD echo echo "unzip-$UNZIPTAR source is now extracting..." rm -rf unzip$UNZIPTAR tar xf $CWD/source/unzip$UNZIPTAR.tar.gz cd unzip$UNZIPTAR chown -R root:root . sed -i 's@DUNIX@DUNIX -march=armv5te@' unix/Makefile sed -i 's/man\/man/share\/man\/man/' unix/Makefile make prefix=/ffp -f unix/Makefile generic make prefix=$PKG/ffp -f unix/Makefile install # Strip: find $PKG | xargs file | grep -e "executable" -e "shared object" \ | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null \ | true # Build the package: cd $PKG echo && echo "Making funplug package..." && echo tar czvf $PKGDIR/$PKGNAME-$PKGVER-$BUILD$TAG.tgz * echo && echo "Your $PKGNAME package is in $PKGDIR" && echo # Clean up: [[ $CLEANUP == yes ]] && \ rm -rf $CWD/zip$ZIPTAR $CWD/unzip$UNZIPTAR $CWD/package-$PKGNAME exit 1