Your message dated Tue, 17 Jun 2014 19:03:35 +0000
with message-id <[email protected]>
and subject line Bug#745762: fixed in java-package 0.55
has caused the Debian Bug report #745762,
regarding java-package: Please support creating a Debian source package
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [email protected]
immediately.)


-- 
745762: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=745762
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Package: java-package
Version: 0.54
Severity: wishlist
Tags: patch

Please support creating a Debian source package instead of only creating a
Debian binary package. I want to use make-jpkg to create a Debian source package
that I can upload to our build infrastructure to get it build and released to
our local repository.

I created a bunch of patches (attached) to create a full source package that can
be build with dpkg-buildpackage.
>From 863de6685b954cdacef2a51cc81c320620a00cfd Mon Sep 17 00:00:00 2001
From: Benjamin Drung <[email protected]>
Date: Thu, 24 Apr 2014 22:03:08 +0200
Subject: [PATCH 7/8] Fix path reference of copyright files.

---
 lib/javase.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/javase.sh b/lib/javase.sh
index d8ea025..7efc779 100644
--- a/lib/javase.sh
+++ b/lib/javase.sh
@@ -51,7 +51,7 @@ EOF
     while read file; do
         cat << EOF
 
-File: /$file
+File: $jvm_base$file
 
 ----------------------------------------------------------------------
 
-- 
1.9.1

>From 963868700195579560097814cff159da39992acd Mon Sep 17 00:00:00 2001
From: Benjamin Drung <[email protected]>
Date: Thu, 24 Apr 2014 17:26:12 +0200
Subject: [PATCH 2/8] Bump Standards-Version of guest package to 3.9.5.

---
 lib/javase.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/javase.sh b/lib/javase.sh
index 65c6272..e8b1cce 100644
--- a/lib/javase.sh
+++ b/lib/javase.sh
@@ -29,7 +29,7 @@ Section: non-free/devel
 Priority: optional
 Maintainer: $maintainer_name <$maintainer_email>
 Build-Depends: debhelper (>= 4.0.0)
-Standards-Version: 3.7.2
+Standards-Version: 3.9.5
 
 EOF
 }
-- 
1.9.1

>From 1bdd95a489fdd6698d903a8ed6856538ada7dbd8 Mon Sep 17 00:00:00 2001
From: Benjamin Drung <[email protected]>
Date: Thu, 24 Apr 2014 21:51:14 +0200
Subject: [PATCH 5/8] Add ${misc:Depends} to the guest dependency.

---
 lib/jdk-doc.sh | 4 +---
 lib/jdk.sh     | 2 +-
 lib/jre.sh     | 2 +-
 3 files changed, 3 insertions(+), 5 deletions(-)

diff --git a/lib/jdk-doc.sh b/lib/jdk-doc.sh
index 4dbfa04..a1891ba 100644
--- a/lib/jdk-doc.sh
+++ b/lib/jdk-doc.sh
@@ -3,9 +3,7 @@ j2sdk_doc_control() {
     cat << EOF
 Package: $j2se_package
 Architecture: any
-Depends: 
-Recommends: 
-Provides: 
+Depends: \${misc:Depends}
 Description: $j2se_title
  The Java(TM) SE JDK is a development environment for building
  applications, applets, and components that can be deployed on the
diff --git a/lib/jdk.sh b/lib/jdk.sh
index 55802e6..220f213 100644
--- a/lib/jdk.sh
+++ b/lib/jdk.sh
@@ -15,7 +15,7 @@ j2sdk_control() {
     cat << EOF
 Package: $j2se_package
 Architecture: any
-Depends: $depends
+Depends: \${misc:Depends}, $depends
 Recommends: netbase
 Provides: java-virtual-machine, java-runtime, java2-runtime, java${j2se_release}-runtime, java$((${j2se_release}-1))-runtime, java$((${j2se_release}-2))-runtime, $java_browser_plugin java-compiler, java2-compiler, java-runtime-headless, java2-runtime-headless, java${j2se_release}-runtime-headless, java$((${j2se_release}-1))-runtime-headless, java$((${j2se_release}-2))-runtime-headless, java-sdk, java2-sdk, java$((${j2se_release}-2))-sdk, java$((${j2se_release}-1))-sdk, java${j2se_release}-sdk
 Description: $j2se_title
diff --git a/lib/jre.sh b/lib/jre.sh
index 9d12cb6..9154993 100644
--- a/lib/jre.sh
+++ b/lib/jre.sh
@@ -4,7 +4,7 @@ j2re_control() {
     cat << EOF
 Package: $j2se_package
 Architecture: any
-Depends: \${shlibs:Depends}
+Depends: \${misc:Depends}, \${shlibs:Depends}
 Recommends: netbase
 Provides: java-virtual-machine, java-runtime, java2-runtime, java${j2se_release}-runtime, java$((${j2se_release}-1))-runtime, java$((${j2se_release}-2))-runtime, java-runtime-headless, java2-runtime-headless, java${j2se_release}-runtime-headless, java$((${j2se_release}-1))-runtime-headless, java$((${j2se_release}-2))-runtime-headless, java-browser-plugin
 Description: $j2se_title
-- 
1.9.1

>From 4afb08b562eb8d8f9ece2e477d108baf41ffedf1 Mon Sep 17 00:00:00 2001
From: Benjamin Drung <[email protected]>
Date: Thu, 24 Apr 2014 17:28:30 +0200
Subject: [PATCH 3/8] Use debhelper 9 for guest package.

---
 debian/control | 2 +-
 lib/javase.sh  | 3 +--
 lib/jdk-doc.sh | 2 +-
 lib/jdk.sh     | 2 +-
 lib/jre.sh     | 2 +-
 5 files changed, 5 insertions(+), 6 deletions(-)

diff --git a/debian/control b/debian/control
index 834396c..753f37b 100644
--- a/debian/control
+++ b/debian/control
@@ -10,7 +10,7 @@ Vcs-Browser: http://anonscm.debian.org/gitweb/?p=pkg-java/java-package.git
 
 Package: java-package
 Architecture: all
-Depends: ${misc:Depends}, debhelper, fakeroot, unzip, libx11-6, libasound2,
+Depends: ${misc:Depends}, debhelper (>= 9), fakeroot, unzip, libx11-6, libasound2,
  lsb-release
 Recommends: dpkg-dev, gcc
 Suggests: openjdk-7-jre
diff --git a/lib/javase.sh b/lib/javase.sh
index e8b1cce..cb4ed49 100644
--- a/lib/javase.sh
+++ b/lib/javase.sh
@@ -28,7 +28,7 @@ Source: $j2se_package
 Section: non-free/devel
 Priority: optional
 Maintainer: $maintainer_name <$maintainer_email>
-Build-Depends: debhelper (>= 4.0.0)
+Build-Depends: debhelper (>= 9)
 Standards-Version: 3.9.5
 
 EOF
@@ -197,7 +197,6 @@ j2se_build() {
     echo "Create debian package:"
     
     #export DH_VERBOSE=1
-    export DH_COMPAT=7
     export DH_OPTIONS=--tmpdir="$install_dir"
 
     echo "    dh_testdir"
diff --git a/lib/jdk-doc.sh b/lib/jdk-doc.sh
index 2e3924d..d9efde7 100644
--- a/lib/jdk-doc.sh
+++ b/lib/jdk-doc.sh
@@ -44,7 +44,7 @@ j2sdk_doc_run() {
     install -d -m 755 "$( dirname "$target" )"
     extract_bin "$archive_path" "$j2se_expected_min_size" "$target"
     rm -rf "$target/.systemPrefs"
-    echo "7" > "$debian_dir/compat"
+    echo "9" > "$debian_dir/compat"
     j2se_readme > "$debian_dir/README.Debian"
     j2se_changelog > "$debian_dir/changelog"
     j2sdk_doc_control > "$debian_dir/control"
diff --git a/lib/jdk.sh b/lib/jdk.sh
index 29b2f8a..9205fab 100644
--- a/lib/jdk.sh
+++ b/lib/jdk.sh
@@ -44,7 +44,7 @@ j2sdk_run() {
     install -d -m 755 "$( dirname "$target" )"
     extract_bin "$archive_path" "$j2se_expected_min_size" "$target"
     rm -rf "$target/.systemPrefs"
-    echo "7" > "$debian_dir/compat"
+    echo "9" > "$debian_dir/compat"
     j2se_readme > "$debian_dir/README.Debian"
     j2se_changelog > "$debian_dir/changelog"
     j2sdk_control > "$debian_dir/control"
diff --git a/lib/jre.sh b/lib/jre.sh
index 850c18f..5231e38 100644
--- a/lib/jre.sh
+++ b/lib/jre.sh
@@ -30,7 +30,7 @@ j2re_run() {
     install -d -m 755 "$( dirname "$target" )"
     extract_bin "$archive_path" "$j2se_expected_min_size" "$target"
     rm -rf "$target/.systemPrefs"
-    echo "7" > "$debian_dir/compat"
+    echo "9" > "$debian_dir/compat"
     j2se_readme > "$debian_dir/README.Debian"
     j2se_changelog > "$debian_dir/changelog"
     j2re_control > "$debian_dir/control"
-- 
1.9.1

>From 515a468b68f1f5eb980a1cbe5268b7a666b08376 Mon Sep 17 00:00:00 2001
From: Benjamin Drung <[email protected]>
Date: Thu, 24 Apr 2014 21:56:43 +0200
Subject: [PATCH 6/8] Remove trailing spaces.

---
 README            |  2 +-
 debian/changelog  | 36 ++++++++++++++++++------------------
 debian/copyright  |  2 +-
 lib/common.sh     | 14 +++++++-------
 lib/javase.sh     | 10 +++++-----
 lib/oracle-jdk.sh |  4 ++--
 make-jpkg         |  6 +++---
 make-jpkg.1       |  4 ++--
 8 files changed, 39 insertions(+), 39 deletions(-)

diff --git a/README b/README
index 7367c22..4436370 100644
--- a/README
+++ b/README
@@ -1,5 +1,5 @@
 
-* To be done : 
+* To be done :
 
 - update java-package wiki page : http://wiki.debian.org/JavaPackage?action=edit&editor=text
 - make symbolic links for j2se/jre/bin/* in j2se/bin/ to avoid duplication
diff --git a/debian/changelog b/debian/changelog
index ef3d97d..46c198d 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -134,7 +134,7 @@ java-package (0.50) unstable; urgency=low
   * debian-rules-missing-recommended-target removed
   * maintainer-script-lacks-debhelper-token removed
   * Declare the debian/compat to 7 to avoid warnings
-  
+
   [ Michael Koch ]
   * Remove Java plugins for all browsers (Closes: #367887).
   * Add support for Sun Java 6 Update XX (Closes: #514364).
@@ -257,13 +257,13 @@ java-package (0.28) unstable; urgency=low
     (Closes: #338569)
   * Corrected pathing for alternatives installation for Mozilla and
     Firefox plugins (Closes: #341751)
-  * Relaxed architectural restrictions on plugin alternative 
+  * Relaxed architectural restrictions on plugin alternative
     installation for IBM Java 5 JREs and JDKs (Closes: #343837)
   * Added plugin installation for the new packaging of Firefox 1.5 and
     later (Closes: #341749)
-  * Modified warning suppression for dh_shlibdeps to accommodate 
+  * Modified warning suppression for dh_shlibdeps to accommodate
     changes in dpkg-dev (Closes: #354427)
-  * Added quotes to variable tests for maintainer name and email 
+  * Added quotes to variable tests for maintainer name and email
     (Closes: #342623)
   * Refactored architecture evaluation to eliminate repetition and
     evaluate DEB_BUILD_GNU_TYPE correctly for i486-linux-gnu
@@ -289,7 +289,7 @@ java-package (0.26) unstable; urgency=low
   * Resolve issues with powerpc-linux support detection (Closes: #317671)
   * Added support for Blackdown 1.4.2+02 release (Closes: #316831)
   * Added support for packaging Sun JDK documentation (Closes: #272971)
-  * Modified make-jpkg behavior to default the generated packages' 
+  * Modified make-jpkg behavior to default the generated packages'
     name and email address for the maintainer to Debian Java Maintainers
     (Closes: #325554)
 
@@ -305,7 +305,7 @@ java-package (0.25) unstable; urgency=low
 java-package (0.24) unstable; urgency=low
 
   * Added plugin alternatives support for i386 IBM JREs and JDKs
-  * Corrected pathing for plugin alternatives to reflect difference in 
+  * Corrected pathing for plugin alternatives to reflect difference in
     layout between JREs and JDKs for Sun and Blackdown (Closes: #305219,
     #301806)
 
@@ -313,7 +313,7 @@ java-package (0.24) unstable; urgency=low
 
 java-package (0.23.1) experimental; urgency=low
 
-  * Added architecture-specific pathing for plugin alternatives for 
+  * Added architecture-specific pathing for plugin alternatives for
     Blackdown 1.3 and 1.4 JREs and JDKs
 
  -- Barry Hawkins <[email protected]>  Wed, 06 Apr 2005 00:03:40 -0500
@@ -321,9 +321,9 @@ java-package (0.23.1) experimental; urgency=low
 java-package (0.23) unstable; urgency=low
 
   * Further expanded 1.3.1 Blackdown JRE/JDK support for i386
-  * Added architecture-specific pathing for plugin alternatives for 
+  * Added architecture-specific pathing for plugin alternatives for
     Sun 1.4 and 1.5 JREs and JDKs (Closes: #301806)
-  * Added recommends for system elements required by applets and 
+  * Added recommends for system elements required by applets and
     graphical user interface elements (Closes: #300817)
   * Jeroen van Wolffelaar:
     + Fixed packages description to not have too long lines, and make the 3
@@ -336,24 +336,24 @@ java-package (0.22.1) experimental; urgency=low
   * Corrected IBM and Blackdown JRE/JDK file size specifications
   * Added support for additional 1.3.1 Blackdown JREs and JDKs for i386,
     powerpc (Closes: #301092)
-  * Added installation of javaws alternative for Sun 1.5 JREs and JDKs 
+  * Added installation of javaws alternative for Sun 1.5 JREs and JDKs
     (Closes: #300303)
 
  -- Barry Hawkins <[email protected]>  Thu, 24 Mar 2005 13:20:18 -0500
 
 java-package (0.22) unstable; urgency=low
 
-  * Corrected IBM JRE/JDK scripts to accurately reflect the supported 
+  * Corrected IBM JRE/JDK scripts to accurately reflect the supported
     IBM JDKs and JREs in the generated SUPPORTED file
 
  -- Barry Hawkins <[email protected]>  Fri, 18 Mar 2005 10:21:53 -0500
 
 java-package (0.21) unstable; urgency=low
 
-  * Enable support for IBM JDKs and JREs for x86, amd64, powerpc, 
-    powerpc64, and s390 architectures, based upon a patch by Rico 
+  * Enable support for IBM JDKs and JREs for x86, amd64, powerpc,
+    powerpc64, and s390 architectures, based upon a patch by Rico
     Schiekel (Closes: #264137)
-  * Enable suppport for Blackdown 1.3.1 JDK and JRE for PowerPC 
+  * Enable suppport for Blackdown 1.3.1 JDK and JRE for PowerPC
     architecture. (Closes: #296205)
   * Update documentation and to reflect current supported JDKs and JREs
 
@@ -475,7 +475,7 @@ java-package (0.12) unstable; urgency=low
 
 java-package (0.11) unstable; urgency=low
 
-  * change package name java-package and the command build package is 
+  * change package name java-package and the command build package is
     make-jpkg.
 
  -- Takashi Okamoto <[email protected]>  Sat, 31 Jul 2004 15:07:36 +0900
@@ -483,9 +483,9 @@ java-package (0.11) unstable; urgency=low
 java-package (0.10) unstable; urgency=low
 
   * change package name mpkg-j2se.
-  * not use *-j2[re|sdk]debian package. Instead of this, add package 
-    dependency to generated package. This reduce the installation for 
-    such extra package. 
+  * not use *-j2[re|sdk]debian package. Instead of this, add package
+    dependency to generated package. This reduce the installation for
+    such extra package.
   * SUN's jdk1.5 beta2 support.
 
  -- Takashi Okamoto <[email protected]>  Sun, 18 Jul 2004 13:53:36 +0900
diff --git a/debian/copyright b/debian/copyright
index 3028586..e77187e 100644
--- a/debian/copyright
+++ b/debian/copyright
@@ -19,7 +19,7 @@ License: GPL-2
  .
  You should have received a copy of the GNU General Public License
  along with this package; if not, write to the Free Software
- Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  
+ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
  02110-1301  USA.
  .
  On Debian systems, the complete text of the GNU General Public License
diff --git a/lib/common.sh b/lib/common.sh
index a9ed231..ec10531 100644
--- a/lib/common.sh
+++ b/lib/common.sh
@@ -69,7 +69,7 @@ EOF
     mkdir "$extract_dir"
     cd "$extract_dir"
     echo
-    
+
     local extract_cmd
     case "$archive_path" in
     *.tar)
@@ -83,7 +83,7 @@ EOF
     *)
         extract_cmd=sh
     esac
-    
+
     if ! $extract_cmd "$archive_path"; then
     cat << EOF
 
@@ -137,7 +137,7 @@ read_maintainer_info() {
         maintainer_name="$DEBNAME"
     else
         default_name="$(getent passwd $(id -run) | cut -d: -f5| cut -d, -f1)"
-    
+
     cat << EOF
 
 Please enter your full name. This value will be used in the maintainer
@@ -154,12 +154,12 @@ EOF
     done
     fi
     fi
-    
+
     if [ -z "$maintainer_email" ]; then
     local default_email=
     if [ -n "$DEBEMAIL" ]; then
         maintainer_email="$DEBEMAIL"
-    else 
+    else
     if [ -r "/etc/mailname" ]; then
         default_email="$( id -run )@$( cat /etc/mailname )"
     else
@@ -187,9 +187,9 @@ get_architecture() {
     export DEB_BUILD_ARCH=$(dpkg-architecture -qDEB_BUILD_ARCH)
 
     export DEB_BUILD_GNU_TYPE=$(dpkg-architecture -qDEB_BUILD_GNU_TYPE)
-    
+
     echo "Detected Debian build architecture: ${DEB_BUILD_ARCH:-N/A}"
-    
+
     echo "Detected Debian GNU type: ${DEB_BUILD_GNU_TYPE:-N/A}"
 }
 
diff --git a/lib/javase.sh b/lib/javase.sh
index c3c6a88..d8ea025 100644
--- a/lib/javase.sh
+++ b/lib/javase.sh
@@ -3,7 +3,7 @@ j2se_readme() {
 Package for $j2se_title
 ---
 
-This package has been automatically created with java-package ($version). 
+This package has been automatically created with java-package ($version).
 All files from the original distribution should have been installed in
 the directory $jvm_base$j2se_name. Please take a look at this directory for
 further information.
@@ -45,7 +45,7 @@ subdirectories.
 
 ----------------------------------------------------------------------
 EOF
-    ( 
+    (
     cd "$package_dir"
     find * -type f -iname copyright ! -path debian/copyright |
     while read file; do
@@ -137,7 +137,7 @@ fi
 exit 0
 EOF
     chmod 755 "$debian_dir/postinst"
-    
+
     cat > "$debian_dir/prerm" << EOF
 #!/bin/bash
 
@@ -194,7 +194,7 @@ jinfos() {
     program_base="$2"
     shift ; shift
     for program in $*; do
-      echo "$prefix $program $program_base$program" 
+      echo "$prefix $program $program_base$program"
     done
 }
 
@@ -207,7 +207,7 @@ j2se_build() {
     local deb_filename="$( echo "${j2se_package}_"*.deb )"
     echo "    copy $deb_filename into directory $working_dir/"
     cp "$deb_filename" "$working_dir/"
-    if [ -n "$genchanges" ]; then 
+    if [ -n "$genchanges" ]; then
         echo "    dpkg-genchanges"
         local changes_filename="${deb_filename%.deb}.changes"
         echo "    copy $changes_filename into directory $working_dir/"
diff --git a/lib/oracle-jdk.sh b/lib/oracle-jdk.sh
index 6d45ce5..aba8be5 100644
--- a/lib/oracle-jdk.sh
+++ b/lib/oracle-jdk.sh
@@ -74,8 +74,8 @@ oracle_j2sdk_detect() {
       echo "The archive $archive_name is not supported on the ${DEB_BUILD_ARCH} architecture"
       return
     fi
-    
-    
+
+
     cat << EOF
 
 Detected product:
diff --git a/make-jpkg b/make-jpkg
index a075633..9eb0fab 100755
--- a/make-jpkg
+++ b/make-jpkg
@@ -15,8 +15,8 @@ lib_dir="/usr/share/java-package"
 [ "$J2SE_PACKAGE_LIBDIR" ] && lib_dir="$J2SE_PACKAGE_LIBDIR"
 
 # If a default has been set for either of the
-# environment variables, use it; otherwise, 
-# default to the name and email used by the 
+# environment variables, use it; otherwise,
+# default to the name and email used by the
 # Debian Java Maintainers project.
 if [ -z "$J2SE_PACKAGE_FULL_NAME" ]; then
     maintainer_name="Debian Java Maintainers"
@@ -226,7 +226,7 @@ jvm_base="/usr/lib/jvm/"
 javadoc_base="/usr/share/doc/"
 
 j2se_found=
-for var in ${!j2se_detect_*}; do 
+for var in ${!j2se_detect_*}; do
     eval "\$$var"
     if [[ "$j2se_found" == "true" ]]; then
     break;
diff --git a/make-jpkg.1 b/make-jpkg.1
index 9575561..2b6baad 100644
--- a/make-jpkg.1
+++ b/make-jpkg.1
@@ -22,7 +22,7 @@ make-jpkg \- builds Debian packages from Java binary distributions
 [\fIOPTION\fR]... [\fIFILE\fR]
 .SH DESCRIPTION
 .\" TeX users may be more comfortable with the \fB<whatever>\fP and
-.\" \fI<whatever>\fP escape sequences to invode bold face and italics, 
+.\" \fI<whatever>\fP escape sequences to invode bold face and italics,
 .\" respectively.
 .PP
 \fBmake-jpkg\fP builds a Debian package from the given Java
@@ -65,7 +65,7 @@ information and builds a Debian binary package in the current
 directory.
 .PP
 The program requires about 200 MB free disk space in a temporary
-directory. The temporary directory defaults to 
+directory. The temporary directory defaults to
 .I /tmp
 but you can specify an alternate directory by setting the environment
 variable \fITMPDIR\fR.
-- 
1.9.1

>From 60dde2b9a5eeecc67b5cf15f0597cf31a2375505 Mon Sep 17 00:00:00 2001
From: Benjamin Drung <[email protected]>
Date: Thu, 24 Apr 2014 21:45:55 +0200
Subject: [PATCH 4/8] Use dpkg-buildpackage to build the guest package.

---
 debian/control |  4 ++--
 lib/javase.sh  | 58 ++++++++++++----------------------------------------------
 lib/jdk-doc.sh |  3 ++-
 lib/jdk.sh     |  6 ++++--
 lib/jre.sh     |  6 ++++--
 make-jpkg      |  8 ++++----
 6 files changed, 28 insertions(+), 57 deletions(-)

diff --git a/debian/control b/debian/control
index 753f37b..db98df0 100644
--- a/debian/control
+++ b/debian/control
@@ -10,9 +10,9 @@ Vcs-Browser: http://anonscm.debian.org/gitweb/?p=pkg-java/java-package.git
 
 Package: java-package
 Architecture: all
-Depends: ${misc:Depends}, debhelper (>= 9), fakeroot, unzip, libx11-6, libasound2,
+Depends: ${misc:Depends}, debhelper (>= 9), dpkg-dev, fakeroot, unzip, libx11-6, libasound2,
  lsb-release
-Recommends: dpkg-dev, gcc
+Recommends: gcc
 Suggests: openjdk-7-jre
 Description: Utility for creating Java Debian packages
  This package provides the capability to build a Debian package from
diff --git a/lib/javase.sh b/lib/javase.sh
index cb4ed49..c3c6a88 100644
--- a/lib/javase.sh
+++ b/lib/javase.sh
@@ -46,8 +46,8 @@ subdirectories.
 ----------------------------------------------------------------------
 EOF
     ( 
-    cd "$install_dir"
-    find * -type f -iname copyright |
+    cd "$package_dir"
+    find * -type f -iname copyright ! -path debian/copyright |
     while read file; do
         cat << EOF
 
@@ -71,6 +71,12 @@ j2se_rules() {
 
 %:
 	dh \$@
+
+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 -l\$(shell find $j2se_name -type f -name '*.so*' -printf '${jvm_base##/}/%h\n' | sort -u | tr '\n' ':' | sed 's/:\$\$//')
 EOF
 }
 
@@ -193,57 +199,17 @@ jinfos() {
 }
 
 j2se_build() {
-    cd "$tmp"
+    cd "$package_dir"
     echo "Create debian package:"
-    
-    #export DH_VERBOSE=1
-    export DH_OPTIONS=--tmpdir="$install_dir"
-
-    echo "    dh_testdir"
-    dh_testdir
-    echo "    dh_testroot"
-    dh_testroot
-    echo "    dh_installchangelogs"
-    dh_installchangelogs
-    # Problem: dh_installchangelogs thinks this is a native package.
-    echo "    dh_installdocs"
-    dh_installdocs
-    # dh_install
-    # dh_link
-    # Conditionally wrapping this as not all JRE/JDKs have man directories
-    if [ -e "$install_dir/$jvm_base$j2se_name/man" ]; then
-        echo "    dh_compress"
-        dh_compress $( find "$install_dir/$jvm_base$j2se_name/man" -type f ! -name "*.gz" )
-    fi
-    echo "    dh_fixperms"
-    dh_fixperms
-    echo "    dh_installdeb"
-    dh_installdeb
-    echo "    dh_shlibdeps"
-    ldpath=
-    for dir in $( find "$install_dir" -type f -name "*.so*" -printf "%h\n" | sort -u ); do
-        if [[ -z "$ldpath" ]]; then
-            ldpath="$dir"
-        else
-            ldpath="$ldpath:$dir"
-        fi
-    done
-    # suppress some warnings
-    dh_shlibdeps --exclude=fxavcodecplugin -l"$ldpath" 2>&1 |
-    { grep -v "warning: format of \`NEEDED lib.*\.so' not recognized" >&2 || true; }
-    echo "    dh_gencontrol"
-    dh_gencontrol
-    echo "    dh_md5sums"
-    dh_md5sums
-    echo "    dh_builddeb"
-    dh_builddeb --destdir="$tmp"
+
+    dpkg-buildpackage -b -uc -us
+    cd "$tmp"
     local deb_filename="$( echo "${j2se_package}_"*.deb )"
     echo "    copy $deb_filename into directory $working_dir/"
     cp "$deb_filename" "$working_dir/"
     if [ -n "$genchanges" ]; then 
         echo "    dpkg-genchanges"
         local changes_filename="${deb_filename%.deb}.changes"
-        dpkg-genchanges -b -u. > "$changes_filename"
         echo "    copy $changes_filename into directory $working_dir/"
         cp "$changes_filename" "$working_dir/"
     fi
diff --git a/lib/jdk-doc.sh b/lib/jdk-doc.sh
index d9efde7..4dbfa04 100644
--- a/lib/jdk-doc.sh
+++ b/lib/jdk-doc.sh
@@ -40,7 +40,7 @@ j2sdk_doc_run() {
     read_maintainer_info
     j2se_package="$j2se_vendor-java$j2se_release-doc"
     j2se_name="jdk$j2se_release-$j2se_vendor-doc"
-    local target="$install_dir$javadoc_base$j2se_name"
+    local target="$package_dir/$j2se_name"
     install -d -m 755 "$( dirname "$target" )"
     extract_bin "$archive_path" "$j2se_expected_min_size" "$target"
     rm -rf "$target/.systemPrefs"
@@ -49,6 +49,7 @@ j2sdk_doc_run() {
     j2se_changelog > "$debian_dir/changelog"
     j2sdk_doc_control > "$debian_dir/control"
     j2se_copyright > "$debian_dir/copyright"
+    echo "$j2se_name $javadoc_base" > "$debian_dir/install"
     j2sdk_doc_doc-base > "$debian_dir/$j2se_package.doc-base"
     j2se_rules > "$debian_dir/rules"
     chmod +x "$debian_dir/rules"
diff --git a/lib/jdk.sh b/lib/jdk.sh
index 9205fab..55802e6 100644
--- a/lib/jdk.sh
+++ b/lib/jdk.sh
@@ -40,7 +40,7 @@ j2sdk_run() {
     read_maintainer_info
     j2se_package="$j2se_vendor-java$j2se_release-jdk"
     j2se_name="jdk-$j2se_release-$j2se_vendor-$j2se_arch"
-    local target="$install_dir$jvm_base$j2se_name"
+    local target="$package_dir/$j2se_name"
     install -d -m 755 "$( dirname "$target" )"
     extract_bin "$archive_path" "$j2se_expected_min_size" "$target"
     rm -rf "$target/.systemPrefs"
@@ -49,11 +49,13 @@ j2sdk_run() {
     j2se_changelog > "$debian_dir/changelog"
     j2sdk_control > "$debian_dir/control"
     j2se_copyright > "$debian_dir/copyright"
+    echo "$j2se_name $jvm_base" > "$debian_dir/install"
     j2se_rules > "$debian_dir/rules"
     chmod +x "$debian_dir/rules"
     j2se_install_scripts
     install -d "$target/debian"
     j2se_info > "$target/debian/info"
-    eval "$j2se_jinfo" > "$install_dir$jvm_base.$j2se_name.jinfo"
+    eval "$j2se_jinfo" > "$package_dir/.$j2se_name.jinfo"
+    echo ".$j2se_name.jinfo $jvm_base" >> "$debian_dir/install"
     j2se_build
 }
diff --git a/lib/jre.sh b/lib/jre.sh
index 5231e38..9d12cb6 100644
--- a/lib/jre.sh
+++ b/lib/jre.sh
@@ -26,7 +26,7 @@ j2re_run() {
     read_maintainer_info
     j2se_package="$j2se_vendor-java$j2se_release-jre"
     j2se_name="jre-$j2se_release-$j2se_vendor-$j2se_arch"
-    local target="$install_dir$jvm_base$j2se_name"
+    local target="$package_dir/$j2se_name"
     install -d -m 755 "$( dirname "$target" )"
     extract_bin "$archive_path" "$j2se_expected_min_size" "$target"
     rm -rf "$target/.systemPrefs"
@@ -35,11 +35,13 @@ j2re_run() {
     j2se_changelog > "$debian_dir/changelog"
     j2re_control > "$debian_dir/control"
     j2se_copyright > "$debian_dir/copyright"
+    echo "$j2se_name $jvm_base" > "$debian_dir/install"
     j2se_rules > "$debian_dir/rules"
     chmod +x "$debian_dir/rules"
     j2se_install_scripts
     install -d "$target/debian"
     j2se_info > "$target/debian/info"
-    eval "$j2se_jinfo" > "$install_dir$jvm_base.$j2se_name.jinfo"
+    eval "$j2se_jinfo" > "$package_dir/.$j2se_name.jinfo"
+    echo ".$j2se_name.jinfo $jvm_base" >> "$debian_dir/install"
     j2se_build
 }
diff --git a/make-jpkg b/make-jpkg
index f22594a..a075633 100755
--- a/make-jpkg
+++ b/make-jpkg
@@ -200,11 +200,11 @@ echo -n "Creating temporary directory: "
 tmp="$( mktemp -d -t "$program_name.XXXXXXXXXX" )"
 echo "$tmp"
 
-debian_dir="$tmp/debian"
-install -d -m 755 "$debian_dir"
+package_dir="$tmp/package"
+install -d -m 755 "$package_dir"
 
-install_dir="$tmp/install"
-install -d -m 755 "$install_dir"
+debian_dir="$package_dir/debian"
+install -d -m 755 "$debian_dir"
 
 # load and execute plugins
 echo -n "Loading plugins:"
-- 
1.9.1

>From 92c704efbdbe8a0ab8535dfc60cc8d616bcd309b Mon Sep 17 00:00:00 2001
From: Benjamin Drung <[email protected]>
Date: Thu, 24 Apr 2014 17:25:00 +0200
Subject: [PATCH 1/8] Create a debian/rules file.

---
 lib/javase.sh  | 9 +++++++++
 lib/jdk-doc.sh | 2 ++
 lib/jdk.sh     | 2 ++
 lib/jre.sh     | 2 ++
 4 files changed, 15 insertions(+)

diff --git a/lib/javase.sh b/lib/javase.sh
index 6e081cd..65c6272 100644
--- a/lib/javase.sh
+++ b/lib/javase.sh
@@ -65,6 +65,15 @@ EOF
     )
 }
 
+j2se_rules() {
+    cat << EOF
+#!/usr/bin/make -f
+
+%:
+	dh \$@
+EOF
+}
+
 j2se_install_scripts() {
     cat > "$debian_dir/postinst" << EOF
 #!/bin/bash
diff --git a/lib/jdk-doc.sh b/lib/jdk-doc.sh
index baca98e..2e3924d 100644
--- a/lib/jdk-doc.sh
+++ b/lib/jdk-doc.sh
@@ -50,6 +50,8 @@ j2sdk_doc_run() {
     j2sdk_doc_control > "$debian_dir/control"
     j2se_copyright > "$debian_dir/copyright"
     j2sdk_doc_doc-base > "$debian_dir/$j2se_package.doc-base"
+    j2se_rules > "$debian_dir/rules"
+    chmod +x "$debian_dir/rules"
     j2se_install_scripts
     install -d "$target/debian"
     j2se_info > "$target/debian/info"
diff --git a/lib/jdk.sh b/lib/jdk.sh
index ae8d96f..29b2f8a 100644
--- a/lib/jdk.sh
+++ b/lib/jdk.sh
@@ -49,6 +49,8 @@ j2sdk_run() {
     j2se_changelog > "$debian_dir/changelog"
     j2sdk_control > "$debian_dir/control"
     j2se_copyright > "$debian_dir/copyright"
+    j2se_rules > "$debian_dir/rules"
+    chmod +x "$debian_dir/rules"
     j2se_install_scripts
     install -d "$target/debian"
     j2se_info > "$target/debian/info"
diff --git a/lib/jre.sh b/lib/jre.sh
index da86095..850c18f 100644
--- a/lib/jre.sh
+++ b/lib/jre.sh
@@ -35,6 +35,8 @@ j2re_run() {
     j2se_changelog > "$debian_dir/changelog"
     j2re_control > "$debian_dir/control"
     j2se_copyright > "$debian_dir/copyright"
+    j2se_rules > "$debian_dir/rules"
+    chmod +x "$debian_dir/rules"
     j2se_install_scripts
     install -d "$target/debian"
     j2se_info > "$target/debian/info"
-- 
1.9.1

>From ef5b9525df011b2a8cf3b2c9bb2e954b00c077c5 Mon Sep 17 00:00:00 2001
From: Benjamin Drung <[email protected]>
Date: Thu, 24 Apr 2014 22:04:27 +0200
Subject: [PATCH 8/8] Remove empty new lines at end of files.

---
 lib/javase.sh | 2 --
 1 file changed, 2 deletions(-)

diff --git a/lib/javase.sh b/lib/javase.sh
index 7efc779..31c4bbb 100644
--- a/lib/javase.sh
+++ b/lib/javase.sh
@@ -7,7 +7,6 @@ This package has been automatically created with java-package ($version).
 All files from the original distribution should have been installed in
 the directory $jvm_base$j2se_name. Please take a look at this directory for
 further information.
-
 EOF
 }
 
@@ -18,7 +17,6 @@ $j2se_package ($j2se_version) unstable; urgency=low
   * This package was created with java-package ($version).
 
  -- $maintainer_name <$maintainer_email>  $( date -R )
-
 EOF
 }
 
-- 
1.9.1


--- End Message ---
--- Begin Message ---
Source: java-package
Source-Version: 0.55

We believe that the bug you reported is fixed in the latest version of
java-package, which is due to be installed in the Debian FTP archive.

A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to [email protected],
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Benjamin Drung <[email protected]> (supplier of updated 
java-package package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing [email protected])


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Format: 1.8
Date: Tue, 17 Jun 2014 20:41:39 +0200
Source: java-package
Binary: java-package
Architecture: source all
Version: 0.55
Distribution: unstable
Urgency: medium
Maintainer: Debian Java Maintainers 
<[email protected]>
Changed-By: Benjamin Drung <[email protected]>
Description:
 java-package - Utility for creating Java Debian packages
Closes: 743919 745762
Changes:
 java-package (0.55) unstable; urgency=medium
 .
   [ tony mancill ]
   * Team upload.
   * Add lsb-release to Depends (used in make-jpkg).
   * Apply patch to honor --revision argument.
     Thanks to Alberto Caso Palomino. (Closes: #743919)
 .
   [ Emmanuel Bourg ]
   * Bumped the Standards-Version of the generated package to 3.9.5
   * Use debhelper level 9 in the generated package
 .
   [ Benjamin Drung ]
   * Add a debian/rules file to the generated source package.
   * Use dpkg-buildpackage to build the guest package.
   * Add ${misc:Depends} to the guest dependency.
   * Add --source option to build a source package instead of a binary deb
     package. (Closes: #745762)
   * Replace lsb_release call by dpkg-vendor call.
   * Convert copyright file content to UTF-8 for guest debian/copyright.
   * Remove trailing spaces from copyright file.
   * Create build depends for JDK guest package.
Checksums-Sha1:
 5a68d66ceac0cdaa06b86c9a8acee8a901d49127 1628 java-package_0.55.dsc
 a93325f080442b6161706c7dd1c7113bde4644d5 18300 java-package_0.55.tar.xz
 aa2e672934a26888491d5ee876a28e164f25344a 20580 java-package_0.55_all.deb
Checksums-Sha256:
 65c832f68a4389773b9ee8d10bfe2bc88ba71baf4b61bde4cd81df4d72ba1e76 1628 
java-package_0.55.dsc
 1690a1c538309368ca80498b35c5e79eb331618c182d92ec85c737b57cff97c6 18300 
java-package_0.55.tar.xz
 ca3e1047445b927539f71979fc6e6c503da6bd8f0e4d5ef4d012d56bb32338b6 20580 
java-package_0.55_all.deb
Files:
 f779e35f37443f7d098c8c81d5948c5d 20580 contrib/misc optional 
java-package_0.55_all.deb
 5917305f39a061ccf4533d8b42c26271 1628 contrib/misc optional 
java-package_0.55.dsc
 84ca8687f5c6488c38f434927e27e48c 18300 contrib/misc optional 
java-package_0.55.tar.xz

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1

iQIcBAEBAgAGBQJToI0VAAoJEN2M1aXejH56blsQAJbGvlrMQg3XgiH3RD25hrm5
zJ2s8oc/SRnGSeJbdZkbmx/cwObwFVEyg2Tmrj04SgPIVDFVF8Wob8bhXDYstJ+5
bs6AIA5ElsHMSQ+3FJuRtZV5E18uVT3el1fKWFvmpFw+2y3xTn/0jmZyBcRPqKiQ
lkXspp6eiBORCJP1eZOuD53qf3In419x+MvaRY2rUIK+AnDANvFvSwJ7IUe7Zrtk
ZQKPoWDjUaeuKw8hh2rQluZDJwH8Rx8Ne3sbex7Jwktc0iRzT4S/fUG02yGGrrWl
tWAkTAKmPyJ0wxvcOOwc6s1UJcDr3tmI2otpOQauQodzjaigGqhMySVgTOiYK42r
m3Zp1wn18XK0eBxc/eiLIU4SbNGKsyVn4WVuqYWyUbDXprGjQXmYRsKwdsL1aaD1
8tBgtAZ2TJWi/ZABVIRkxydFG3vEsf+ErnMf2z98LeU3V0ScnnSnHL9LbaNtuUO5
s46mrwz7MC0Z7BMa7vkiFVazUen3tosUxKYIMWnWjJVRIu+sJklAVxnK5kalk5sP
rlWudKnW3f/2d2SXnTkEZgab32HoKPaph9q82aOATWN3ruaJR/5aSDXEtvYTenqW
vk1AN5HFhFQbf38Bw5PegGb/L0JqOg0/1g8dWTPERcEQmHF5xgAkn3TJ4NPirVJC
f8b5EML29GDv+9CzWeRZ
=g0QU
-----END PGP SIGNATURE-----

--- End Message ---
__
This is the maintainer address of Debian's Java team
<http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-java-maintainers>. 
Please use
[email protected] for discussions and questions.

Reply via email to