aboutsummaryrefslogtreecommitdiffstats
path: root/community/pdftk
diff options
context:
space:
mode:
authorMichael Koloberdin <koloberdin@gmail.com>2016-08-31 18:51:29 +0000
committerNatanael Copa <ncopa@alpinelinux.org>2016-09-02 06:37:58 +0000
commita5bc3825d6501a37d34ba8f8fd19c14e7c11afe1 (patch)
tree903c1ff34d21f745b106d99a7aa95b234b6fa184 /community/pdftk
parentf326a73efc64ade7330f9d66212c7568493e4865 (diff)
downloadaports-a5bc3825d6501a37d34ba8f8fd19c14e7c11afe1.tar.bz2
aports-a5bc3825d6501a37d34ba8f8fd19c14e7c11afe1.tar.xz
community/pdftk: Move from testing
Diffstat (limited to 'community/pdftk')
-rw-r--r--community/pdftk/APKBUILD68
1 files changed, 68 insertions, 0 deletions
diff --git a/community/pdftk/APKBUILD b/community/pdftk/APKBUILD
new file mode 100644
index 0000000000..2d8b1df450
--- /dev/null
+++ b/community/pdftk/APKBUILD
@@ -0,0 +1,68 @@
+# Maintainer: Michael Koloberdin <koloberdin@gmail.com>
+pkgname=pdftk
+pkgver=2.02
+pkgrel=1
+pkgdesc="Pdftk is a simple tool for doing everyday things with PDF documents"
+url="http://www.pdfhacks.com/pdftk"
+arch="all"
+license="GPL"
+depends=""
+makedepends="gcc-java findutils"
+subpackages="$pkgname-doc"
+source="http://www.pdflabs.com/tools/pdftk-the-pdf-toolkit/${pkgname}-${pkgver}-src.zip"
+builddir="$srcdir/$pkgname-$pkgver-dist/$pkgname"
+
+prepare() {
+ cd "$builddir"
+ default_prepare
+ cat > Makefile.Alpine <<EOF
+# Based on https://aur.archlinux.org/cgit/aur.git/tree/Makefile.Arch?h=pdftk
+# Which is in turn based on 'Makefile.Debian', part of pdftk
+# Copyright (c) 2004-2012 Sid Steward
+
+export CXX= g++
+export GCJ= gcj
+export GCJH= gcjh
+export GJAR= gjar
+export LIBGCJ= \`find /usr/share/java -type f -regex '/usr/share/java/libgcj-[0-9].*\\.jar'\`
+export AR= ar
+export RM= rm
+export ARFLAGS= rs
+export RMFLAGS= -vf
+export CPPFLAGS= -DPATH_DELIM=0x2f -DASK_ABOUT_WARNINGS=false -DUNBLOCK_SIGNALS -fdollars-in-identifiers -fPIC
+export CXXFLAGS= $CXXFLAGS -fPIC
+export GCJFLAGS= -Wno-all -fsource=1.3 -O2 -fPIC
+export GCJHFLAGS= -force
+export LDLIBS= -lgcj
+
+include Makefile.Base
+EOF
+}
+
+build() {
+ cd "$builddir"
+ make -j1 -f Makefile.Alpine || return 1
+}
+
+package() {
+ cd "$builddir"
+
+ # Install binary
+ install -D -m 755 pdftk $pkgdir/usr/bin/pdftk || return 1
+
+ # Install licenses and adjust permissions
+ cd ..
+ LICENSE_DIR="$pkgdir/usr/share/licenses/$pkgname"
+ mkdir -p "$LICENSE_DIR" || return 1
+ cp -R license_gpl_pdftk/* "$LICENSE_DIR" || return 1
+ chmod -R 0755 "$LICENSE_DIR" || return 1
+ find "$LICENSE_DIR" -type f -exec chmod -x {} \; || return 1
+
+ # Install manpage
+ install -D -m 644 "pdftk.1" "$pkgdir/usr/share/man/man1/pdftk.1" \
+ || return 1
+}
+
+md5sums="6534365fd6727724f288a556ede33faa pdftk-2.02-src.zip"
+sha256sums="118f6a25fd3acaafb58824dce6f97cdc07e56050e666b90e4c4ef426ea37b8c1 pdftk-2.02-src.zip"
+sha512sums="5c73ab3b7b12cfc24a17c2737d224fdde2ae684e1712031a968b83f5b8d91c521d477e932fc47f8b4a8c0ff0ba183678aaa13a1e7b29107c5c47ded8d960ef54 pdftk-2.02-src.zip"