From 16a27c5f8b75ac6b634fcd33e691c2cdf5e26b8d Mon Sep 17 00:00:00 2001 From: Gwenhael Le Moine Date: Tue, 13 Jul 2010 10:06:38 +0700 Subject: [PATCH] add Higher-Order Perl book --- .../HigherOrderPerl.SlackBuild | 48 +++++++++++++++++++ 1 file changed, 48 insertions(+) create mode 100755 doc/HigherOrderPerl/HigherOrderPerl.SlackBuild diff --git a/doc/HigherOrderPerl/HigherOrderPerl.SlackBuild b/doc/HigherOrderPerl/HigherOrderPerl.SlackBuild new file mode 100755 index 00000000..ad13a43a --- /dev/null +++ b/doc/HigherOrderPerl/HigherOrderPerl.SlackBuild @@ -0,0 +1,48 @@ +#!/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/http://hop.perl.plover.com/book/pdf/HigherOrderPerl.pdf ] && mv $CWD/HigherOrderPerl.pdf $CWD/HigherOrderPerl.pdf.orig +wget -c http://hop.perl.plover.com/book/pdf/HigherOrderPerl.pdf -O $CWD/HigherOrderPerl.pdf +[ -e $CWD/http://hop.perl.plover.com/book/pdf/HigherOrderPerl-trimmed.pdf ] && mv $CWD/HigherOrderPerl-trimmed.pdf $CWD/HigherOrderPerl-trimmed.pdf.orig +wget -c http://hop.perl.plover.com/book/pdf/HigherOrderPerl-trimmed.pdf -O $CWD/HigherOrderPerl-trimmed.pdf + +mkdir -p $PKG$PREFIX/doc/$PRGNAM +cp -R $CWD/HigherOrderPerl*.pdf $PKG$PREFIX/doc/$PRGNAM + +( cd $PKG + mkdir -p install + cat < install/slack-desc +$PRGNAM: $PRGNAM («Higher-Order Perl» book) +$PRGNAM: +$PRGNAM: +$PRGNAM: +$PRGNAM: +$PRGNAM: +$PRGNAM: +$PRGNAM: +$PRGNAM: +$PRGNAM: http://hop.perl.plover.com/book/ +$PRGNAM: +EOF + + chown -R root:root * + + makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$PACKAGER.txz +)