PKGBUILDs/extra/ca-certificates-java/PKGBUILD
2009-10-09 21:23:22 -05:00

37 lines
1.4 KiB
Bash

# $Id: $
# Maintainer: Jan de Groot <jgc@archlinux.org>
pkgname=ca-certificates-java
pkgver=20090629
pkgrel=1
pkgdesc='Common CA certificates (JKS keystore)'
arch=('i686' 'x86_64')
url='http://packages.qa.debian.org/c/ca-certificates-java.html'
license=('GPL')
depends=('ca-certificates')
makedepends=('java-runtime')
install=ca-certificates-java.install
source=(jks-keystore.hook init-jks-keystore default)
md5sums=('0b1ad39b6b06d5b6321071e05f2de254'
'8c7c4fee571192291a9537b855a32852'
'0ded97abeff69c2362939e2e881e214a')
build() {
cd "${srcdir}"
install -d -m755 "${pkgdir}/etc/ca-certificates/update.d"
install -d -m755 "${pkgdir}/etc/ssl/certs/java"
install -d -m755 "${pkgdir}/etc/default"
install -d -m755 "${pkgdir}/usr/share/ca-certificates-java"
install -d -m755 "${pkgdir}/usr/sbin"
install -m755 jks-keystore.hook "${pkgdir}/etc/ca-certificates/update.d/jks-keystore" || return 1
install -m600 default "${pkgdir}/etc/default/cacerts" || return 1
install -m755 init-jks-keystore "${pkgdir}/usr/sbin/" || return 1
for crt in `find /usr/share/ca-certificates -name '*.crt' -printf '%P '`; do
alias=`basename $crt .crt | tr A-Z a-z | tr -cs a-z0-9 _`
alias=${alias%*_}
echo "IMPORT: $crt, alias=$alias"
keytool -importcert -trustcacerts -keystore "${pkgdir}/usr/share/ca-certificates-java/cacerts" -storepass 'changeit' -noprompt -alias "$alias" -file "/usr/share/ca-certificates/$crt" || continue
done
}