diff options
Diffstat (limited to 'community/pdftrans')
-rw-r--r-- | community/pdftrans/PKGBUILD | 26 | ||||
-rwxr-xr-x | community/pdftrans/pdftrans.sh | 15 |
2 files changed, 41 insertions, 0 deletions
diff --git a/community/pdftrans/PKGBUILD b/community/pdftrans/PKGBUILD new file mode 100644 index 000000000..59a1970a2 --- /dev/null +++ b/community/pdftrans/PKGBUILD @@ -0,0 +1,26 @@ +# Contributor: Jaroslaw Swierczynski <swiergot@aur.archlinux.org> + +pkgname=pdftrans +pkgver=1.2 +pkgrel=7 +arch=('i686' 'x86_64') +pkgdesc="A utility to add metadata, protect, and encrypt PDF documents" +url="http://maddingue.free.fr/softwares/pdftrans.html.en" +license=('GPL') +depends=('java-runtime' 'itext' 'bcprov') +source=(http://maddingue.free.fr/softwares/download/PDFTrans/$pkgname-$pkgver.zip \ + $pkgname.sh) +md5sums=('1d3677f7101ba5e27492b02843017d26' '1be06ba6669dfd895aadbd308f37715a') + +build() { + install -D $pkgname.sh $pkgdir/usr/bin/$pkgname + + cd $pkgname + + # fix http://bugs.archlinux.org/task/19295 FS#19295 - [pdftrans] needs updating to follow itext java class renaming + sed 's/lowagie/itextpdf/' -i src/PDFTrans.java + javac -classpath /usr/share/java/itext/itext.jar -d classes src/PDFTrans.java + + install -D -m644 classes/PDFTrans.class $pkgdir/usr/share/java/$pkgname/PDFTrans.class + install -D -m644 doc/pdftrans.1 $pkgdir/usr/share/man/man1/pdftrans.1 +} diff --git a/community/pdftrans/pdftrans.sh b/community/pdftrans/pdftrans.sh new file mode 100755 index 000000000..bf6c88161 --- /dev/null +++ b/community/pdftrans/pdftrans.sh @@ -0,0 +1,15 @@ +#!/bin/sh + +PROG_NAME=pdftrans +PROG_MAIN=PDFTrans + +CP=/usr/share/java/$PROG_NAME + +for jar in /usr/share/java/$PROG_NAME/*.jar; do + CP=$CP:$jar +done + +CP=$CP:/usr/share/java/itext/itext.jar +CP=$CP:/usr/share/java/bcprov.jar + +java -cp $CP $PROG_MAIN "$@" |