diff options
author | B. Watson <yalhcru@gmail.com> | 2017-04-04 15:02:26 +0100 |
---|---|---|
committer | Willy Sudiarto Raharjo <willysr@slackbuilds.org> | 2017-04-08 06:57:43 +0700 |
commit | 8917195434f715a225b1618329b11b48f5fd876b (patch) | |
tree | 37ccd7864fc3f415b20bfd978bc528048cfefdc9 /python/python-djvulibre/python-djvulibre.SlackBuild | |
parent | 2ff9ae3186665ec3552c12741b0dfe33d09db2b2 (diff) | |
download | slackbuilds-8917195434f715a225b1618329b11b48f5fd876b.tar.gz |
python/python-djvulibre: Added (python bindings for djvulibre).
Signed-off-by: David Spencer <idlemoor@slackbuilds.org>
Diffstat (limited to 'python/python-djvulibre/python-djvulibre.SlackBuild')
-rw-r--r-- | python/python-djvulibre/python-djvulibre.SlackBuild | 62 |
1 files changed, 62 insertions, 0 deletions
diff --git a/python/python-djvulibre/python-djvulibre.SlackBuild b/python/python-djvulibre/python-djvulibre.SlackBuild new file mode 100644 index 0000000000..0121e2bdd2 --- /dev/null +++ b/python/python-djvulibre/python-djvulibre.SlackBuild @@ -0,0 +1,62 @@ +#!/bin/sh + +# Slackware build script for python-djvulibre + +# Written by B. Watson (yalhcru@gmail.com) + +# Licensed under the WTFPL. See http://www.wtfpl.net/txt/copying/ for details. + +PRGNAM=python-djvulibre +VERSION=${VERSION:-0.8} +BUILD=${BUILD:-1} +TAG=${TAG:-_SBo} + +if [ -z "$ARCH" ]; then + case "$( uname -m )" in + i?86) ARCH=i586 ;; + arm*) ARCH=arm ;; + *) ARCH=$( uname -m ) ;; + esac +fi + +CWD=$(pwd) +TMP=${TMP:-/tmp/SBo} +PKG=$TMP/package-$PRGNAM +OUTPUT=${OUTPUT:-/tmp} + +# Not bothering with SLKCFLAGS and LIBDIRSUFFIX as there's no obvious +# way to pass them to setup.py, and also because -O3 -fPIC is already +# the default (I assume upstream tests with -O3 so no reason to +# force -O2). Most SBo python SlackBuilds seem to set SLKCFLAGS and +# LIBDIRSUFFIX, then never use them, so the template might need to +# be updated... + +set -e + +rm -rf $PKG +mkdir -p $TMP $PKG $OUTPUT +cd $TMP +rm -rf $PRGNAM-$VERSION +tar xvf $CWD/$PRGNAM-$VERSION.tar.gz +cd $PRGNAM-$VERSION +chown -R root:root . +find -L . \ + \( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \ + -o -perm 511 \) -exec chmod 755 {} \; -o \ + \( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \ + -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \; + +python setup.py install --root=$PKG + +find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | grep ELF \ + | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true + +mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION +cp -a doc/* examples $PKG/usr/doc/$PRGNAM-$VERSION +cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild + +mkdir -p $PKG/install +cat $CWD/slack-desc > $PKG/install/slack-desc + +cd $PKG +/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz} |