1 # Maintainer: Cedric Sougne <cedric@sougne.name>
2 # Contributor: Tom < reztho at archlinux dot us >
3 pkgname=java-jce_ustrength7
6 pkgdesc="Java Cryptography Extension (JCE) Unlimited Strength Jurisdiction Policy Files 7"
8 url="http://www.oracle.com/technetwork/java/javase/downloads/jce-7-download-432124.html"
11 install=${pkgname}.install
12 source=('http://download.oracle.com/otn-pub/java/jce/7/UnlimitedJCEPolicyJDK7.zip' 'install_java_jce_ustrength')
13 _zipfile="UnlimitedJCEPolicyJDK${pkgver}.zip"
16 # Oracle doesn't give us a direct download for jce_policy-6.zip
17 # So the user must download it manually...
18 if [ ! -e "$(dirname ${srcdir})/${_zipfile}" ]; then
20 echo "You need to download this manually from Oracle:"
21 echo "JCE Unlimited Strength Jurisdiction Policy Files 6 Release Candidate: ${_zipfile}"
22 echo "and put it in the same directory of this PKGBUILD."
29 [ ! -e "${srcdir}/${_zipfile}" ] && ln -s $(dirname ${srcdir})/${_zipfile} ${srcdir} &> /dev/null
31 _mdfiveneeded=c47e997b90ddfd0d813a37ccc97fb933
32 _mdfivefile=$(md5sum ${srcdir}/${_zipfile} | cut -d " " -f 1)
33 if [ "${_mdfiveneeded}" != "${_mdfivefile}" ]; then
35 echo "The MD5SUM of ${_zipfile} isn't correct."
36 echo "Unfinished download or updated zip file."
41 # Fixed place for the jce_policy files
42 mkdir -p ${pkgdir}/usr/share/java/${pkgname}/
43 cd ${pkgdir}/usr/share/java/${pkgname}/
44 bsdtar -xf ${srcdir}/${_zipfile}
45 mv UnlimitedJCEPolicy/* .
46 rmdir UnlimitedJCEPolicy
47 find ${pkgdir}/usr/share/java/${pkgname}/* -type f -exec chmod 644 {} \;
48 find ${pkgdir}/usr/share/java/${pkgname}/* -type d -exec chmod 755 {} \;
50 # Installing the script
51 mkdir -p ${pkgdir}/sbin/
52 install -m 755 ${srcdir}/install_java_jce_ustrength ${pkgdir}/sbin/
55 mkdir -p ${pkgdir}/usr/share/doc/${pkgname}
56 mv ${pkgdir}/usr/share/java/${pkgname}/README.txt ${pkgdir}/usr/share/doc/${pkgname}/
59 md5sums=('c47e997b90ddfd0d813a37ccc97fb933' 'f77ff988319bdbc2407395192fcb2ca0')