slackbuilds/doc/the_C_book/the_C_book.SlackBuild
Gwenhael Le Moine 85385b17f8 add
2011-10-11 17:23:23 +02:00

46 lines
852 B
Bash
Executable file

#!/bin/sh
CWD=$(pwd)
PRGNAM=$(basename $CWD)
VERSION=${VERSION:-$(date +"%Y.%m.%d_%H.%M")}
BUILD=${BUILD:-1}
ARCH=${ARCH:-$(uname -m)}
TAG=cyco
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 <<EOF > 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 *
makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.txz