[Webmin-maintainers] Bug#304356: usermin-contrib: Please use JAVA_HOME

Andreas Jochens Andreas Jochens <aj@andaco.de>, 304356@bugs.debian.org
Tue, 12 Apr 2005 17:58:29 +0200


Package: usermin-contrib
Version: 1.110-1
Severity: wishlist
Tags: patch

Please introduce JAVA_HOME in debian/rules and make the package
work with the standard setup which is used by the j2sdk1.4
packages created with make-jpkg from 'java-package'.

Additionally, the package should probably Build-Depend on
'blackdown-j2sdk1.4' instead of just 'j2sdk1.4' because it like it 
does not seem to compile with the 'ibm-j2sdk1.4' or 'sun-j2sdk1.4'.

Regards
Andreas Jochens

diff -urN ../tmp-orig/usermin-contrib-1.110/debian/control ./debian/control
--- ../tmp-orig/usermin-contrib-1.110/debian/control	2005-04-12 17:49:12.628867221 +0200
+++ ./debian/control	2005-04-12 17:49:10.615272203 +0200
@@ -1,7 +1,7 @@
 Source: usermin-contrib
 Section: contrib/admin
 Priority: optional
-Build-Depends-Indep: debhelper (>= 4), perl, j2sdk1.4
+Build-Depends-Indep: debhelper (>= 4), perl, blackdown-j2sdk1.4
 Maintainer: Debian Webmin maintainers <webmin-maintainers@lists.alioth.debian.org>
 Uploaders: Jaldhar H. Vyas <jaldhar@debian.org>
 Standards-Version: 3.6.1
diff -urN ../tmp-orig/usermin-contrib-1.110/debian/rules ./debian/rules
--- ../tmp-orig/usermin-contrib-1.110/debian/rules	2005-04-12 17:49:12.628867221 +0200
+++ ./debian/rules	2005-04-12 17:48:47.572907165 +0200
@@ -6,6 +6,8 @@
 
 # Uncomment this to turn on verbose mode.
 #export DH_VERBOSE=1
+JAVA_HOME_DIRS=/usr/lib/j2sdk1.4-blackdown
+JAVA_HOME ?= $(shell for j in $(JAVA_HOME_DIRS); do if [ -d "$$j" ]; then echo $$j; exit 0; fi; done)
 
 PKG_VER = $(shell perl -e 'print <> =~ /\((.*)\)/' debian/changelog)
 
@@ -14,7 +16,7 @@
 	dh_testdir
 	# Add here commands to compile the package.
 	cd filemanager && \
-        javac -classpath /usr/lib/j2se/1.4/jre/lib/plugin.jar @sources
+        $(JAVA_HOME)/bin/javac -classpath $(JAVA_HOME)/jre/lib/plugin.jar @sources
 
 	touch build-stamp