]> git.sven.stormbind.net Git - sven/java-package.git/commitdiff
Server JRE: Exclude libs that pull in X11
authorBenjamin Drung <benjamin.drung@profitbricks.com>
Fri, 18 Mar 2016 11:31:54 +0000 (12:31 +0100)
committerBenjamin Drung <benjamin.drung@profitbricks.com>
Fri, 18 Mar 2016 11:34:01 +0000 (12:34 +0100)
Some libraries of the server JRE are linked against X11. Ignore them in
the dh_shlibdeps run to avoid a dependency on X11.

lib/javase.sh
lib/oracle-server-jre.sh

index 6309e9f29d22480071a5f79404d46153326b36bc..ed0745c02bf8ef8228ce924f2ffce8ad7abb2d33 100644 (file)
@@ -70,6 +70,18 @@ j2se_rules() {
     cat << EOF
 #!/usr/bin/make -f
 
+# Exclude libraries that pull in ALSA or OpenGL which are not needed in normal operation
+EXCLUDE_LIBS = \\
+       --exclude=avplugin \\
+       --exclude=fxavcodecplugin \\
+       --exclude=libjsoundalsa.so \\
+EOF
+    for lib in $exlude_libs; do
+        printf '\t--exclude=%s \\\n' "$lib"
+    done
+    cat << EOF
+       \$(NULL)
+
 %:
        dh \$@
 
@@ -77,7 +89,7 @@ override_dh_compress:
        dh_compress \$(shell find $j2se_name/man/ -type f ! -name '*.gz' -printf '${jvm_base##/}/%p\n')
 
 override_dh_shlibdeps:
-       dh_shlibdeps --exclude=fxavcodecplugin --exclude=avplugin -l\$(shell find $j2se_name -type f -name '*.so*' -printf '${jvm_base##/}/%h\n' | sort -u | tr '\n' ':' | sed 's/:\$\$//')
+       dh_shlibdeps \$(EXCLUDE_LIBS) -l\$(shell find $j2se_name -type f -name '*.so*' -printf '${jvm_base##/}/%h\n' | sort -u | tr '\n' ':' | sed 's/:\$\$//')
 
 override_dh_strip_nondeterminism:
        # Disable dh_strip_nondeterminism to speed up the build
index 2f30f0bc8bf9c2e5bead25c833e8330d2824a8f9..c7ccbcf0e3769c5ed06da18ebe64b4a8cba61928 100644 (file)
@@ -81,6 +81,7 @@ EOF
       oracle_jre_bin_jre="policytool"
       oracle_jre_lib_hl="jexec"
       j2se_package="$j2se_vendor-java$j2se_release-server-jre"
+      exlude_libs="appletviewer libawt_xawt.so libsplashscreen.so policytool"
       j2se_run
     fi
   fi