diff options
Diffstat (limited to 'office/pdftk/pdftk.SlackBuild')
-rw-r--r-- | office/pdftk/pdftk.SlackBuild | 37 |
1 files changed, 22 insertions, 15 deletions
diff --git a/office/pdftk/pdftk.SlackBuild b/office/pdftk/pdftk.SlackBuild index f30a19af762b5..ea53db950691e 100644 --- a/office/pdftk/pdftk.SlackBuild +++ b/office/pdftk/pdftk.SlackBuild @@ -2,7 +2,7 @@ # Slackware build script for pdftk -# Copyright 2006-2007 Yalla-One <yallaone@gmail.com> +# Copyright 2006-2009 Yalla-One <yallaone@gmail.com> # All rights reserved. # # Redistribution and use of this script, with or without modification, is @@ -23,12 +23,15 @@ # ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. # Modified by the SlackBuilds.org project +# THANK YOU to Martinezio from LinuxQuestions.org for the patch to make this +# work on Slackware64 13.0 PRGNAM=pdftk VERSION=1.41 ARCH=${ARCH:-i486} -BUILD=${BUILD:-1} +BUILD=${BUILD:-2} TAG=${TAG:-_SBo} + CWD=$(pwd) TMP=${TMP:-/tmp/SBo} PKG=$TMP/package-$PRGNAM @@ -50,27 +53,31 @@ case "$ARCH" in ;; esac +set -e + rm -rf $PKG mkdir -p $TMP $PKG $OUTPUT -cd $TMP || exit 1 +cd $TMP rm -rf $PRGNAM-$VERSION -tar -xvf $CWD/$PRGNAM-$VERSION.tar.bz2 || exit 1 -cd $PRGNAM-$VERSION || exit 1 +tar xvf $CWD/$PRGNAM-$VERSION.tar.bz2 +cd $PRGNAM-$VERSION chown -R root:root . chmod -R a-s,u+w,go+r-w . -cd $PRGNAM -CFLAGS="$SLKCFLAGS" \ -CXXFLAGS="$SLKCFLAGS" \ -make -f Makefile.Generic || exit 1 - -mkdir -p $PKG/usr/{bin,man/man1,doc/$PRGNAM-$VERSION} +# Fix build on x86_64 +patch -p1 <$CWD/pdftk-1.41-slackware64-13.patch -cp -a pdftk $PKG/usr/bin -strip --strip-unneeded $PKG/usr/bin/pdftk 2> /dev/null +# Use our SLKCFLAGS +patch -p1 < $CWD/pdftk-1.41-add_custom_optflags.patch +cd $PRGNAM + make OPT="$SLKCFLAGS" -f Makefile.Generic + mkdir -p $PKG/usr/{bin,man/man1,doc/$PRGNAM-$VERSION} + cp -a pdftk $PKG/usr/bin + strip --strip-unneeded $PKG/usr/bin/pdftk 2> /dev/null cd .. -cat debian/pdftk.1 | gzip -9c > $PKG/usr/man/man1/pdftk.1.gz + +gzip -9c debian/pdftk.1 > $PKG/usr/man/man1/pdftk.1.gz cat pdftk.1.txt > $PKG/usr/doc/$PRGNAM-$VERSION/pdftk.1.txt cat pdftk.1.html > $PKG/usr/doc/$PRGNAM-$VERSION/pdftk.1.html cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild @@ -79,4 +86,4 @@ 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.tgz +/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz} |