From ebfddf6a5f91782b3dc9624771b73c03b1764249 Mon Sep 17 00:00:00 2001 From: Gwenhael Le Moine Date: Wed, 28 Apr 2010 10:17:48 +0700 Subject: [PATCH] Added. --- .../a-byte-of-python.SlackBuild | 49 +++++++++++++++++++ 1 file changed, 49 insertions(+) create mode 100755 doc/a-byte-of-python/a-byte-of-python.SlackBuild diff --git a/doc/a-byte-of-python/a-byte-of-python.SlackBuild b/doc/a-byte-of-python/a-byte-of-python.SlackBuild new file mode 100755 index 00000000..9f5a5e47 --- /dev/null +++ b/doc/a-byte-of-python/a-byte-of-python.SlackBuild @@ -0,0 +1,49 @@ +#!/bin/sh + +CWD=$(pwd) + +PRGNAM=$(basename $CWD) +VERSION=$(date +"%Y.%m.%d_%H.%M") +BUILD=1 +PACKAGER=cyco +ARCH=$(uname -m) + +TMP=/tmp/$PACKAGER +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 < 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$PACKAGER.txz +)