#!/bin/sh CWD=`pwd` TMP=/tmp PKG=$TMP/package-iptraf VERSION=3.0.0 ARCH=alpha BUILD=1 rm -rf $PKG mkdir -p $PKG/usr ( cd $TMP rm -rf iptraf-$VERSION tar xzf $CWD/iptraf-$VERSION.tar.gz cd iptraf-$VERSION chown -R root.root . zcat $CWD/patches/iptraf-3.0.0-Makefile.patch.gz | patch -p0 --verbose || exit zcat $CWD/patches/iptraf-3.0.0-atheros.patch.gz | patch -p0 --verbose || exit zcat $CWD/patches/iptraf-3.0.0-bnep.patch.gz | patch -p0 --verbose || exit zcat $CWD/patches/iptraf-3.0.0-build.patch.gz | patch -p1 --verbose || exit zcat $CWD/patches/iptraf-3.0.0-headerfix.patch.gz | patch -p1 --verbose || exit zcat $CWD/patches/iptraf-3.0.0-linux-headers.patch.gz | patch -p1 --verbose || exit zcat $CWD/patches/iptraf-3.0.0-ncursesw.patch.gz | patch -p1 --verbose || exit zcat $CWD/patches/iptraf-3.0.0-setlocale.patch.gz | patch -p1 --verbose || exit zcat $CWD/patches/iptraf.paths.diff.gz | patch -p0 --verbose || exit cd src make || exit strip --strip-unneeded iptraf rvnamed rawtime 2> /dev/null mkdir -p $PKG/usr/sbin cp iptraf rvnamed rawtime $PKG/usr/sbin chmod 755 $PKG/usr/sbin/* chown -R root.bin $PKG/usr/sbin mkdir -p $PKG/var/cache/iptraf mkdir -p $PKG/var/run/iptraf mkdir -p $PKG/var/log/iptraf mkdir -p $PKG/usr/doc/iptraf-$VERSION cd .. cp -a CHANGES Documentation FAQ INSTALL LICENSE README README.contact README.interfaces README.platforms README.rvnamed RELEASE-NOTES $PKG/usr/doc/iptraf-$VERSION mkdir -p $PKG/usr/man/man8 mv $PKG/usr/doc/iptraf-$VERSION/Documentation/iptraf.8 $PKG/usr/man/man8 mv $PKG/usr/doc/iptraf-$VERSION/Documentation/rvnamed.8 $PKG/usr/man/man8 gzip -9 $PKG/usr/man/man8/* # crud removal rm -f $PKG/usr/doc/iptraf-$VERSION/Documentation/manual.template.gz mkdir -p $PKG/install cat $CWD/slack-desc > $PKG/install/slack-desc cd $PKG makepkg -l y -c n $TMP/iptraf-$VERSION-$ARCH-$BUILD.tgz ) 2>&1 | tee $TMP/iptraf.build.log