#Packager: George Vlahavas <vlahavas~at~gmail~dot~com>

pkgname=pdftk
pkgver=2.02
pkgrel=2gv
source=("http://www.pdflabs.com/tools/pdftk-the-pdf-toolkit/pdftk-$pkgver-src.zip" "pdftk-1.44-add_custom_optflags.patch")
docs=("readme" "install" "copying" "changelog" "authors" "news" "todo" "pdftk.1.txt" "pdftk.1.html" "pdftk.1.notes")
url=http://www.accesspdf.com/pdftk/

slackdesc=\
(
#|-----handy-ruler------------------------------------------------------|
"pdftk (pdf toolkit)"
"If PDF is electronic paper, then pdftk is an electronic"
"staple-remover, hole-punch, binder, secret-decoder-ring, and"
"X-Ray-glasses. Pdftk is a command-line tool for doing everyday things"
"with PDF documents. Keep one in the top drawer of your desktop and use"
"it to: Merge PDF documents, split PDF documents, apply watermark,"
"repair corrupt PDF, update PDF metadata and much more. pdftk does not"
"require Acrobat and is free software (GPL)."
)


build() {
	cd $startdir/src/$pkgname-$pkgver-dist

	# Use our CFLAGS
	patch -p1 < $startdir/src/pdftk-1.44-add_custom_optflags.patch || exit 1

	cd pdftk
	make OPT="$CFLAGS" -f Makefile.Slackware-13.1
	mkdir -p $startdir/pkg/usr/bin
	cp pdftk $startdir/pkg/usr/bin
	cd ..
	mkdir -p $startdir/pkg/usr/man/man1
	cp pdftk.1 $startdir/pkg/usr/man/man1
}