Skip to content

Instantly share code, notes, and snippets.

@larsrh
Created April 7, 2013 16:41
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save larsrh/5331230 to your computer and use it in GitHub Desktop.
Save larsrh/5331230 to your computer and use it in GitHub Desktop.
pdftk PKGBUILD for Pacman <4.1
# Contributor: osc
# Contributor: StefanHusmann
# Maintainer: larsrh <hupel@in.tum.de>
pkgname=pdftk
pkgver=1.45
pkgrel=2
pkgdesc="Pdftk is a simple tool for doing everyday things with PDF documents"
arch=('i686' 'x86_64')
url="http://www.pdfhacks.com/pdftk"
license="GPL"
depends=('gcc-gcj>=4.8.0' 'gcc-gcj-ecj')
options=('!makeflags')
source=(
"http://www.pdflabs.com/tools/pdftk-the-pdf-toolkit/${pkgname}-${pkgver}-src.zip"
"Makefile.Arch"
)
sha1sums=(
"a46aada9ea212c17fd38c5a047aeaee7eebe5351"
"95d55ad8ea8dfcb44bdd4af3954868ca10b1cad1"
)
build() {
cd "$srcdir/$pkgname-$pkgver-dist/$pkgname"
cp "$srcdir/Makefile.Arch" .
make -f Makefile.Arch
}
package() {
cd "$srcdir/$pkgname-$pkgver-dist/$pkgname"
# Install binary
install -D -m 755 pdftk $pkgdir/usr/bin/pdftk
# Install licenses and adjust permissions
cd ..
LICENSE_DIR="$pkgdir/usr/share/licenses/$pkgname"
mkdir -p "$LICENSE_DIR"
cp -R license_gpl_pdftk/* "$LICENSE_DIR"
chmod -R 0755 "$LICENSE_DIR"
find "$LICENSE_DIR" -type f -exec chmod -x {} \;
# Install manpage
install -D -m 644 "pdftk.1" "$pkgdir/usr/share/man/man1/pdftk.1"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment