updated on Thu Jan 12 12:00:22 UTC 2012
[aur-mirror.git] / portablesigner-bin / PKGBUILD
blobf1b732f34bce0abf285e8c836d9bde3ceb65b5a5
1 # Contributor: Tom < tomgparchaur at gmail dot com >
2 pkgname=portablesigner-bin
3 pkgver=1.8.126
4 pkgrel=1
5 pkgdesc="Signing (with X.509 certificates) program for PDF files. Binary installation."
6 arch=('any')
7 url="http://portablesigner.sourceforge.net/"
8 license=('EUPL')
9 depends=('jre' 'java-jce_policy')
10 provides=('portablesigner')
11 source=("https://forge.osor.eu/frs/download.php/604/PortableSigner-Generic-${pkgver}.zip"
12         'http://www.osor.eu/eupl/eupl-v1.1/en/EUPL%20v.1.1%20-%20Licence.pdf')
13 noextract=("PortableSigner-Generic-${pkgver}.zip")
15 build() {
16     # Uncompressing PortableSigner to its place
17     mkdir -p ${pkgdir}/usr/share/java/portablesigner/
18     cd ${pkgdir}/usr/share/java/portablesigner/
19     bsdtar -xf ${srcdir}/PortableSigner-Generic-${pkgver}.zip || return 1
20     find ${pkgdir}/usr/share/java/portablesigner/* -type f -exec chmod 644 {} \;
21     find ${pkgdir}/usr/share/java/portablesigner/* -type d -exec chmod 755 {} \;
22     chown -R root.root ${pkgdir}/usr/share/java/portablesigner/* || return 1
24     # The executable script
25     mkdir -p ${pkgdir}/usr/bin/
26     install -Dm755 ${pkgdir}/usr/share/java/portablesigner/linux/PortableSigner.sh \
27     ${pkgdir}/usr/bin/portablesigner || return 1
28     sed -i 's@/usr/local/PortableSigner/@/usr/share/java/portablesigner/@' \
29     ${pkgdir}/usr/bin/portablesigner || return 1
31     # .icon and .desktop files
32     install -Dm644 ${pkgdir}/usr/share/java/portablesigner/linux/PortableSignerLogo.png \
33     ${pkgdir}/usr/share/pixmaps/PortableSignerLogo.png || return 1
34     install -Dm644 ${pkgdir}/usr/share/java/portablesigner/linux/portablesigner.desktop \
35     ${pkgdir}/usr/share/applications/portablesigner.desktop || return 1
36     sed -i 's@/usr/local/PortableSigner/PortableSignerLogo.png@/usr/share/pixmaps/PortableSignerLogo.png@' \
37     ${pkgdir}/usr/share/applications/portablesigner.desktop || return 1
38     sed -i 's@Exec=PortableSigner@Exec=portablesigner@' \
39     ${pkgdir}/usr/share/applications/portablesigner.desktop || return 1
41     # Removing unneeded files
42     rm -rf ${pkgdir}/usr/share/java/portablesigner/linux || return 1
43     rm ${pkgdir}/usr/share/java/portablesigner/linux-install.sh || return 1
44     rm ${pkgdir}/usr/share/java/portablesigner/Readme.txt || return 1
46     # EUPL License
47     install -Dm644 ${srcdir}/EUPL%20v.1.1%20-%20Licence.pdf ${pkgdir}/usr/share/licenses/portablesigner/EUPL_v.1.1_-_Licence.pdf || return 1
50 md5sums=('da70d5067fa0b2889400bffd8c468143'
51          '31de38780168403d46a720de99196f81')