#!/bin/sh [ -z $PREPKG ] && exit 1 PACKAGE=reaver VERSION=1.4 FILES=$(cd $(dirname $0) ; pwd) mkdir -p \ $PREPKG/{install,usr/{doc/$PACKAGE-$VERSION,man,sbin},var/lib/$PACKAGE}/ tar xf $FILES/$PACKAGE-$VERSION.tar.gz || exit 1 chown -R \ root:root . cd $PACKAGE-$VERSION/ cd src/ CFLAGS="-O2 -march=i486 -mtune=i686" \ ./configure \ --sysconfdir=/var/lib \ --build=i486-slackware-linux &> configure.output || exit 1 make $MAKEJOBS &> make.output || exit 1 # install target is a horrible mess. do things by hand # FIXED: should be in /usr/sbin/ instead of author's choice of /usr/bin/ cp -p \ $PACKAGE wash \ $PREPKG/usr/sbin/ # FIXED: not a config file, so /etc/ is incorrect. /var/lib/ appears to be # the correct place. if not that, then possibly /var/state/ # do we need to package this file at all? seems to be rebuilt on-the-fly cp -p \ $PACKAGE.db \ $PREPKG/var/lib/$PACKAGE/ cd - cd docs/ cp -p \ LICENSE README* \ $PREPKG/usr/doc/$PACKAGE-$VERSION/ cp -p \ $PACKAGE.1.gz \ $PREPKG/usr/man/ cd - cp \ $FILES/slack-desc \ $PREPKG/install/ find $PREPKG -exec file {} \; \ | awk -F : '/ ELF / {print $1}' \ | xargs strip -p --strip-unneeded