updated on Fri Jan 6 08:01:17 UTC 2012
[aur-mirror.git] / pdftk / PKGBUILD
blob67d9f574854b523b15848cd1f9188269a989533c
1 # Contributor: osc
2 # Maintainer: larsrh <hupel@in.tum.de>
4 pkgname=pdftk
5 pkgver=1.44
6 pkgrel=4
7 pkgdesc="Pdftk is a simple tool for doing everyday things with PDF documents"
8 arch=('i686' 'x86_64')
9 url="http://www.pdfhacks.com/pdftk"
10 license="GPL"
11 depends=('gcc-gcj>=4.6.0')
12 options=('!makeflags')
13 source=("http://www.pdflabs.com/tools/pdftk-the-pdf-toolkit/${pkgname}-${pkgver}-src.zip"
14         "makefile.patch")
15 md5sums=('9eb50fffcd621a627d387750c60982b4'
16          '0367cbace0938669c614f2e99c3ec882')
18 build() {
19         cd $srcdir/$pkgname-$pkgver-dist
21         # Apply makefile patch
22         patch -p1 < $srcdir/makefile.patch
24         # Compile the package
25         cd $pkgname
26         make -f Makefile.Debian
28         # Install binary
29         install -D -m 755 pdftk $pkgdir/usr/bin/pdftk
31         # Install licenses and adjust permissions
32         cd ..
33         LICENSE_DIR="$pkgdir/usr/share/licenses/$pkgname"
34         mkdir -p "$LICENSE_DIR"
35         cp -R license_gpl_pdftk/* "$LICENSE_DIR"
36         chmod -R 0755 "$LICENSE_DIR"
37         find "$LICENSE_DIR" -type f -exec chmod -x {} \;
39         # Install manpage
40         install -D -m 644 "pdftk.1" "$pkgdir/usr/man/man1/pdftk.1"