slackbuilds/doc/Advanced-Linux-Programming/Advanced-Linux-Programming.SlackBuild
Gwenhael Le Moine 53b220539f add Advanced Linux Programming
Signed-off-by: Gwenhael Le Moine <gwenhael.le.moine@gmail.com>
2012-10-09 13:16:43 +02:00

48 lines
1.6 KiB
Bash
Executable file

#!/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 <<EOF > 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