#!/bin/sh CWD=$(pwd) PRGNAM=$(basename $CWD) VERSION=$(date +"%Y.%m.%d_%H.%M") BUILD=1 ARCH=$(uname -m) TAG=cyco TMP=/tmp/$TAG PKG=$TMP/pkg-$PRGNAM OUTPUT=/tmp PREFIX=/usr # cleaning rm -fr $PKG # get sources [ -e $CWD/advanced-linux-programming.pdf ] && mv $CWD/advanced-linux-programming.pdf{,.orig} wget -c http://www.advancedlinuxprogramming.com/alp-folder/advanced-linux-programming.pdf -O $CWD/advanced-linux-programming.pdf [ -e $CWD/ALP-listings.tar.gz ] && mv $CWD/ALP-listings.tar.gz{,.orig} wget -c http://www.advancedlinuxprogramming.com/ALP-listings.tar.gz -O $CWD/ALP-listings.tar.gz mkdir -p $PKG$PREFIX/doc/$PRGNAM cp -R $CWD/advanced-linux-programming.pdf $CWD/ALP-listings.tar.gz $PKG$PREFIX/doc/$PRGNAM cd $PKG mkdir -p install cat < install/slack-desc $PRGNAM: $PRGNAM («Advanced Linux Programming» book) $PRGNAM: If you are a developer for the GNU/Linux system, this book will help you to: $PRGNAM: > Develop GNU/Linux software that works the way users expect it to. $PRGNAM: > Write more sophisticated programs with features such as multiprocessing, $PRGNAM: multi-threading, interprocess communication, and interaction with hardware $PRGNAM: devices. $PRGNAM: > Improve your programs by making them run faster, more reliably, and more $PRGNAM: securely. $PRGNAM: > Understand the preculiarities of a GNU/Linux system, including its limitations, $PRGNAM: special capabilities, and conventions. $PRGNAM: http://www.advancedlinuxprogramming.com/ EOF chown -R root:root * makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.txz