#!/bin/sh [ -z $PREPKG ] && exit 1 PACKAGE=yodl VERSION=2.12.1 FILES=$(cd $(dirname $0) ; pwd) mkdir -p $PREPKG/install/ chown -R root:root . ./build package &> build_package.output || exit 1 ./build install $PREPKG/usr &> build_install.output || exit 1 # I'd normally rely on a sane build environment to permit me to change # things on the fly (ie: preserving file times & overriding install # locations), but icmake doesn't fit in this category. Ergo, one ugly # hack deserves another. Or three. # fancy footwork to restore timetamps for DST in $(find $PREPKG -type f) ; do for SRC in $(find . -type f -name $(basename $DST)) ; do cmp -s $SRC $DST [ $? = 0 ] && touch -r $SRC $DST done done # move things around to where they belong (aka: this isn't debian, dammit!) mv $PREPKG/usr/share/doc/ $PREPKG/usr/doc/ mv $PREPKG/usr/doc/$PACKAGE/ $PREPKG/usr/doc/$PACKAGE-$VERSION/ rm -rf $PREPKG/usr/doc/$PACKAGE-$VERSION/contrib/ mv $PREPKG/usr/share/man/ $PREPKG/usr/man/ # speaking of hacks.. manpages installed flat yet the symlinks allege # they're gzipped. Good work, guys! Oh well, I was going to gzip them # anyway. find $PREPKG/usr/man/ -type f -exec gzip -9 {} \; cp $FILES/slack-desc $PREPKG/install/ find $PREPKG -exec file {} \; \ | awk -F : '/ ELF / {print $1}' \ | xargs strip -p --strip-unneeded