1

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

Michael Koloberdin
Details
Message ID
<20160808051357.2998-1-koloberdin@gmail.com>
Sender timestamp
1470633237
DKIM signature
missing
Download raw message
Patch: +71 -0
---
 testing/pdftk/APKBUILD        | 51 +++++++++++++++++++++++++++++++++++++++++++
 testing/pdftk/Makefile.Alpine | 20 +++++++++++++++++
 2 files changed, 71 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..c61382e
--- /dev/null
+++ b/testing/pdftk/APKBUILD
@@ -0,0 +1,51 @@
+# Maintainer: Michael Koloberdin <koloberdin@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
+}
+
+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
@@ -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@lists.alpinelinux.org
Help:         alpine-aports+help@lists.alpinelinux.org
---
Natanael Copa
Details
Message ID
<20160819153758.4b9d3bbd@ncopa-macbook.copa.dup.pw>
In-Reply-To
<20160808051357.2998-1-koloberdin@gmail.com> (view parent)
Sender timestamp
1471646278
DKIM signature
missing
Download raw message
On Mon,  8 Aug 2016 05:13:57 +0000
Michael Koloberdin <koloberdin@gmail.com> wrote:

> ---
>  testing/pdftk/APKBUILD        | 51 +++++++++++++++++++++++++++++++++++++++++++
>  testing/pdftk/Makefile.Alpine | 20 +++++++++++++++++
>  2 files changed, 71 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..c61382e
> --- /dev/null
> +++ b/testing/pdftk/APKBUILD
> @@ -0,0 +1,51 @@
> +# Maintainer: Michael Koloberdin <koloberdin@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"

you don't need explicitly add libgcj to depends. abuild will do this
for you:

>>> pdftk*: Tracing dependencies...
        libgcj
        so:libc.musl-x86_64.so.1
        so:libgcc_s.so.1
        so:libgcj.so.17
        so:libstdc++.so.6

as you see abuild will add a depend=so:libgcj.so.17. abuild will also
make sure that whatever package that has the libgcj.so.17 will also
have a provides=so:libgcj.so.17. That way we don't need to modify the
depend="libgcj" in pdftk if the library moves to another package.

In other words: abuild manages shared libraries and you don't specify
the depend.

I removed it for you.

I also converted the Makefile.Alpine to a heredoc.

Thanks!

-nc


---
Unsubscribe:  alpine-aports+unsubscribe@lists.alpinelinux.org
Help:         alpine-aports+help@lists.alpinelinux.org
---