#!/bin/sh CWD=`pwd` TMP=/tmp PKG=$TMP/package-zlib VERSION=1.2.1.1 ARCH=alpha BUILD=2 ( cd $TMP tar xzf $CWD/zlib-$VERSION.tar.gz cd zlib-$VERSION # I don't know if this is still required, but it doesn't hurt. #zcat $CWD/diff.gz | patch -p0 --verbose mkdir -p $PKG/usr/doc/zlib-$VERSION $PKG/usr/include $PKG/usr/lib cp -a ChangeLog FAQ INDEX README $PKG/usr/doc/zlib-$VERSION chmod 644 $PKG/usr/doc/zlib-$VERSION/* chown root.root $PKG/usr/doc/zlib-$VERSION/* ./configure --prefix=/usr make clean make cat libz.a > $PKG/usr/lib/libz.a ./configure --prefix=/usr --shared make clean make cat zlib.h > $PKG/usr/include/zlib.h cat zconf.h > $PKG/usr/include/zconf.h cat libz.so.$VERSION > $PKG/usr/lib/libz.so.$VERSION ; chmod 755 $PKG/usr/lib/* ( cd $PKG ( cd usr/lib ; ln -sf libz.so.$VERSION libz.so.1 ) ( cd usr/lib ; ln -sf libz.so.$VERSION libz.so ) ) mkdir -p $PKG/install cat $CWD/slack-desc > $PKG/install/slack-desc cd $PKG makepkg -l y -c n $TMP/zlib-$VERSION-$ARCH-$BUILD.tgz ) 2>&1 | tee $TMP/zlib.build.log