2d3c96f8e7
Signed-off-by: Gwenhael Le Moine <gwenhael.le.moine@gmail.com>
51 lines
772 B
Bash
Executable file
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
|
|
)
|