diff options
author | James Meyer <james.meyer@operamail.com> | 2012-11-01 20:49:39 (GMT) |
---|---|---|
committer | James Meyer <james.meyer@operamail.com> | 2012-11-01 20:49:39 (GMT) |
commit | 1563ce5b39f113386cc32140754dfa4eafa1a597 (patch) | |
tree | a5b2f0c57fc098d85ef7ff8416252cf2d3ed671e /abs | |
parent | bd569bc5aed964cff7aca693255e515b999c98f4 (diff) | |
download | linhes_pkgbuild-1563ce5b39f113386cc32140754dfa4eafa1a597.zip linhes_pkgbuild-1563ce5b39f113386cc32140754dfa4eafa1a597.tar.gz linhes_pkgbuild-1563ce5b39f113386cc32140754dfa4eafa1a597.tar.bz2 |
ca-certificates-java: added for rhino, which is needed for zoneminder
refs #857
Diffstat (limited to 'abs')
-rw-r--r-- | abs/extra/ca-certificates-java/PKGBUILD | 35 | ||||
-rw-r--r-- | abs/extra/ca-certificates-java/ca-certificates-java.install | 18 | ||||
-rwxr-xr-x | abs/extra/ca-certificates-java/init-jks-keystore | 10 | ||||
-rw-r--r-- | abs/extra/ca-certificates-java/jks-keystore.hook | 15 |
4 files changed, 78 insertions, 0 deletions
diff --git a/abs/extra/ca-certificates-java/PKGBUILD b/abs/extra/ca-certificates-java/PKGBUILD new file mode 100644 index 0000000..ff1a341 --- /dev/null +++ b/abs/extra/ca-certificates-java/PKGBUILD @@ -0,0 +1,35 @@ +# $Id: PKGBUILD 162732 2012-06-29 08:16:24Z pierre $ +# Maintainer: Jan de Groot <jgc@archlinux.org> + +pkgname=ca-certificates-java +pkgver=20120721 +pkgrel=1 +pkgdesc='Common CA certificates (JKS keystore)' +arch=('any') +url='http://packages.qa.debian.org/c/ca-certificates-java.html' +license=('GPL') +depends=('ca-certificates') +makedepends=('jdk7-openjdk') +install='ca-certificates-java.install' +backup=('etc/default/cacerts') +source=("http://ftp.debian.org/debian/pool/main/c/${pkgname}/${pkgname}_${pkgver}.tar.gz" + 'init-jks-keystore' 'jks-keystore.hook') + +build() { + cd ${srcdir}/${pkgname}-${pkgver} + javac -target 1.6 -source 1.6 UpdateCertificates.java + jar cfe ca-certificates-java.jar UpdateCertificates *.class +} + +package() { + cd ${srcdir}/${pkgname}-${pkgver} + + install -d -m755 ${pkgdir}/etc/ssl/certs/java + install -D -m600 debian/default ${pkgdir}/etc/default/cacerts + install -D -m644 ca-certificates-java.jar ${pkgdir}/usr/share/ca-certificates-java/ca-certificates-java.jar + install -D -m755 ${srcdir}/init-jks-keystore ${pkgdir}/usr/sbin/init-jks-keystore + install -D -m755 ${srcdir}/jks-keystore.hook ${pkgdir}/etc/ca-certificates/update.d/jks-keystore +} +md5sums=('a4c17590cc91a498b611c2dc62795273' + '75eeca3f443f4b5a17ed5ac81875f1e9' + '6dd4f915aee0df51260083e00b7fa012') diff --git a/abs/extra/ca-certificates-java/ca-certificates-java.install b/abs/extra/ca-certificates-java/ca-certificates-java.install new file mode 100644 index 0000000..f5ce35e --- /dev/null +++ b/abs/extra/ca-certificates-java/ca-certificates-java.install @@ -0,0 +1,18 @@ +post_install() { + if [ ! -f etc/ssl/certs/java/cacerts ]; then + if which java >/dev/null 2>&1; then + usr/sbin/init-jks-keystore + fi + fi +} + +post_upgrade() { + if [ $(vercmp $2 20110426-2) -lt 0 ]; then + mv etc/ssl/certs/java/cacerts etc/ssl/certs/java/cacerts.pacsave + fi + post_install +} + +post_remove() { + rm -rf etc/ssl/certs/java +} diff --git a/abs/extra/ca-certificates-java/init-jks-keystore b/abs/extra/ca-certificates-java/init-jks-keystore new file mode 100755 index 0000000..0758420 --- /dev/null +++ b/abs/extra/ca-certificates-java/init-jks-keystore @@ -0,0 +1,10 @@ +#!/bin/sh + +storepass='changeit' +. /etc/default/cacerts + +JAR=/usr/share/ca-certificates-java/ca-certificates-java.jar + +find /etc/ssl/certs -name '*.pem' -printf "+%p\n" | \ + java -jar $JAR -storepass "$storepass" >/dev/null +echo "done." diff --git a/abs/extra/ca-certificates-java/jks-keystore.hook b/abs/extra/ca-certificates-java/jks-keystore.hook new file mode 100644 index 0000000..67d9eda --- /dev/null +++ b/abs/extra/ca-certificates-java/jks-keystore.hook @@ -0,0 +1,15 @@ +#! /bin/sh + +storepass='changeit' +. /etc/default/cacerts + +echo "" +if [ "$cacerts_updates" != yes ] || [ "$CACERT_UPDATES" = disabled ]; then + echo "updates of cacerts keystore disabled." + exit 0 +fi + +JAR=/usr/share/ca-certificates-java/ca-certificates-java.jar + +java -jar $JAR -storepass "$storepass" +echo "done." |