slackbuilds/doc/diveintopython/diveintopython.SlackBuild
Gwenhael Le Moine 2d3c96f8e7 replace TMP by OUTPUT
Signed-off-by: Gwenhael Le Moine <gwenhael.le.moine@gmail.com>
2011-02-17 11:54:04 +07:00

51 lines
772 B
Bash
Executable file

#!/bin/sh
CWD=$(pwd)
PRGNAM=$(basename $CWD)
VERSION=5.4
BUILD=1
ARCH=noarch
TAG=cyco
TMP=/tmp/$TAG
PKG=$TMP/pkg-$PRGNAM
OUTPUT=/tmp
PREFIX=/usr
# cleaning
rm -fr $PKG
# get sources
[ ! -e $CWD/$PRGNAM-html-$VERSION.zip ] && \
wget -c http://diveintopython.org/download/$PRGNAM-html-$VERSION.zip \
-O $CWD/$PRGNAM-html-$VERSION.zip
mkdir -p $PKG$PREFIX/doc/
( cd $PKG$PREFIX/doc/
unzip $CWD/$PRGNAM-html-$VERSION.zip
)
( cd $PKG
mkdir -p install
cat <<EOF > install/slack-desc
$PRGNAM: $PRGNAM (a book about Python)
$PRGNAM:
$PRGNAM:
$PRGNAM:
$PRGNAM:
$PRGNAM:
$PRGNAM:
$PRGNAM:
$PRGNAM:
$PRGNAM: http://diveintopython.org
$PRGNAM:
EOF
chown -R root:root *
makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.txz
)