updated on Thu Jan 26 16:09:46 UTC 2012
[aur-mirror.git] / pdftk-bin / PKGBUILD
blob514d6cae9430d73ab5ee50dd03a5aaf3cf10044b
1 # Maintainer: Dan Serban
2 # Contributor: Liu Chang <goduck777@gmail.com>
4 pkgname=pdftk-bin
5 pkgver=1.44
6 pkgrel=4
7 pkgdesc="PDFTK, built from binary executables available in Debian repositories"
8 url=http://www.pdflabs.com/tools/pdftk-the-pdf-toolkit/
9 arch=(i686 x86_64)
10 license=(GPL)
11 makedepends=(lynx)
12 provides=(pdftk)
13 conflicts=(pdftk pdfchain-all-inclusive)
14 _filearch=i386
15 [ "${CARCH}" == "x86_64" ] && _filearch=amd64
17 build()
19   _url_prefix="http://ftp.nl.debian.org/debian/pool/main"
21   # --- pdftk ---
22   rm pdftk_*.deb 2>/dev/null || true
23   _url=$(lynx -dump ${_url_prefix}/p/pdftk/ | grep -o http.*/pdftk_.*_${_filearch}\.deb | tail -1)
24   wget ${_url}
25   bsdtar -xf $(basename ${_url}) data.tar.gz
26   bsdtar -xf data.tar.gz -C "${pkgdir}"
27   rm data.tar.gz
29   # --- libgcj12 ---
30   rm libgcj12_*.deb 2>/dev/null || true
31   _url=$(lynx -dump ${_url_prefix}/g/gcj-4.6/ | grep -o http.*/libgcj12_.*_${_filearch}\.deb | tail -1)
32   wget ${_url}
33   bsdtar -xf $(basename ${_url}) data.tar.gz
34   bsdtar -xf data.tar.gz || true
35   rm data.tar.gz
36   install -Dm755 $(find usr/lib -type f | grep libgcj.so) "${pkgdir}"/usr/lib/libgcj.so.12
37   rm -r usr