#!/bin/sh [ -z $PREPKG ] && exit 1 PACKAGE=macchanger VERSION=1.5.0 FILES=$(cd $(dirname $0) ; pwd) mkdir -p \ $PREPKG/{install,usr/doc/$PACKAGE-$VERSION}/ tar xf $FILES/$PACKAGE-$VERSION.tar.gz || exit 1 chmod -R \ go-w . chown -R \ root:root . cd $PACKAGE-$VERSION/ # assorted useful patches. hopefully not another 'debian openssh debacle' tar xf $FILES/patches/${PACKAGE}_${VERSION}-9.debian.tar.gz for PATCH in debian/patches/*.patch ; do cat $PATCH | patch -p1 &> $(basename $PATCH).output done # lifted verbatim from a more modern copy of 'mdate-sh'. this is # required as the info page needs to be regenerated. without it, # the build hangs in the 'doc' directory. ain't bitrot fun? # GNU ls changes its time format in response to the TIME_STYLE # variable. Since we cannot assume `unset' works, revert this # variable to its documented default. if test "${TIME_STYLE+set}" = set; then TIME_STYLE=posix-long-iso export TIME_STYLE fi CFLAGS="-O2 -march=i486 -mtune=i686" \ ./configure \ --prefix=/usr \ --build=i486-slackware-linux &> configure.output || exit 1 make $MAKEJOBS &> make.output || exit 1 make DESTDIR=$PREPKG install &> make_install.output || exit 1 # tidy up rm \ $PREPKG/usr/info/dir cp -a \ tools/ AUTHORS COPYING ChangeLog README \ $PREPKG/usr/doc/$PACKAGE-$VERSION/ gzip -r9 \ $PREPKG/usr/{info,man}/ cp \ $FILES/{doinst.sh,slack-desc} \ $PREPKG/install/ find $PREPKG -exec file {} \; \ | awk -F : '/ ELF / {print $1}' \ | xargs strip -p --strip-unneeded