53 lines
1.1 KiB
Text
Executable file
53 lines
1.1 KiB
Text
Executable file
#!/bin/sh
|
|
|
|
CWD=$(pwd)
|
|
PRGNAM=$(basename $CWD)
|
|
VERSION=1.2.0
|
|
BUILD=1
|
|
|
|
ARCH=noarch
|
|
|
|
HOME=/home/gwh
|
|
TAG=gwh
|
|
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
|
|
rm -f $PKG/{,usr/}lib$(uname -m | grep -o 64)/*.la
|
|
/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$(echo $VERSION | tr - .)-$ARCH-$BUILD$TAG.txz
|
|
|