#!/bin/sh CWD=`pwd` TMP=${TMP:-/tmp} PKG=/tmp/package-zlib VERSION=1.2.1.1 ARCH=${ARCH:-i486} BUILD=1 rm -rf $PKG mkdir -p $PKG cd $TMP rm -rf zlib-$VERSION tar xzvf $CWD/zlib-$VERSION.tar.gz cd zlib-$VERSION chown -R root.root . find . -perm 777 -exec chmod 755 {} \; find . -perm 664 -exec chmod 644 {} \; ./configure \ --prefix=/usr make clean make ./configure \ --prefix=/usr \ --shared make mkdir -p $PKG/usr/include cp -a zlib.h zconf.h $PKG/usr/include chmod 644 $PKG/usr/include/* mkdir -p $PKG/usr/lib cp -a libz.a libz.so* $PKG/usr/lib chmod 755 $PKG/usr/lib/* chmod 644 $PKG/usr/lib/libz.a mkdir -p $PKG/usr/man/man3 cat zlib.3 | gzip -9c > $PKG/usr/man/man3/zlib.3.gz ( cd $PKG 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 --strip-unneeded 2> /dev/null ) mkdir -p $PKG/usr/doc/zlib-$VERSION cp -a \ ChangeLog FAQ INDEX README \ $PKG/usr/doc/zlib-$VERSION mkdir -p $PKG/install cat $CWD/slack-desc > $PKG/install/slack-desc cd $PKG makepkg -l y -c n ../zlib-$VERSION-$ARCH-$BUILD.tgz