#!/bin/sh CWD=$(pwd) PRGNAM=$(basename $CWD) VERSION=${VERSION:-$(date +"%Y.%m.%d_%H.%M")} BUILD=${BUILD:-1} ARCH=${ARCH:-$(uname -m)} TAG=gwh TMP=${TMP:-/tmp/$TAG} PKG=${PKG:-$TMP/pkg-$PRGNAM} OUTPUT=${OUTPUT:-/tmp} PREFIX=${PREFIX:-/usr} # cleaning rm -fr $PKG # get sources wget -c http://publications.gbdirect.co.uk/c_book/the_c_book.pdf -O $CWD/the_c_book.pdf wget -c http://publications.gbdirect.co.uk/c_book/thecbook.pdf -O $CWD/thecbook.pdf mkdir -p $PKG$PREFIX/doc/$PRGNAM cp -R $CWD/*.pdf $PKG$PREFIX/doc/$PRGNAM cd $PKG mkdir -p install cat < install/slack-desc $PRGNAM: $PRGNAM (The C book) $PRGNAM: $PRGNAM: $PRGNAM: $PRGNAM: $PRGNAM: $PRGNAM: $PRGNAM: $PRGNAM: $PRGNAM: http://publications.gbdirect.co.uk/c_book/ $PRGNAM: EOF chown -R root:root * rm -f $PKG/{,usr/}lib$(uname -m | grep -o 64)/*.la /sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.txz