aboutsummaryrefslogtreecommitdiff
path: root/office/pdftk/pdftk.SlackBuild
diff options
context:
space:
mode:
authorArTourter <artourter@gmail.com>2010-11-29 21:54:55 -0600
committerRobby Workman <rworkman@slackbuilds.org>2010-12-05 20:01:48 -0600
commit490a6320980886687f1a34d372ec36927f4dd9a2 (patch)
tree4ea59328f043aa9bc960c59bc0dfe46bda41e422 /office/pdftk/pdftk.SlackBuild
parent31547ab4fb04017b5d01feb83c9cdd701982de88 (diff)
office/pdftk: Updated for version 1.44.
Signed-off-by: Robby Workman <rworkman@slackbuilds.org>
Diffstat (limited to 'office/pdftk/pdftk.SlackBuild')
-rw-r--r--office/pdftk/pdftk.SlackBuild67
1 files changed, 35 insertions, 32 deletions
diff --git a/office/pdftk/pdftk.SlackBuild b/office/pdftk/pdftk.SlackBuild
index ea53db950691..88f6148bd36e 100644
--- a/office/pdftk/pdftk.SlackBuild
+++ b/office/pdftk/pdftk.SlackBuild
@@ -2,6 +2,7 @@
# Slackware build script for pdftk
+# Copyright 2010 Gregory J. L. Tourte <artourter@gmail.com>
# Copyright 2006-2009 Yalla-One <yallaone@gmail.com>
# All rights reserved.
#
@@ -22,64 +23,66 @@
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
# 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
+# 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:-2}
+VERSION=${VERSION:-1.44}
+BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
+if [ -z "$ARCH" ]; then
+ case "$( uname -m )" in
+ i?86) ARCH=i486 ;;
+ arm*) ARCH=arm ;;
+ *) ARCH=$( uname -m ) ;;
+ esac
+fi
+
CWD=$(pwd)
TMP=${TMP:-/tmp/SBo}
PKG=$TMP/package-$PRGNAM
OUTPUT=${OUTPUT:-/tmp}
-case "$ARCH" in
- i486) SLKCFLAGS="-O2 -march=i486 -mtune=i686"
- ;;
- i686) SLKCFLAGS="-O2 -march=i686 -mtune=i686"
- ;;
- s390) SLKCFLAGS="-O2"
- ;;
- powerpc) SLKCFLAGS="-O2"
- ;;
- x86_64) SLKCFLAGS="-O2 -fPIC"
- SLKLDFLAGS="-L/usr/lib64"; LIBDIRSUFFIX="64"
- ;;
- athlon-xp) SLKCFLAGS="-march=athlon-xp -O3 -pipe -fomit-frame-pointer"
- ;;
-esac
+if [ "$ARCH" = "i486" ]; then
+ SLKCFLAGS="-O2 -march=i486 -mtune=i686"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "i686" ]; then
+ SLKCFLAGS="-O2 -march=i686 -mtune=i686"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "x86_64" ]; then
+ SLKCFLAGS="-O2 -fPIC"
+ LIBDIRSUFFIX="64"
+else
+ SLKCFLAGS="-O2"
+ LIBDIRSUFFIX=""
+fi
set -e
rm -rf $PKG
mkdir -p $TMP $PKG $OUTPUT
cd $TMP
-rm -rf $PRGNAM-$VERSION
-tar xvf $CWD/$PRGNAM-$VERSION.tar.bz2
-cd $PRGNAM-$VERSION
+rm -rf $PRGNAM-$VERSION-dist
+unzip $CWD/$PRGNAM-$VERSION-src.zip
+cd $PRGNAM-$VERSION-dist
chown -R root:root .
chmod -R a-s,u+w,go+r-w .
-# Fix build on x86_64
-patch -p1 <$CWD/pdftk-1.41-slackware64-13.patch
-
# Use our SLKCFLAGS
-patch -p1 < $CWD/pdftk-1.41-add_custom_optflags.patch
+patch -p1 < $CWD/pdftk-1.44-add_custom_optflags.patch
cd $PRGNAM
- make OPT="$SLKCFLAGS" -f Makefile.Generic
+ make OPT="$SLKCFLAGS" -f Makefile.Slackware-13.1
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 ..
-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
+gzip -9c pdftk.1 > $PKG/usr/man/man1/pdftk.1.gz
+cp -a \
+ pdftk.1.* changelog.* license_gpl_pdftk \
+ $PKG/usr/doc/$PRGNAM-$VERSION/
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
mkdir -p $PKG/install