CVS java-package/lib
Jeroen van Wolffelaar
jeroen@haydn.debian.org
Mon Jan 24 16:08:24 2005
Update of /cvsroot/pkg-java/java-package/lib
In directory haydn:/tmp/cvs-serv13883/lib
Modified Files:
blackdown-j2re.sh blackdown-j2sdk.sh common.sh j2re.sh
j2sdk.sh j2se.sh sun-j2re.sh sun-j2sdk.sh
Log Message:
Patch provided by Joshua Kwan <joshk@debian.org>, doing the following of which
I'm not going to dissict back in per-fix changes:
* Unclutter Debian build system and rework package slightly so that
*debian packages are not needed anymore. The necessary files will be
included in the generated packages. (Closes: #291145, #289245, #284779)
* Add support for Blackdown 1.4.2+01 build. (Closes: #285405)
* Fix support for Sun 1.5.0 amd64 builds due to typo. (Closes: #290879)
* Mozilla browser plugin name changed in 1.4.2 versions. Detect and correct.
(Closes: #273730)
* Use DEBFULLNAME, DEBNAME and DEBEMAIL as first-priority defaults for
maintainer name and email, if available. (Closes: #279653)
* Use --block-size=1M instead of -BM. (Closes: #289005, #291161)
* Disable support for Sun JDK 1.3 due to its dependencies on libraries
that are simply not available anymore. (Closes: #272972)
* Fix up short description a little bit.
* Bump Standards-Version to 3.6.1 (no changes)
* Be a bit more conservative with the real-root test.
* Remove last j2se-package references.
* Change Suggests on fakeroot to a Depends because it is worthless both
as real root and as a normal user without fakeroot.
--- /cvsroot/pkg-java/java-package/lib/blackdown-j2re.sh 2005/01/03 20:48:37 1.4
+++ /cvsroot/pkg-java/java-package/lib/blackdown-j2re.sh 2005/01/24 23:07:44 1.5
@@ -40,6 +40,11 @@
j2se_expected_min_size=54 # 55524 kB
found=true
;;
+ "j2re-1.4.2-01-linux-i586.bin") # SUPPORTED
+ j2se_version=1.4.2+01
+ j2se_expected_min_size=54 # 54958 kB
+ found=true
+ ;;
esac
;;
"sparc-linux")
@@ -68,6 +73,11 @@
j2se_expected_min_size=54 # 55468 kB
found=true
;;
+ "j2re-1.4.2-01-linux-amd64.bin") # SUPPORTED
+ j2se_version=1.4.2+01
+ j2se_expected_min_size=54 # 55071 kB
+ found=true
+ ;;
esac
;;
esac
--- /cvsroot/pkg-java/java-package/lib/blackdown-j2sdk.sh 2005/01/03 20:48:37 1.4
+++ /cvsroot/pkg-java/java-package/lib/blackdown-j2sdk.sh 2005/01/24 23:07:44 1.5
@@ -40,6 +40,11 @@
j2se_expected_min_size=88 # 90316 kB
found=true
;;
+ "j2sdk-1.4.2-01-linux-i586.bin") # SUPPORTED
+ j2se_version=1.4.2+01
+ j2se_expected_min_size=88 # 90316 kB
+ found=true
+ ;;
esac
;;
"sparc-linux")
@@ -68,6 +73,11 @@
j2se_expected_min_size=89 # 91460 kB
found=true
;;
+ "j2sdk-1.4.2-01-linux-amd64.bin") # SUPPORTED
+ j2se_version=1.4.2+01
+ j2se_expected_min_size=89 # 90420 kB
+ found=true
+ ;;
esac
;;
esac
--- /cvsroot/pkg-java/java-package/lib/common.sh 2005/01/03 19:26:12 1.2
+++ /cvsroot/pkg-java/java-package/lib/common.sh 2005/01/24 23:07:44 1.3
@@ -27,7 +27,7 @@
function diskfree() {
local size="$1"
echo -n "Checking free diskspace:"
- read dummy dummy dummy free dummy < <( df -BM "$tmp" | tail -1 )
+ read dummy dummy dummy free dummy < <( df --block-size=1M "$tmp" | tail -n 1 )
free=${free%M}
if [ "$free" -ge "$size" ]; then
echo " done."
@@ -123,9 +123,20 @@
field of the created package.
EOF
- while true; do
- read -e -p "Full name: " maintainer_name
- [ -n "$maintainer_name" ] && break
+ if [ -n "$DEBFULLNAME" ]; then
+ default_name="$DEBFULLNAME"
+ elif [ -n "$DEBNAME" ]; then
+ default_name="$DEBNAME"
+ else
+ default_name="$(getent passwd $(id -run) | cut -d: -f5| cut -d, -f1)"
+ fi
+
+ # gecos can be null
+ while [ -z "$maintainer_name" ]; do
+ read -e -p "Full name [$default_name]:" maintainer_name
+ if [ -z "$maintainer_name" ] && [ -n "$default_name" ]; then
+ maintainer_name="$default_name"
+ fi
done
fi
@@ -138,10 +149,12 @@
EOF
local default_email=
- if [ -r "/etc/mailname" ]; then
- default_email="$( id -un )@$( cat /etc/mailname )"
+ if [ -n "$DEBEMAIL" ]; then
+ default_email="$DEBEMAIL"
+ elif [ -r "/etc/mailname" ]; then
+ default_email="$( id -run )@$( cat /etc/mailname )"
else
- default_email="$( id -un )@$( hostname --fqdn )"
+ default_email="$( id -run )@$( hostname --fqdn )"
fi
read -e -p "Email [$default_email]: " maintainer_email
if [ -z "$maintainer_email" ]; then
--- /cvsroot/pkg-java/java-package/lib/j2re.sh 2005/01/03 19:56:40 1.4
+++ /cvsroot/pkg-java/java-package/lib/j2re.sh 2005/01/24 23:07:44 1.5
@@ -11,7 +11,7 @@
cat << EOF
Package: $j2se_package
Architecture: any
-Depends: \${shlibs:Depends}, $j2se_package_debian
+Depends: \${shlibs:Depends}
Provides: java-common, java-virtual-machine, java-runtime, java2-runtime, java-browser-plugin, j2re${j2se_release}
Description: $j2se_title
The Java(TM) 2 Runtime Environment contains the Java virtual machine,
@@ -48,7 +48,6 @@
diskfree "$j2se_required_space"
read_maintainer_info
j2se_package="$j2se_vendor-j2re$j2se_release"
- j2se_package_debian="${j2se_package}debian"
j2se_base="/usr/lib/j2re$j2se_release-$j2se_vendor"
local target="$install_dir$j2se_base"
install -d -m 755 "$( dirname "$target" )"
--- /cvsroot/pkg-java/java-package/lib/j2sdk.sh 2004/10/11 23:24:31 1.3
+++ /cvsroot/pkg-java/java-package/lib/j2sdk.sh 2005/01/24 23:07:44 1.4
@@ -11,7 +11,7 @@
cat << EOF
Package: $j2se_package
Architecture: any
-Depends: \${shlibs:Depends}, $j2se_package_debian
+Depends: \${shlibs:Depends}
Provides: java-common, java-virtual-machine, java-runtime, java2-runtime, java-browser-plugin, java-compiler, java2-compiler, j2sdk$j2se_release, j2re$j2se_release
Description: $j2se_title
The Java(TM) 2 SDK is a development environment for building
@@ -50,7 +50,6 @@
diskfree "$j2se_required_space"
read_maintainer_info
j2se_package="$j2se_vendor-j2sdk$j2se_release"
- j2se_package_debian="${j2se_package}debian"
j2se_base="/usr/lib/j2sdk$j2se_release-$j2se_vendor"
local target="$install_dir$j2se_base"
install -d -m 755 "$( dirname "$target" )"
--- /cvsroot/pkg-java/java-package/lib/j2se.sh 2004/10/11 23:24:31 1.3
+++ /cvsroot/pkg-java/java-package/lib/j2se.sh 2005/01/24 23:07:44 1.4
@@ -28,7 +28,7 @@
Section: non-free/devel
Priority: optional
Maintainer: $maintainer_name <$maintainer_email>
-Build-Depends: debhelper (>= 4.0.0), $j2se_package_debian
+Build-Depends: debhelper (>= 4.0.0)
Standards-Version: 3.6.0
EOF
@@ -66,43 +66,43 @@
}
function j2se_install_scripts() {
- # postinst
cat > "$debian_dir/postinst" << EOF
-#! /bin/sh
+#!/bin/sh
set -e
-case "\$1" in
- configure)
- program="$j2se_base/debian/install"
- [ -x "\$program" ] && "\$program"
- ;;
-esac
+if [ "\$1" = configure ]; then
+EOF
+ cat "$lib_dir/$j2se_package/install" >> "$debian_dir/postinst"
+
+ cat >> "$debian_dir/postinst" << EOF
+fi
#DEBHELPER#
exit 0
EOF
- chmod 755 "$debian_dir/postinst"
-
- # prerm
- cat > "$debian_dir/prerm" << EOF
-#! /bin/sh
+ chmod 755 "$debian_dir/postinst"
+
+ cat > "$debian_dir/prerm" << EOF
+#!/bin/sh
set -e
case "\$1" in
- remove|deconfigure)
- program="$j2se_base/debian/remove"
- [ -x "\$program" ] && "\$program"
- ;;
+ remove | deconfigure)
+EOF
+ cat "$lib_dir/$j2se_package/remove" >> "$debian_dir/prerm"
+
+ cat >> "$debian_dir/prerm" << EOF
+ ;;
esac
#DEBHELPER#
exit 0
EOF
- chmod 755 "$debian_dir/prerm"
+ chmod 755 "$debian_dir/prerm"
}
function j2se_info() {
@@ -174,8 +174,6 @@
The Debian package has been created in the current directory. You can
install the package as root (e.g. dpkg -i $deb_filename).
-You should also install the corresponding package with Debian specific
-parts (e.g. apt-get install $j2se_package_debian).
EOF
}
--- /cvsroot/pkg-java/java-package/lib/sun-j2re.sh 2005/01/04 03:16:35 1.7
+++ /cvsroot/pkg-java/java-package/lib/sun-j2re.sh 2005/01/24 23:07:44 1.8
@@ -5,11 +5,6 @@
case "$DEB_BUILD_GNU_TYPE" in
"i386-linux")
case "$archive_name" in
- "j2re-1_3_1_"[0-9][0-9]"-linux-i586.bin") # SUPPORTED
- j2se_version="1.3.1+${archive_name:11:2}"
- j2se_expected_min_size=38 # 39089 kB
- found=true
- ;;
"j2re-1_4_1_"[0-9][0-9]"-linux-i586.bin") # SUPPORTED
j2se_version="1.4.1+${archive_name:11:2}"
j2se_expected_min_size=54 # 55392 kB
--- /cvsroot/pkg-java/java-package/lib/sun-j2sdk.sh 2005/01/04 03:16:36 1.6
+++ /cvsroot/pkg-java/java-package/lib/sun-j2sdk.sh 2005/01/24 23:07:44 1.7
@@ -5,11 +5,6 @@
case "$DEB_BUILD_GNU_TYPE" in
"i386-linux")
case "$archive_name" in
- "j2sdk-1_3_1_"[0-9][0-9]"-linux-i586.bin") # SUPPORTED
- j2se_version="1.3.1+${archive_name:12:2}"
- j2se_expected_min_size=54 # 56259 kB
- found=true
- ;;
"j2sdk-1_4_1_"[0-9][0-9]"-linux-i586.bin") # SUPPORTED
j2se_version="1.4.1+${archive_name:12:2}"
j2se_expected_min_size=77 # 79515 kB
@@ -68,7 +63,7 @@
j2se_expected_min_size=110 # 112940 kB
found=true
;;
- "jdk-1_5_0"[0-9][0-9]"-linux-amd64.bin") # SUPPORTED
+ "jdk-1_5_0_"[0-9][0-9]"-linux-amd64.bin") # SUPPORTED
j2se_version=1.5.0+update${archive_name:10:2}
j2se_expected_min_size=105
found=true