#!/bin/sh CWD=`pwd` TMP=/tmp PKG=$TMP/package-acct VERSION=6.3.5 ARCH=alpha BUILD=1 TARGET=$ARCH-alphaslack-linux rm -rf $PKG mkdir -p $PKG ( cd $TMP rm -rf acct-$VERSION tar xzf $CWD/acct-$VERSION.tar.gz cd acct-$VERSION chown -R root.root . find . -perm 664 -exec chmod 644 {} \; ./configure \ --prefix=/usr \ --build=$TARGET zcat $CWD/acct.files.diff.gz | patch -p1 --verbose || exit make || exit mkdir -p $PKG/sbin cat accton > $PKG/sbin/accton chown -R root.bin $PKG/sbin chmod 755 $PKG/sbin/accton mkdir -p $PKG/usr/bin cat ac > $PKG/usr/bin/ac cat lastcomm > $PKG/usr/bin/lastcomm cat sa > $PKG/usr/bin/sa chown -R root.bin $PKG/usr/bin chmod 755 $PKG/usr/bin/* mkdir -p $PKG/usr/sbin cat dump-acct > $PKG/usr/sbin/dump-acct cat dump-utmp > $PKG/usr/sbin/dump-utmp chown -R root.bin $PKG/usr/sbin chmod 755 $PKG/usr/sbin/* mkdir -p $PKG/usr/info cat accounting.info | gzip -9c > $PKG/usr/info/accounting.info.gz mkdir -p $PKG/usr/man/man1 cat ac.1 | gzip -9c > $PKG/usr/man/man1/ac.1.gz cat lastcomm.1 | gzip -9c > $PKG/usr/man/man1/lastcomm.1.gz mkdir -p $PKG/usr/man/man8 cat accton.8 | gzip -9c > $PKG/usr/man/man8/accton.8.gz cat sa.8 | gzip -9c > $PKG/usr/man/man8/sa.8.gz mkdir -p $PKG/usr/doc/acct-$VERSION cp -a AUTHORS COPYING NEWS README $PKG/usr/doc/acct-$VERSION ( cd $PKG find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null ) mkdir -p $PKG/install cat $CWD/slack-desc > $PKG/install/slack-desc cd $PKG makepkg -l y -c n $TMP/acct-$VERSION-$ARCH-$BUILD.tgz ) 2>&1 | tee $TMP/acct.build.log