slackbuilds/doc/a-byte-of-python/a-byte-of-python.SlackBuild

51 lines
1.1 KiB
Text
Raw Normal View History

2010-04-28 05:17:48 +02:00
#!/bin/sh
CWD=$(pwd)
PRGNAM=$(basename $CWD)
VERSION=$(date +"%Y.%m.%d_%H.%M")
BUILD=1
2010-04-28 05:17:48 +02:00
ARCH=$(uname -m)
TAG=cyco
TMP=/tmp/$TAG
2010-04-28 05:17:48 +02:00
PKG=$TMP/pkg-$PRGNAM
OUTPUT=/tmp
PREFIX=/usr
# cleaning
rm -fr $PKG
# get sources
[ -e $CWD/byteofpython_120.pdf ] && mv $CWD/byteofpython_120.pdf $CWD/byteofpython_120.pdf.orig
wget -c http://www.ibiblio.org/swaroopch/byteofpython/files/120/byteofpython_120.pdf -O $CWD/byteofpython_120.pdf
[ -e $CWD/byteofpython_v192.pdf ] && mv $CWD/byteofpython_v192.pdf $CWD/byteofpython_v192.pdf.orig
wget -c http://www.swaroopch.com/files/byteofpython/byte_of_python_v192.pdf -O $CWD/byteofpython_v192.pdf
mkdir -p $PKG$PREFIX/doc/$PRGNAM
cp -R $CWD/byteofpython_120.pdf $PKG$PREFIX/doc/$PRGNAM
cp -R $CWD/byteofpython_v192.pdf $PKG$PREFIX/doc/$PRGNAM
( cd $PKG
mkdir -p install
cat <<EOF > install/slack-desc
$PRGNAM: $PRGNAM («A Byte of Python» book)
$PRGNAM:
$PRGNAM:
$PRGNAM:
$PRGNAM:
$PRGNAM:
$PRGNAM:
$PRGNAM:
$PRGNAM:
$PRGNAM: http://www.swaroopch.com/notes/Python
$PRGNAM:
EOF
chown -R root:root *
makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.txz
2010-04-28 05:17:48 +02:00
)