slackbuilds/doc/modern_perl/modern_perl.SlackBuild

49 lines
994 B
Text
Raw Normal View History

2011-01-10 08:45:59 +01:00
#!/bin/sh
CWD=$(pwd)
PRGNAM=$(basename $CWD)
2011-01-10 08:48:20 +01:00
VERSION=${VERSION:-$(date +"%Y.%m.%d_%H.%M")}
BUILD=${BUILD:-1}
2011-01-10 08:48:20 +01:00
ARCH=${ARCH:-$(uname -m)}
2011-01-10 08:45:59 +01:00
TAG=cyco
TMP=${TMP:-/tmp/$TAG}
2011-01-10 08:48:20 +01:00
PKG=${PKG:-$TMP/pkg-$PRGNAM}
OUTPUT=${OUTPUT:-/tmp}
2011-01-10 08:45:59 +01:00
2011-01-10 08:48:20 +01:00
PREFIX=${PREFIX:-/usr}
2011-01-10 08:45:59 +01:00
2011-01-10 08:48:20 +01:00
FORMAT=${FORMAT:-a4} # or letter
2011-01-10 08:45:59 +01:00
# cleaning
rm -fr $PKG
# get sources
[ -e $CWD/modern_perl_$FORMAT.pdf ] && mv $CWD/modern_perl_$FORMAT.pdf $CWD/modern_perl_$FORMAT.pdf.orig
wget -c http://www.onyxneon.com/books/modern_perl/modern_perl_$FORMAT.pdf -O $CWD/modern_perl_$FORMAT.pdf
mkdir -p $PKG$PREFIX/doc/$PRGNAM
cp -R $CWD/modern_perl_$FORMAT.pdf $PKG$PREFIX/doc/$PRGNAM
2011-01-10 08:48:20 +01:00
cd $PKG
mkdir -p install
cat <<EOF > install/slack-desc
2011-01-10 08:45:59 +01:00
$PRGNAM: $PRGNAM («Modern Perl» book)
$PRGNAM:
$PRGNAM:
$PRGNAM:
$PRGNAM:
$PRGNAM:
$PRGNAM:
$PRGNAM:
$PRGNAM: http://www.modernperlbooks.com/
$PRGNAM: http://www.onyxneon.com/books/modern_perl/index.html
$PRGNAM:
EOF
2011-01-10 08:48:20 +01:00
chown -R root:root *
2011-01-10 08:45:59 +01:00
makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.txz