Bug#264137: ibm-jdk-1.4 support for java-package-0.20
Package: java-package Version: 0.20 Followup-For: Bug #264137 this patch add support for the ibm jdk on java-package-0.20. I only include detection for the 141-ppc and the 142-i386 sdk's. if someone has the time, a better detection is needed. ;) thanks, rico -- System Information: Debian Release: 3.1 APT prefers testing APT policy: (990, 'testing'), (500, 'unstable'), (1, 'experimental') Architecture: i386 (i686) Kernel: Linux 2.6.11-madwifi-fire Locale: LANG=de_DE, LC_CTYPE=de_DE (charmap=ISO-8859-1) Versions of packages java-package depends on: ii coreutils 5.2.1-2The GNU core utilities ii debhelper 4.2.31 helper programs for debian/rules ii fakeroot 1.2.2 Gives a fake root environment -- no debconf information diff -r -u -N java-package-0.20.old/debian/rules java-package-0.20/debian/rules --- java-package-0.20.old/debian/rules 2005-01-25 00:54:51.0 +0100 +++ java-package-0.20/debian/rules 2005-03-03 12:20:40.0 +0100 @@ -26,7 +26,7 @@ install -m 755 make-jpkg.out $(B)/usr/bin/make-jpkg cp lib/*.sh $(B)/usr/share/java-package/ - for dir in $(wildcard blackdown-j2*) $(wildcard sun-j2*); do \ + for dir in $(wildcard blackdown-j2*) $(wildcard sun-j2*) $(wildcard ibm-j2*); do \ cp -a $$dir $(B)/usr/share/java-package/; \ done find $(B) -type d -name CVS | xargs -r rm -r diff -r -u -N java-package-0.20.old/ibm-j2sdk1.4/install java-package-0.20/ibm-j2sdk1.4/install --- java-package-0.20.old/ibm-j2sdk1.4/install 1970-01-01 01:00:00.0 +0100 +++ java-package-0.20/ibm-j2sdk1.4/install 2005-03-03 18:18:47.0 +0100 @@ -0,0 +1,36 @@ +#! /bin/bash -e + + +suffix=j2sdk1.4-ibm +j2se_base="/usr/lib/$suffix" +priority=314 + +if [ ! -e "$j2se_base/debian/info" ]; then +exit 0 +fi + +# alternative +function program_alternative() { +local program="$1" +update-alternatives \ + --install "/usr/bin/$program" "$program" \ + "$j2se_base/bin/$program" "$priority" \ + --slave "/usr/share/man/man1/$program.1.gz" "$program.1.gz" \ + "$j2se_base/man/man1/$program.1.gz" +} + +program_alternative appletviewer +program_alternative idlj +program_alternative jar +program_alternative java +program_alternative javac +program_alternative javadoc +program_alternative javah +program_alternative javap +program_alternative jdb +program_alternative rmic +program_alternative rmid +program_alternative rmiregistry +program_alternative serialver + +# no plugin available ... diff -r -u -N java-package-0.20.old/ibm-j2sdk1.4/remove java-package-0.20/ibm-j2sdk1.4/remove --- java-package-0.20.old/ibm-j2sdk1.4/remove 1970-01-01 01:00:00.0 +0100 +++ java-package-0.20/ibm-j2sdk1.4/remove 2005-03-03 12:15:45.0 +0100 @@ -0,0 +1,30 @@ +#! /bin/bash -e + +suffix=j2sdk1.4-ibm +j2se_base="/usr/lib/$suffix" + +if [ ! -e "$j2se_base/debian/info" ]; then +exit 0 +fi + +# alternative +function program_alternative() { +local program="$1" +update-alternatives \ + --remove "$program" "/usr/bin/$program-$suffix" +} + +program_alternative appletviewer +program_alternative idlj +program_alternative jar +program_alternative java +program_alternative javac +program_alternative javadoc +program_alternative javah +program_alternative javap +program_alternative jdb +program_alternative rmic +program_alternative rmid +program_alternative rmiregistry +program_alternative serialver + diff -r -u -N java-package-0.20.old/lib/common.sh java-package-0.20/lib/common.sh --- java-package-0.20.old/lib/common.sh 2005-02-08 15:13:52.0 +0100 +++ java-package-0.20/lib/common.sh 2005-03-03 18:15:23.0 +0100 @@ -69,8 +69,20 @@ mkdir "$extract_dir" cd "$extract_dir" echo - -if ! sh "$archive_path"; then + +local extract_cmd +case "$archive_path" in + *.tar) + extract_cmd="tar xf";; + *.tar.bz2) + extract_cmd="tar --bzip2 -xf";; + *.tgz|*.tar.gz) + extract_cmd="tar xfz";; + *) + extract_cmd=sh +esac + +if ! $extract_cmd "$archive_path"; then cat << EOF WARNING: The package installation script exited with an error diff -r -u -N java-package-0.20.old/lib/ibm-j2sdk.sh java-package-0.20/lib/ibm-j2sdk.sh --- java-package-0.20.old/lib/ibm-j2sdk.sh 1970-01-01 01:00:00.0 +0100 +++ java-package-0.20/lib/ibm-j2sdk.sh 2005-03-03 19:11:39.0 +0100 @@ -0,0 +1,35 @@ +# Detect product +function ibm_j2sdk_detect() { +local found= +case "$archive_name" in + "IBMJava2-SDK-142.tgz") + j2se_version=1.4.2 + j2se_expected_min_size=53 # 55142 kB + found=true + ;; +"IBMJava2-SDK-141.ppc.tgz") +j2se_version=1.4.1 +j2se_expected_min_size=55 # 57075 kB +found=true +;; +esac +if [[ -n "$found" ]]; the
Bug#264137: ibm-jdk-1.4 support for java-package-0.20
Package: java-package Version: 0.20 Followup-For: Bug #264137 I done some updates to the patch and fix some little bugs. these shell scripts in /usr/bin are needed, cause of a bug in ibm's jre's and jdk's. I also add support for ibm jre's and add following jdk/jre versions to the detection: - 1.3.1 x86, ppc, s390 - 1.4.1 ppc, s390 - 1.4.2 x86, x86_64, ppc, ppc64, s390, s390x I tested it with jdk+jre 1.4.2 for x86 and jdk+jre 1.3.1 for x86. it also should work with the other plattforms. it would be nice, if someone could test this. greetings, rico -- System Information: Debian Release: 3.1 APT prefers testing APT policy: (990, 'testing'), (500, 'unstable'), (1, 'experimental') Architecture: i386 (i686) Kernel: Linux 2.6.11-madwifi-fire Locale: LANG=de_DE, LC_CTYPE=de_DE (charmap=ISO-8859-1) Versions of packages java-package depends on: ii coreutils 5.2.1-2The GNU core utilities ii debhelper 4.2.31 helper programs for debian/rules ii fakeroot 1.2.2 Gives a fake root environment -- no debconf information diff -r -u -N java-package-0.20.old/debian/rules java-package-0.20/debian/rules --- java-package-0.20.old/debian/rules 2005-01-25 00:54:51.0 +0100 +++ java-package-0.20/debian/rules 2005-03-03 12:20:40.0 +0100 @@ -26,7 +26,7 @@ install -m 755 make-jpkg.out $(B)/usr/bin/make-jpkg cp lib/*.sh $(B)/usr/share/java-package/ - for dir in $(wildcard blackdown-j2*) $(wildcard sun-j2*); do \ + for dir in $(wildcard blackdown-j2*) $(wildcard sun-j2*) $(wildcard ibm-j2*); do \ cp -a $$dir $(B)/usr/share/java-package/; \ done find $(B) -type d -name CVS | xargs -r rm -r diff -r -u -N java-package-0.20.old/ibm-j2re1.3/install java-package-0.20/ibm-j2re1.3/install --- java-package-0.20.old/ibm-j2re1.3/install 1970-01-01 01:00:00.0 +0100 +++ java-package-0.20/ibm-j2re1.3/install 2005-03-04 13:24:58.0 +0100 @@ -0,0 +1,27 @@ +suffix=j2re1.3-ibm +j2se_base="/usr/lib/$suffix" +priority=313 + +if [ ! -e "$j2se_base/debian/info" ]; then +exit 0 +fi + +# alternative +function program_alternative() { +local program="$1" +cat >/usr/bin/$program-$suffix < +function program_alternative() { +local program="$1" +update-alternatives \ +--remove "$program" "/usr/bin/$program-$suffix" +rm "/usr/bin/$program-$suffix" +} + +program_alternative java +program_alternative javaw +program_alternative rmid +program_alternative rmiregistry diff -r -u -N java-package-0.20.old/ibm-j2re1.4/install java-package-0.20/ibm-j2re1.4/install --- java-package-0.20.old/ibm-j2re1.4/install 1970-01-01 01:00:00.0 +0100 +++ java-package-0.20/ibm-j2re1.4/install 2005-03-04 13:25:07.0 +0100 @@ -0,0 +1,27 @@ +suffix=j2re1.4-ibm +j2se_base="/usr/lib/$suffix" +priority=314 + +if [ ! -e "$j2se_base/debian/info" ]; then +exit 0 +fi + +# alternative +function program_alternative() { +local program="$1" +cat >/usr/bin/$program-$suffix < +function program_alternative() { +local program="$1" +update-alternatives \ +--remove "$program" "/usr/bin/$program-$suffix" +rm "/usr/bin/$program-$suffix" +} + +program_alternative java +program_alternative javaw +program_alternative rmid +program_alternative rmiregistry diff -r -u -N java-package-0.20.old/ibm-j2sdk1.3/install java-package-0.20/ibm-j2sdk1.3/install --- java-package-0.20.old/ibm-j2sdk1.3/install 1970-01-01 01:00:00.0 +0100 +++ java-package-0.20/ibm-j2sdk1.3/install 2005-03-04 13:24:38.0 +0100 @@ -0,0 +1,36 @@ +suffix=j2sdk1.3-ibm +j2se_base="/usr/lib/$suffix" +priority=313 + +if [ ! -e "$j2se_base/debian/info" ]; then +exit 0 +fi + +# alternative +function program_alternative() { +local program="$1" +cat >/usr/bin/$program-$suffix < +function program_alternative() { +local program="$1" +update-alternatives \ +--remove "$program" "/usr/bin/$program-$suffix" +rm "/usr/bin/$program-$suffix" +} + +program_alternative appletviewer +program_alternative idlj +program_alternative jar +program_alternative java +program_alternative javac +program_alternative javadoc +program_alternative javah +program_alternative javap +program_alternative jdb +program_alternative rmic +program_alternative rmid +program_alternative rmiregistry +program_alternative serialver + diff -r -u -N java-package-0.20.old/ibm-j2sdk1.4/install java-package-0.20/ibm-j2sdk1.4/install --- java-package-0.20.old/ibm-j2sdk1.4/install 1970-01-01 01:00:00.0 +0100 +++ java-package-0.20/ibm-j2sdk1.4/install 2005-03-04 13:22:59.0 +0100 @@ -0,0 +1,37 @@ +suffix=j2sdk1.4-ibm +j2se_base="/usr/lib/$suffix" +priority=314 + +if [ ! -e "$j2se_base/debian/info" ]; then +exit 0 +fi + +# alternative +function program_alternative() { +local program="$1" +cat >/usr/bin/$program-$suffix <
Bug#298566: java-package: command-line parameter for make-jpkg to set priority
Package: java-package Version: 0.20 Severity: wishlist Tags: patch this patch add an command-line parameter to set an alternative priority for update-alternatives. ... --email EMAIL email address used in the maintainer field of the package --changes create a .changes file --priority PRIOset the update alternatives priority level ... I primarily use this, cause I have installed sun's jdk 1.5, but want ibm's jdk 1.4 as default sdk. the patch 'priority.diff' add the functionality to the unpatched java-package-2.0. the patch 'priority_ibm.diff' add additional support for ibm jre's/jdk's and need the patch from #264137. (http://bugs.debian.org/cgi-bin/bugreport.cgi/ibm_jdk_jre.diff?bug=264137&msg=16&att=1) regards, rico -- System Information: Debian Release: 3.1 Architecture: i386 (i686) Kernel: Linux 2.6.10-as3-fire Locale: LANG=de_DE, LC_CTYPE=de_DE (charmap=ISO-8859-1) diff -rNu java-package-0.20.old/blackdown-j2re1.3/install java-package-0.20/blackdown-j2re1.3/install --- java-package-0.20.old/blackdown-j2re1.3/install 2005-02-08 15:27:58.0 +0100 +++ java-package-0.20/blackdown-j2re1.3/install 2005-03-07 19:12:05.0 +0100 @@ -1,5 +1,5 @@ j2se_base="/usr/lib/j2re1.3-blackdown" -priority=313 +test -z $priority && priority=313 if [ ! -e "$j2se_base/debian/info" ]; then exit 0 diff -rNu java-package-0.20.old/blackdown-j2re1.4/install java-package-0.20/blackdown-j2re1.4/install --- java-package-0.20.old/blackdown-j2re1.4/install 2005-02-08 15:27:58.0 +0100 +++ java-package-0.20/blackdown-j2re1.4/install 2005-03-07 19:12:05.0 +0100 @@ -1,7 +1,7 @@ j2se_base="/usr/lib/j2re1.4-blackdown" # due to prior brokenness -priority=314 +test -z $priority && priority=314 if [ ! -e "$j2se_base/debian/info" ]; then exit 0 diff -rNu java-package-0.20.old/blackdown-j2sdk1.3/install java-package-0.20/blackdown-j2sdk1.3/install --- java-package-0.20.old/blackdown-j2sdk1.3/install2005-02-08 15:28:00.0 +0100 +++ java-package-0.20/blackdown-j2sdk1.3/install2005-03-07 19:12:05.0 +0100 @@ -1,5 +1,5 @@ j2se_base="/usr/lib/j2sdk1.3-blackdown" -priority=313 +test -z $priority && priority=313 if [ ! -e "$j2se_base/debian/info" ]; then exit 0 diff -rNu java-package-0.20.old/blackdown-j2sdk1.4/install java-package-0.20/blackdown-j2sdk1.4/install --- java-package-0.20.old/blackdown-j2sdk1.4/install2005-02-08 15:28:01.0 +0100 +++ java-package-0.20/blackdown-j2sdk1.4/install2005-03-07 19:12:05.0 +0100 @@ -1,5 +1,5 @@ j2se_base="/usr/lib/j2sdk1.4-blackdown" -priority=314 +test -z $priority && priority=314 if [ ! -e "$j2se_base/debian/info" ]; then exit 0 diff -rNu java-package-0.20.old/lib/j2se.sh java-package-0.20/lib/j2se.sh --- java-package-0.20.old/lib/j2se.sh 2005-02-08 17:40:54.0 +0100 +++ java-package-0.20/lib/j2se.sh 2005-03-07 18:49:00.0 +0100 @@ -72,6 +72,7 @@ set -e if [ "\$1" = configure ]; then +priority=$priority EOF cat "$lib_dir/$j2se_package/install" >> "$debian_dir/postinst" diff -rNu java-package-0.20.old/make-jpkg java-package-0.20/make-jpkg --- java-package-0.20.old/make-jpkg 2005-01-25 00:07:35.0 +0100 +++ java-package-0.20/make-jpkg 2005-03-07 19:48:53.0 +0100 @@ -30,6 +30,7 @@ --full-name NAME full name used in the maintainer field of the package --email EMAIL email address used in the maintainer field of the package --changes create a .changes file + --priority PRIOset the update alternatives priority level --help display this help and exit --version output version information and exit @@ -71,6 +72,10 @@ maintainer_email="$1" elif [[ "x$1" == x--changes ]]; then genchanges="true" +elif [[ "x$1" == x--priority ]]; then + [ $# -le 1 ] && missing_argument "$1" + shift + priority="$1" else unrecognized_option "$1" fi diff -rNu java-package-0.20.old/make-jpkg.1 java-package-0.20/make-jpkg.1 --- java-package-0.20.old/make-jpkg.1 2004-10-12 01:10:23.0 +0200 +++ java-package-0.20/make-jpkg.1 2005-03-07 19:49:08.0 +0100 @@ -41,6 +41,9 @@ .B --changes create a .changes file .TP +.B --priority \fIPRIO\fR +set the update alternatives priority level +.TP .B --help display help text and exit .TP diff -rNu java-package-0.20.old/sun-j2re1.3/install java-package-0.20/sun-j2re1.3/install --- java-package-0.20.old/sun-j2re1.3/install 2005-02-08 15:28:03.0 +0100 +++ java-package-0.20/sun-j2re1.3/install 2005-03-07 19:12:05.0 +0100 @@ -1,5 +1,5 @@ j2se_base="/usr/lib/j2re1.3-sun" -priority=313 +test -z $priority && priority=313 if [ ! -e "$j2se_base/debian/info" ]; then exit 0 diff -rNu java-package-0.20.old/sun-j2re1.4/install java-package-0.20/sun-j2re1.4/install --- java-package-0.20.old/sun-j2re1.4/install 2005-02-08