51 lines
786 B
Text
51 lines
786 B
Text
|
#!/bin/sh
|
||
|
|
||
|
CWD=$(pwd)
|
||
|
|
||
|
PRGNAM=$(basename $CWD)
|
||
|
VERSION=5.4
|
||
|
BUILD=1
|
||
|
PACKAGER=cyco
|
||
|
ARCH=noarch
|
||
|
|
||
|
TMP=/tmp/$PACKAGER
|
||
|
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$PACKAGER.txz
|
||
|
)
|