slackbuilds/l/sphinxcontrib-blockdiag/SlackBuild
Gwenhael Le Moine e181ecf65d
generic name for SlackBuild scripts
Signed-off-by: Gwenhael Le Moine <gwenhael.le.moine@gmail.com>
2018-03-14 09:35:32 +01:00

52 lines
1.1 KiB
Text
Executable file

#!/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