summaryrefslogtreecommitdiffstats
path: root/openjdk/build/openjdk.SlackBuild
diff options
context:
space:
mode:
author Eric Hameleers <alien@slackware.com>2012-01-15 22:18:27 +0000
committer Eric Hameleers <alien@slackware.com>2012-01-15 22:18:27 +0000
commit9c96281bf8cbf098d34082f9c7d8882456ac39b5 (patch)
tree4fd6d1a4bbc1f079ba5ce892357144499d6b2d48 /openjdk/build/openjdk.SlackBuild
parent799cf926e3e486307cd3cad0250b9c2e3895118d (diff)
downloadasb-9c96281bf8cbf098d34082f9c7d8882456ac39b5.tar.gz
asb-9c96281bf8cbf098d34082f9c7d8882456ac39b5.tar.xz
Apply several fixes: generate cacerts file, add missing .cfg files to the JRE package; and try to make javaws work with the JRE
Diffstat (limited to 'openjdk/build/openjdk.SlackBuild')
-rwxr-xr-xopenjdk/build/openjdk.SlackBuild34
1 files changed, 26 insertions, 8 deletions
diff --git a/openjdk/build/openjdk.SlackBuild b/openjdk/build/openjdk.SlackBuild
index f451d1a4..152eefb5 100755
--- a/openjdk/build/openjdk.SlackBuild
+++ b/openjdk/build/openjdk.SlackBuild
@@ -29,7 +29,8 @@ JAVABLD=b147
ICEDTEA=2.0
VERSION="${JAVAVER}_${JAVABLD}"
-BUILD=${BUILD:-1}
+BUILD=${BUILD:-2}
+
NUMJOBS=${NUMJOBS:--j6}
# If BOOTSTRAP is set to "YES" then we bootstrap the build using GCC's java compiler (gcj)
@@ -173,6 +174,26 @@ cp -a openjdk.build/j2sdk-image \
cp -a openjdk.build/j2re-image \
$PKG2/usr/lib${LIBDIRSUFFIX}/java
+# Create a jre compatibility symlink so that the web plugin works
+# with both JDK and JRE:
+( cd $PKG2/usr/lib${LIBDIRSUFFIX}/java ; ln -sf . jre )
+
+# Generate a cacerts file from the certificates installed through our
+# ca-certificates package - the "cacerts" in the OpenJDK sources is empty.
+# This will only work if we already have a proper JDK/JRE installed:
+if which keytool 1>/dev/null 2>&1 ; then
+ mkdir certgen
+ ( cd certgen
+ cp $CWD/scripts/generate-cacerts.pl .
+ for cert in /usr/share/ca-certificates/*/*.crt; do
+ openssl x509 -text -in "${cert}" >> all.crt
+ done
+ perl generate-cacerts.pl keytool all.crt
+ install -p -m0644 cacerts $PKG1/usr/lib${LIBDIRSUFFIX}/java/jre/lib/security
+ install -p -m0644 cacerts $PKG2/usr/lib${LIBDIRSUFFIX}/java/lib/security
+ )
+fi
+
# Pick a selection of fontconfig files:
cp -a $PKG1/usr/lib${LIBDIRSUFFIX}/java/jre/lib/fontconfig.{Ubuntu,}.properties.src
cp -a $PKG1/usr/lib${LIBDIRSUFFIX}/java/jre/lib/fontconfig.{Ubuntu,}.bfc
@@ -223,20 +244,17 @@ ln -sf /etc/java/java.security $PKG1/usr/lib${LIBDIRSUFFIX}/java/jre/lib/securit
cat $PKG1/usr/lib${LIBDIRSUFFIX}/java/jre/lib/security/nss.cfg | sed -e 's/seamonkey-.*$/seamonkey/' > $PKG1/etc/java/nss.cfg.new
ln -sf /etc/java/nss.cfg $PKG1/usr/lib${LIBDIRSUFFIX}/java/jre/lib/security/nss.cfg
# And the jre package:
-mv $PKG2/usr/lib${LIBDIRSUFFIX}/java/lib/${LIB_ARCH}/jvm.cfg $PKG1/etc/java/jvm.cfg.new
+mv $PKG2/usr/lib${LIBDIRSUFFIX}/java/lib/${LIB_ARCH}/jvm.cfg $PKG2/etc/java/jvm.cfg.new
ln -sf /etc/java/jvm.cfg $PKG2/usr/lib${LIBDIRSUFFIX}/java/lib/${LIB_ARCH}/jvm.cfg
-mv $PKG2/usr/lib${LIBDIRSUFFIX}/java/lib/security/java.policy $PKG1/etc/java/java.policy.new
+mv $PKG2/usr/lib${LIBDIRSUFFIX}/java/lib/security/java.policy $PKG2/etc/java/java.policy.new
ln -sf /etc/java/java.policy $PKG2/usr/lib${LIBDIRSUFFIX}/java/lib/security/java.policy
mv $PKG2/usr/lib${LIBDIRSUFFIX}/java/lib/security/java.security $PKG2/etc/java/java.security.new
ln -sf /etc/java/java.security $PKG2/usr/lib${LIBDIRSUFFIX}/java/lib/security/java.security
cat $PKG2/usr/lib${LIBDIRSUFFIX}/java/lib/security/nss.cfg | sed -e 's/seamonkey-.*$/seamonkey/' > $PKG2/etc/java/nss.cfg.new
ln -sf /etc/java/nss.cfg $PKG2/usr/lib${LIBDIRSUFFIX}/java/lib/security/nss.cfg
-# The openjdk does not build a mozilla plugin:
-#mkdir -p $PKG/usr/lib${LIBDIRSUFFIX}/mozilla/plugins
-#( cd $PKG/usr/lib${LIBDIRSUFFIX}/mozilla/plugins
-# ln -sf /usr/lib${LIBDIRSUFFIX}/java/jre/lib/${LIB_ARCH}/libnpjp2.so libnpjp2.so
-#)
+# NOTE:
+# The openjdk does not build a mozilla plugin: install icedtea-web instead.
( cd $PKG1/usr/lib${LIBDIRSUFFIX}
ln -sf ./java/jre/lib/${LIB_ARCH}/server/libjvm.so .