#!/bin/sh CWD=$(pwd) PRGNAM=$(basename $CWD) VERSION=$(date +"%Y.%m.%d_%H.%M") BUILD=1 ARCH=noarch TAG=gwh TMP=/tmp/$TAG PKG=$TMP/pkg-$PRGNAM OUTPUT=/tmp REPOSITORIES=/home/installs/SlackBuilds/repositories/ PREFIX=/usr # cleaning rm -fr $PKG # get sources if [ ! -e $REPOSITORIES/$PRGNAM ]; then mkdir -p $REPOSITORIES/$PRGNAM ( cd $REPOSITORIES/$PRGNAM httrack http://algorithms.openmymind.net/ ) else ( cd $REPOSITORIES/$PRGNAM httrack --update ) fi mkdir -p $PKG$PREFIX/doc/ cp -R $REPOSITORIES/$PRGNAM $PKG$PREFIX/doc/$PRGNAM cd $PKG mkdir -p install cat < install/slack-desc $PRGNAM: $PRGNAM («Algorithms» book) $PRGNAM: $PRGNAM: This is a place to find information about some of the more fundamental $PRGNAM: algorithms used in computer science. This information is widely available $PRGNAM: on the net, but hopefully the way it's presented and discussed here will $PRGNAM: resonate with you. $PRGNAM: $PRGNAM: $PRGNAM: $PRGNAM: $PRGNAM: http://algorithms.openmymind.net/ 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