From af0d1ed65709c55351e2610494fa076252b55829 Mon Sep 17 00:00:00 2001 From: Benjamin Trigona-Harany Date: Sat, 30 Nov 2013 17:26:16 -0600 Subject: [PATCH] libraries/tre: Build python bindings Signed-off-by: Robby Workman --- libraries/tre/tre.SlackBuild | 32 ++++++++++++++++++-------------- 1 file changed, 18 insertions(+), 14 deletions(-) diff --git a/libraries/tre/tre.SlackBuild b/libraries/tre/tre.SlackBuild index 23ab2ecaea..504818c7c1 100644 --- a/libraries/tre/tre.SlackBuild +++ b/libraries/tre/tre.SlackBuild @@ -24,7 +24,7 @@ PRGNAM=tre VERSION=${VERSION:-0.8.0} -BUILD=${BUILD:-1} +BUILD=${BUILD:-2} TAG=${TAG:-_SBo} if [ -z "$ARCH" ]; then @@ -54,12 +54,14 @@ else LIBDIRSUFFIX="" fi +set -eu + rm -rf $PKG mkdir -p $TMP $PKG $OUTPUT -cd $TMP || exit 1 +cd $TMP rm -rf $PRGNAM-$VERSION -tar xvf $CWD/$PRGNAM-$VERSION.tar.?z* || exit 1 -cd $PRGNAM-$VERSION || exit 1 +tar xvf $CWD/$PRGNAM-$VERSION.tar.?z* +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 \) \ @@ -74,20 +76,22 @@ CFLAGS="$SLKCFLAGS" \ --sysconfdir=/etc \ --localstatedir=/var \ --mandir=/usr/man \ - --build=$ARCH-slackware-linux \ - || exit 1 + --build=$ARCH-slackware-linux -make || exit 1 -make install-strip DESTDIR=$PKG || exit 1 +make +make install-strip DESTDIR=$PKG -( cd $PKG/usr/man - find . -type f -exec gzip -9 {} \; - for i in $( find . -type l ) ; do ln -s $( readlink $i ).gz $i.gz ; rm $i ; done -) +cd python + CFLAGS="-I$PKG/usr/include" \ + LDFLAGS="-L$PKG/usr/lib$LIBDIRSUFFIX" \ + python setup.py install --root=$PKG +cd .. + +find $PKG/usr/man -type f -exec gzip -9 {} \; +for i in $( find $PKG/usr/man -type l ) ; do ln -s $( readlink $i ).gz $i.gz ; rm $i ; done mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION -cp -a ABOUT-NLS AUTHORS ChangeLog COPYING.LESSER INSTALL LICENSE NEWS README \ - THANKS TODO doc/*.html \ +cp -a AUTHORS ChangeLog INSTALL LICENSE NEWS README THANKS TODO doc/*.html \ $PKG/usr/doc/$PRGNAM-$VERSION cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild