slackbuilds/l/sphinxcontrib-blockdiag/SlackBuild

53 lines
1.1 KiB
Text
Raw Normal View History

2013-03-31 15:47:16 +02:00
#!/bin/sh
CWD=$(pwd)
PRGNAM=$(basename $CWD)
VERSION=1.2.0
BUILD=1
ARCH=noarch
HOME=/home/cycojesus
TAG=cyco
OUTPUT=/tmp
TMP=/tmp/$TAG
PKG=$TMP/pkg-$PRGNAM
REPOSITORY=/home/installs/SlackBuilds/repositories/$PRGNAM
PREFIX=/usr
rm -fr $PKG $TMP/$PRGNAM-$VERSION
mkdir -p $TMP
[ -e $TMP/$PRGNAM-$VERSION ] && rm -fr $TMP/$PRGNAM-$VERSION
[ -e $PKG ] && rm -fr $PKG
# mise en place
cd $TMP
[ ! -e $CWD/$PRGNAM-$VERSION.tar.gz ] && wget -c https://pypi.python.org/packages/source/s/$PRGNAM/$PRGNAM-$VERSION.tar.gz -O $CWD/$PRGNAM-$VERSION.tar.gz
tar xf $CWD/$PRGNAM-$VERSION.tar.gz
cp -R $REPOSITORY $TMP/$PRGNAM-$VERSION
cd $TMP/$PRGNAM-$VERSION
python setup.py install --root $PKG
mkdir -p $PKG/install
cat <<EOF > $PKG/install
|-----handy-ruler------------------------------------------------------|
$PRGNAM: $PRGNAM (Sphinx extension)
$PRGNAM:
$PRGNAM:
$PRGNAM:
$PRGNAM:
$PRGNAM:
$PRGNAM:
$PRGNAM:
$PRGNAM:
$PRGNAM:
$PRGNAM: http://bitbucket.org/birkenfeld/sphinx-contrib
EOF
cd $PKG
makepkg -l y -c n $OUTPUT/$PRGNAM-$(echo $VERSION | tr - .)-$ARCH-$BUILD$TAG.txz