Mail archive
alpine-aports

[alpine-aports] [PATCH] testing/pdftk: new aport

From: Michael Koloberdin <koloberdin_at_gmail.com>
Date: Mon, 8 Aug 2016 03:50:43 +0000

---
 testing/pdftk/APKBUILD        | 52 +++++++++++++++++++++++++++++++++++++++++++
 testing/pdftk/Makefile.Alpine | 20 +++++++++++++++++
 2 files changed, 72 insertions(+)
 create mode 100644 testing/pdftk/APKBUILD
 create mode 100644 testing/pdftk/Makefile.Alpine
diff --git a/testing/pdftk/APKBUILD b/testing/pdftk/APKBUILD
new file mode 100644
index 0000000..22c0c85
--- /dev/null
+++ b/testing/pdftk/APKBUILD
_at_@ -0,0 +1,52 @@
+# Maintainer: Michael Koloberdin <koloberdin_at_gmail.com>
+pkgname=pdftk
+pkgver=2.02
+pkgrel=0
+pkgdesc="Pdftk is a simple tool for doing everyday things with PDF documents"
+url="http://www.pdfhacks.com/pdftk"
+arch="all"
+license="GPL"
+depends="libgcj"
+makedepends="gcc-java findutils"
+subpackages="$pkgname-doc"
+source="http://www.pdflabs.com/tools/pdftk-the-pdf-toolkit/${pkgname}-${pkgver}-src.zip
+	Makefile.Alpine"
+builddir="$srcdir/$pkgname-$pkgver-dist/$pkgname"
+
+prepare() {
+	cd "$builddir"
+	default_prepare
+	cp "$srcdir/Makefile.Alpine" . || return 1
+	pwdzz=`pwd`
+}
+
+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
+6fe81d883870c26cb5d0239fa62b205f  Makefile.Alpine"
+sha256sums="118f6a25fd3acaafb58824dce6f97cdc07e56050e666b90e4c4ef426ea37b8c1  pdftk-2.02-src.zip
+77f545276a1313cc11f09f3a0c7d19ce754e3951c19d96230e8122768866f7ca  Makefile.Alpine"
+sha512sums="5c73ab3b7b12cfc24a17c2737d224fdde2ae684e1712031a968b83f5b8d91c521d477e932fc47f8b4a8c0ff0ba183678aaa13a1e7b29107c5c47ded8d960ef54  pdftk-2.02-src.zip
+d5a0b70eb042c4fed9ab9b4027a8e706883dcf0b13f1cb8b052dd9d01f41de6227143c095011957a3c73bae14b3b8d4a9e2608560aa8153356e963feee3ea85b  Makefile.Alpine"
diff --git a/testing/pdftk/Makefile.Alpine b/testing/pdftk/Makefile.Alpine
new file mode 100644
index 0000000..1ef423e
--- /dev/null
+++ b/testing/pdftk/Makefile.Alpine
_at_@ -0,0 +1,20 @@
+# 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
+export CXXFLAGS= -O2
+export GCJFLAGS= -Wno-all -fsource=1.3 -O2
+export GCJHFLAGS= -force
+export LDLIBS= -lgcj
+
+include Makefile.Base
-- 
2.9.1
---
Unsubscribe:  alpine-aports+unsubscribe_at_lists.alpinelinux.org
Help:         alpine-aports+help_at_lists.alpinelinux.org
---
Received on Mon Aug 08 2016 - 03:50:43 GMT