java-package-0.53/0000755000000000000000000000000012213611514010635 5ustar java-package-0.53/Makefile0000644000000000000000000000137212153621042012300 0ustar DESTDIR= .PHONY: default default: build .PHONY: build build: echo "java-package currently supports the following binary packages:" > SUPPORTED echo >> SUPPORTED echo "(This list is automatically generated, do not edit)" >> SUPPORTED echo >> SUPPORTED grep -h "SUPPORTED$$" $(wildcard lib/*-*.sh) | sed 's/"//g;s/).*//' >> SUPPORTED .PHONY: clean clean: rm -f SUPPORTED .PHONY: install install: install -d -m 755 $(DESTDIR)/usr/bin install -m 755 make-jpkg.out $(DESTDIR)/usr/bin/make-jpkg install -d -m 755 $(DESTDIR)/usr/share/man/man1 install -m 644 make-jpkg.1 $(DESTDIR)/usr/share/man/man1/ install -d -m 755 $(DESTDIR)/usr/share/java-package for file in lib/*.sh; do \ install -m 644 $$file $(DESTDIR)/usr/share/java-package/ ; \ done java-package-0.53/README0000644000000000000000000000307712153621042011524 0ustar * 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 - make symbolic links for j2se/jre/man/man1/* in j2se/man/man1 to avoid duplication - make symbolic links for j2se/jre/man/ja_JP.UTF-8 in j2se/man/ja to avoid duplication - install into a multiarch location to allow installing the i386 client vm on amd64 and ia64 (Matthias Klose ) - ? kinit, klist, and ktab not installed; handling of /etc/krb5.conf not addressed * Resources : http://wiki.debian.org/JavaPackage http://packages.qa.debian.org/j/java-package.html * Main variables used in the scripts : debian_dir : debian files dir during packaging, set by make-jpkg install_dir : package files dir during packaging, set by make-jpkg DEB_BUILD_ARCH = amd64, .., set by common.sh/get_architecture DEB_BUILD_GNU_TYPE = x86_64-linux-gnu, .., set by common.sh/get_architecture jvm_base : jvm package installation dir, set by make-jpkg javadoc_base : javadoc package installation dir, set by make-jpkg j2se_package : final package name, set by j2re/j2sdk/j2sdk-doc.sh j2se_name : name of installed package within jvm_base, set by j2re/j2sdk/j2sdk-doc.sh j2se_install : name of function generating postinst script content, set by each_provider*-j2re/j2sdk/j2sdk-doc.sh j2se_remove : name of function generating prerm script content, set by each_provider*-j2re/j2sdk/j2sdk-doc.sh j2se_jinfo : name of function generating .jinfo file content, set by each_provider*-j2re/j2sdk/j2sdk-doc.sh java-package-0.53/debian/0000755000000000000000000000000012213611736012065 5ustar java-package-0.53/debian/README.Debian0000644000000000000000000000211112213611514014113 0ustar java-package ------------ This package can be used to build Debian packages for various non-free external Java binary distributions. Please note that Debian recommends the use of openjdk-7-jdk/openjdk-7-jre. It includes the 'make-jpkg' command to do this, see 'man make-jpkg' for more information about building java packages. Typical usage consists in - downloading one of the java binary archive listed below - invoking make-jpkg to build a Debian package from the downloaded archive - installing the generated package Supported java binary distributions currently include: * Oracle (http://www.oracle.com/technetwork/java/javase/downloads) : - The J2SE Development Kit (JDK), version 6, 7 and 8 - The J2SE Runtime Environment (JRE), version 6, 7 and 8 - The J2SE API Javadoc, version 6, 7 and 8 (Choose tar.gz archives or self-extracting archives, do _not_ choose the RPM!) All other previously supported jvm (Blackdown, IBM, ..) have been removed and will only be added back on users demand. -- Cédric Pineau Thu, 22 Dec 2011 11:42:13 +0100 java-package-0.53/debian/changelog0000644000000000000000000005034512213611727013746 0ustar java-package (0.53) unstable; urgency=low * Team upload. * Added support for early access releases (Closes: #721136) * Added support for GA and FCS releases * Excluded the fxavcodecplugin libraries used by JavaFX from the dependency calculation performed by dh_shlibdeps to avoid errors (Closes: #687075) * Updated the package description and debian/README.Debian: - no longer recommend openjdk-6 - mention the compatibility with Java 8 * Removed 'Replaces: ${j2se_package}debian' from the generated control file * Adjusted the disk space required to unpack the Java 8 documentation * Updated the manpages for Java 8 * Updated debhelper level to 7 * debian/rules: Use dh_prep instead of dh_clean -k * Removed the recommended dependency on libstdc++5 from the generated control file (used by the now unsupported IBM JDK 5) * Removed the recommended dependency on libgtk1.2 from the generated control file (removed from Squeeze) * Removed the recommended dependency on libx11-6 and libasound2 from the generated control file (these dependencies are already injected by dh_shlibdeps) * Removed the references to "Java 2" from the description of the generated JRE package * Changed the short description of the generate packages to match the official name -- Emmanuel Bourg Tue, 10 Sep 2013 14:42:43 +0200 java-package (0.52) unstable; urgency=low [ Sylvestre Ledru ] * Team upload * Upload to unstable * Ack the NMU of David Prévot (thanks!) * Standards-Version updated to version 3.9.4 * Remove obsolete variable from the changelog * Add support of ARM upstream binary by James Page and Matthias Vill. Thanks guys! (Closes: #687375) * Change the installation path from /usr/lib/jvm/jdk-6.38-oracle-x64 or /usr/lib/jvm/jdk-7.10-oracle-x64 to /usr/lib/jvm/jdk-6-oracle-x64 and /usr/lib/jvm/jdk-7-oracle-x64 Thanks to Constantin Makshin for the patch (Closes: #696227) [ Cédric Pineau ] * Fix lintian errors and warnings [ Gabriele Giacone ] * Add {mozilla,firefox}-javaplugin.so for update-java-alternatives. * Fix plugin directories. Closes: #686216 [ Emmanuel Bourg ] * Switched to the 3.0 (native) package format * debian/control: Use canonical URLs for the Vcs-* fields * debian/copyright: Switched to the Machine-readable format 1.0 * Updated the manpages to reflect the latest naming changes * Removed the unused provided dependencies (j2sdk, j2re) * Provide the java-runtime and java-runtime dependencies (Closes: #691063) * Provide the java-sdk dependencies to match the openjdk package * Use the upstream versioning scheme (i.e 7u13 instead of 7.13) to match the convention used by the new openjdk packages * Renamed the script files (j2sdk->jdk, j2re->jre, j2se->javase) -- Sylvestre Ledru Wed, 05 Jun 2013 13:43:55 +0200 java-package (0.51~exp1) experimental; urgency=low * Add firefox-javaplugin.so alternative Closes: #673670 and LP: #1024368 * Add java5 and 6-{runtime|sdk|...} to the provides line in generated packages Closes: #684993 and LP: #995655 * Drop installation debconf note Closes: #685082 * Correct handling of amd64 in oracle-jdk6.1->4 and improve error message when used with unknown archives * Add support for earlier oracle-jdk6 version [Emmanuel Bourg] * Improved detection of the JRE/JDK version (supports 2 digits Java 7 updates) Closes: #597294 * Brand and naming cleanup * Documentation directory changed to be /usr/share/doc/oracle-javaV-doc (for oracle) [Joerg Schirottke] * Add mozilla-javaplugin.so alternative -- Cédric Pineau Sat, 18 Aug 2012 11:00:34 +0200 java-package (0.50+nmu2) unstable; urgency=high * Non-maintainer upload. * Allow two digits in Java 7 updates. Closes: #597294, #698108 -- David Prévot Tue, 15 Jan 2013 15:06:26 -0400 java-package (0.50+nmu1) unstable; urgency=low * Non-maintainer upload. * Drop installation debconf note. Closes: #685082 -- David Prévot Thu, 06 Sep 2012 18:38:03 -0400 java-package (0.50) unstable; urgency=low * Java-package reset for reintroduction in debian (removal of all previously supported jvm, global refactoring). * Add support for Oracle Java 6 (update >= 10) * Add support for Oracle Java 7 * Add support for .jinfo file (update-java-alternatives tool) * Use jdk included jre binaries (jdk/jre/bin/*) * Print usage information on install [ Sylvestre Ledru ] * Long description removed * 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). -- Cédric Pineau Thu, 22 Dec 2011 11:42:13 +0100 java-package (0.42) unstable; urgency=low * Provide java*-runtime-headless and java*-sdk names for generated packages. * Recommend dpkg-dev and gcc. Closes: #281766, #405814. -- Matthias Klose Sat, 02 Aug 2008 12:10:52 +0200 java-package (0.41) unstable; urgency=low * Added support for new SUN JDK/JRE for amd64 downloads. Thanks to Artyom Gavrichenkov for the initial patch. -- Michael Koch Fri, 21 Mar 2008 17:20:35 +0100 java-package (0.40) unstable; urgency=low * Add support for ibm-java2-sdk-5.0-6.0-linux-$arch.tgz. Closes: #462399 Thanks to Evgeni Dobrev for the patch. * Fixed spelling error in long description: debian -> Debian. -- Michael Koch Thu, 24 Jan 2008 22:48:46 +0100 java-package (0.39) unstable; urgency=low * Added support for IBM JDK 6.0 final release. * Updated Standard-Version to 3.7.3. * Updated debhelper level to 5. -- Michael Koch Tue, 18 Dec 2007 07:38:34 +0100 java-package (0.38) unstable; urgency=low * Mention SUN JDK 6 in REAME.Debian. Closes: #448258. * Fixed typo when creating version number for SUN JDK 6. Closes: #451935. * Fix handling of symlinks for ControlPanel, HtmlConverter and java-rmi.cgi from SUN JDK 6. Closes: #448351. -- Michael Koch Fri, 30 Nov 2007 00:03:50 +0100 java-package (0.37) unstable; urgency=low * Added libstdc++5 to Recommends of generated package. Closes: #446334. -- Michael Koch Thu, 25 Oct 2007 22:45:42 +0200 java-package (0.36) unstable; urgency=low * Fixed package description to include more supported JDKs. Closes: #447615, #447617. -- Michael Koch Wed, 24 Oct 2007 09:56:52 +0200 java-package (0.35) unstable; urgency=low * Use 'date -R' instead of the deprecated '822-date'. Closes: #441229. * Fix generation of .changes file. Closes: #332643. Thanks to Christoph Goehre for the patch. * Add possibility to add a configured revision to the version. Closes: #442246. Thanks to Christoph Goehre again for the patch. -- Michael Koch Fri, 14 Sep 2007 17:28:13 +0200 java-package (0.34) unstable; urgency=low * Fixed SUN JDK on amd64. Closes: #439221. -- Michael Koch Fri, 24 Aug 2007 00:41:54 +0200 java-package (0.33) unstable; urgency=low * Fixed postinst scripts for SUN JDK 1.4, 5 and 6. Closes: #435632. -- Michael Koch Thu, 02 Aug 2007 18:43:40 +0200 java-package (0.32) unstable; urgency=low * Added support for iceweasel. Closes: #433445. * Fix dangling links for SUN Java 5. Closes: #305053. * Depend on libx11-6 and libasound2. Closes: #289004. * Fix building on ia64. Closes: #355465. -- Michael Koch Thu, 19 Jul 2007 22:51:31 +0200 java-package (0.31) unstable; urgency=low * Reapplied changes from 0.28 to 0.29. Closes: 322843. -- Michael Koch Tue, 10 Jul 2007 08:16:14 +0200 java-package (0.30) unstable; urgency=low * Added support for SUN JDK 6u2 (and following updates). * Added support for ibm-java2-jre-5.0-5.0-linux-ppc.tgz. Thanks to B. Zhang. -- Michael Koch Sun, 08 Jul 2007 09:33:29 +0200 java-package (0.29) unstable; urgency=low * Added support for SUN Java 6 and IBM Java 6. Closes: #322843, #402642, #418592, #425508, #430026. * Added myself to Uploaders. -- Michael Koch Tue, 26 Jun 2007 17:40:04 -0100 java-package (0.28) unstable; urgency=low * Modified to reflect migration to Subversion * Bumped standards to version 3.7.2, no changes * Corrected test for AMD64 architecture during plug-in detection * Corrected detected version for IBM Java 5 JDK on AMD64 (Closes: #345775) * Repaired alternatives handling for IBM Java 5 JREs and JDKs (Closes: #338569) * Corrected pathing for alternatives installation for Mozilla and Firefox plugins (Closes: #341751) * 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 changes in dpkg-dev (Closes: #354427) * 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 * Removed dependency on 'coreutils | stat' from control file, as the dependency is satisfied within essential (Closes: #370002) -- Barry Hawkins Mon, 26 Jun 2006 11:19:08 -0400 java-package (0.27) unstable; urgency=low * Added support for IBM Java2 5.0 JREs and JDKs (Closes: #337129) * Corrected missing alternatives links for all JREs and JDKs (Closes: #317492) * Added conditional wrapping around dh_compress to account for JRE/JDKs that do not ship manpages (Closes: 301738) * Removed java-common from Provides: for JRE and JDK packages. -- Barry Hawkins Tue, 08 Nov 2005 12:16:24 -0500 java-package (0.26) unstable; urgency=low * Update standards version to 3.6.2 * 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' name and email address for the maintainer to Debian Java Maintainers (Closes: #325554) -- Barry Hawkins Thu, 18 Aug 2005 00:43:17 -0400 java-package (0.25) unstable; urgency=low * Cope with dpkg's new way of expressing architectures (Closes: #313555) * Re-exec with fakeroot if needed (Closes: #310132) -- Jeroen van Wolffelaar Sun, 10 Jul 2005 18:50:40 +0200 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 layout between JREs and JDKs for Sun and Blackdown (Closes: #305219, #301806) -- Barry Hawkins Wed, 21 Apr 2005 01:02:03 -0400 java-package (0.23.1) experimental; urgency=low * Added architecture-specific pathing for plugin alternatives for Blackdown 1.3 and 1.4 JREs and JDKs -- Barry Hawkins Wed, 06 Apr 2005 00:03:40 -0500 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 Sun 1.4 and 1.5 JREs and JDKs (Closes: #301806) * 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 items an enumeration -- Barry Hawkins Fri, 01 Apr 2005 00:36:40 -0500 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 (Closes: #300303) -- Barry Hawkins 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 IBM JDKs and JREs in the generated SUPPORTED file -- Barry Hawkins 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 Schiekel (Closes: #264137) * 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 -- Barry Hawkins Mon, 14 Mar 2005 03:18:39 -0500 java-package (0.20) unstable; urgency=low * Make the postinst & rm for generated packages #!/bin/bash, as we use bash-specific features (Closes: #292179) * Drop the df output parsing, use '/usr/bin/stat' instead (Closes: #293487, #289006, #293350) * Drop the now obsolete peer stuff from the source package * Change priorities, 313 for 1.3, 314 for 1.4, etc (Closes: #292451) * Don't dh_strip, fiddling with upstream's binaries apparantly breaks stuff (Closes: #291238) -- Jeroen van Wolffelaar Tue, 08 Feb 2005 15:04:51 +0100 java-package (0.19) unstable; urgency=low The "Joshua Kwan rocks!" release. Joshua Kwan: * 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 --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. Jeroen van Wolffelaar: * Use DEBFULLNAME, DEBNAME and DEBEMAIL if available, and don't ask for those values in that case. (Closes: #279653) * Updated documentation regarding dropped Sun 1.3 support * Work around multiline df output caused by long device names (Closes: #289006) * Add Replaces: for the generated packages on their *debian counterparts -- Jeroen van Wolffelaar Tue, 25 Jan 2005 00:05:06 +0100 java-package (0.18) unstable; urgency=low * Added myself to Uploaders * Fix security hole (inscure temp file creation) plus lots of needless I/O in free disk checking function * Added support for Sun's JDK/JRE 1.5 patch levels, based on a patch by Peter Marschall (Closes: #286718, #287857) * Bail out if running as real root (works around the evil parts of Sun's install script that unconditionally writes to /etc, see #266273, #280707) * Fix typo in j2re.sh that apparantly with some versions of bash/dpkg/whatever cause package build failure (Closes: #281780, #282902) * Reduce minimum expected size a bit Sun's 1.5.0 amd64 package, it was set too high (Closes: #284033) * Substitute package version number at build time in the make-jpkg executable (Closes: #282221) * Added a README.Debian explaining the existance of make-jpkg and what binary packages are supported and where to get them. Thanks Thijs Kinkhorst for the draft (Closes: #283362) * Added automatically-generated file SUPPORTED that lists all binary filenames that are supported, thanks Alex Owen for the idea (Closes: #275296) -- Jeroen van Wolffelaar Mon, 3 Jan 2005 18:47:47 +0100 java-package (0.17) unstable; urgency=low * added a patch for detecting the architecture (Closes: #274844, #270949, #271846). This patch should also close this one (Closes: #280685). -- Arnaud Vandyck Fri, 12 Nov 2004 17:28:38 +0100 java-package (0.16) unstable; urgency=low * added myself as an uploader. * Carlos already closed the support for 1.5 request but it seems he did not upload the package (Closes: #277088). -- Arnaud Vandyck Wed, 10 Nov 2004 16:38:44 +0100 java-package (0.15) unstable; urgency=low * lib/sun-j2re.sh: Added support for JRE 1.5.0 (aka "Java 5.0"). * lib/sun-j2sdk.sh: Added support for Java SDK 1.5.0. -- Carlos Laviola Mon, 11 Oct 2004 21:08:59 -0300 java-package (0.14) unstable; urgency=low * debian/control: Commented out the lines that generate the Debian-specific packages, thus making alternatives available. - Also made all of the generated packages depend on their Debian-specific counterparts by default. (Closes: #266671) -- Carlos Laviola Mon, 13 Sep 2004 03:38:31 -0300 java-package (0.13) unstable; urgency=low * References to j2se-package are gone. (Closes: #267642) * Added support for Blackdown Java 1.4.2 RC1 JRE/SDK. (Closes: #267643) -- Carlos Laviola Mon, 13 Sep 2004 03:17:54 -0300 java-package (0.12) unstable; urgency=low * remove to contrib because this package depend on non-free J2SE. -- Takashi Okamoto Tue, 3 Aug 2004 00:37:13 +0900 java-package (0.11) unstable; urgency=low * change package name java-package and the command build package is make-jpkg. -- Takashi Okamoto Sat, 31 Jul 2004 15:07:36 +0900 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. * SUN's jdk1.5 beta2 support. -- Takashi Okamoto Sun, 18 Jul 2004 13:53:36 +0900 java-package (0.9) unstable; urgency=low * more generic support for j2re1.3.1/j2sdk1.3.1 from SUN. * add alternative for jarsigner (in j2sdk1.4 and j2sdk1.5 from SUN). -- Hubert Schmid Sun, 23 May 2004 23:35:14 +0200 java-package (0.8) unstable; urgency=low * java plugin: support for mozilla-firefox. -- Hubert Schmid Tue, 4 May 2004 22:39:39 +0200 java-package (0.7) unstable; urgency=low * Optionally create .changes file. * Add command line options: --help, --version, --full-name, --email, --changes. * Add environment variables: J2SE_PACKAGE_FULL_NAME, J2SE_PACKAGE_EMAIL. -- Hubert Schmid Sat, 27 Mar 2004 23:01:08 +0100 java-package (0.6) unstable; urgency=low * More generic support for Java2 1.4.2 from SUN. -- Hubert Schmid Thu, 11 Mar 2004 20:39:51 +0100 java-package (0.5) unstable; urgency=low * NEW: build Blackdown J2RE 1.4.1 (gcc-2.95) and J2SDK 1.4.1 (gcc-2.95). * NEW: support for SUN J2RE 1.5.0 beta, SUN J2SDK 1.5.0 beta. -- Hubert Schmid Sat, 7 Feb 2004 21:57:09 +0100 java-package (0.4) unstable; urgency=low * Added support for: SUN J2RE 1.4.2_03, SUN J2SDK 1.4.2_03 -- Hubert Schmid Thu, 15 Jan 2004 22:27:52 +0100 java-package (0.3) unstable; urgency=low * Added support for: Blackdown J2RE 1.3, 1.4, J2SDK 1.3, 1.4 * Removed usage of "du --apparent-size". This should fix a problem with old fileutils. -- Hubert Schmid Sun, 9 Nov 2003 21:13:38 +0100 java-package (0.2) unstable; urgency=low * Added support for: Sun J2RE 1.3, Sun J2SDK 1.3, Sun J2SDK 1.4 * Moved peer packages into this source package. -- Hubert Schmid Thu, 30 Oct 2003 00:10:01 +0100 java-package (0.1) unstable; urgency=low * Initial Release. -- Hubert Schmid Sun, 26 Oct 2003 20:06:57 +0100 java-package-0.53/debian/compat0000644000000000000000000000000212213611514013255 0ustar 7 java-package-0.53/debian/control0000644000000000000000000000247012213611514013465 0ustar Source: java-package Section: contrib/misc Priority: optional Maintainer: Debian Java Maintainers Uploaders: Cédric Pineau Build-Depends: debhelper (>= 7) Standards-Version: 3.9.4 Vcs-Git: git://anonscm.debian.org/pkg-java/java-package.git 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 Recommends: dpkg-dev, gcc Suggests: openjdk-6-jre, openjdk-7-jre Description: Utility for creating Java Debian packages This package provides the capability to build a Debian package from a Java binary distribution by running make-jpkg . (with archive files downloaded from providers listed below) . Supported java binary distributions currently include: * Oracle (http://www.oracle.com/technetwork/java/javase/downloads) : - The Java Development Kit (JDK), version 6, 7 and 8 - The Java Runtime Environment (JRE), version 6, 7 and 8 - The Java API Javadoc, version 6, 7 and 8 (Choose tar.gz archives or self-extracting archives, do _not_ choose the RPM!) . Please note that Debian recommends the use of openjdk-7-jdk/openjdk-7-jre. java-package will install non-free packages. java-package-0.53/debian/copyright0000644000000000000000000000221712153642560014024 0ustar Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ Comment: java-package is based upon the j2se-package application originally written by Hubert Schmid. Files: * Copyright: 2011-2012, Cédric Pineau 2005, Barry Hawkins 2004-2005, Jeroen van Wolffelaar 2003, Hubert Schmid License: GPL-2 This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. . This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. . 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 02110-1301 USA. . On Debian systems, the complete text of the GNU General Public License can be found in `/usr/share/common-licenses/GPL-2'. java-package-0.53/debian/dirs0000644000000000000000000000004112153621042012736 0ustar /usr/bin /usr/share/java-package java-package-0.53/debian/java-package.docs0000644000000000000000000000001212153621042015234 0ustar SUPPORTED java-package-0.53/debian/rules0000755000000000000000000000262712213611514013146 0ustar #!/usr/bin/make -f # debian/rules for java-package # Uncomment this to turn on verbose mode. #export DH_VERBOSE=1 # Extract source package version number from changelog VERSION := $(shell head -n 1 $(CURDIR)/debian/changelog | sed 's/.*(//;s/).*//') B := $(CURDIR)/debian/java-package build: build-arch build-indep build-arch: build-stamp build-indep: build-stamp build-stamp: dh_testdir sed s/@VERSION@/$(VERSION)/ make-jpkg > make-jpkg.out touch $@ clean: dh_testdir dh_testroot rm -f build-stamp SUPPORTED make-jpkg.out debian/semantic.cache dh_clean install: build dh_testdir dh_testroot dh_prep dh_installdirs install -m 755 make-jpkg.out $(B)/usr/bin/make-jpkg cp lib/*.sh $(B)/usr/share/java-package/ find $(B) -type d -name .svn | xargs -r rm -r # Generate SUPPORTED echo "java-package currently supports the following binary packages:" > SUPPORTED echo >> SUPPORTED echo "(This list is automatically generated, do not edit)" >> SUPPORTED echo >> SUPPORTED grep -h "SUPPORTED$$" $(wildcard $(CURDIR)/lib/*-*.sh) | sed 's/"//g;s/).*//' >> SUPPORTED dh_install binary: binary-indep binary-arch: binary-indep: build install dh_testdir dh_testroot dh_installchangelogs dh_installdocs dh_installman make-jpkg.1 dh_link # dh_strip dh_compress dh_fixperms dh_makeshlibs dh_installdeb dh_shlibdeps dh_gencontrol dh_md5sums dh_builddeb .PHONY: build clean binary-indep binary install java-package-0.53/debian/source/0000755000000000000000000000000012153642560013367 5ustar java-package-0.53/debian/source/format0000644000000000000000000000001512153642560014576 0ustar 3.0 (native) java-package-0.53/lib/0000755000000000000000000000000012213611514011403 5ustar java-package-0.53/lib/common.sh0000644000000000000000000001133612153621113013232 0ustar # read_yn read_yn() { local prompt="$1" while true; do read -e -n 1 -p "$prompt" reply case "$reply" in "" | "y" | "Y") return 0 ;; "N" | "n") return 1 ;; esac done } # diskusage : prints size in MB diskusage() { local path="$1" read size dummy < <( du -sm "$path" ) echo "$size" } # diskfree diskfree() { local size="$1" echo -n "Checking free diskspace:" (( free = `stat -f -c '%a / 2048 * ( %s / 512 )' $tmp ` )) if [ "$free" -ge "$size" ]; then echo " done." else cat >&2 << EOF WARNING: Possibly not enough free disk space in "$tmp". You need at least $size MB, but only $free MB seems free. Note: You can specify an alternate directory by setting the environment variable Press Ctrl+C to interrupt, or return to try to continue anyway. TMPDIR. EOF read fi } # extract_bin extract_bin() { local file="$1" local expected_min_size="$2" local dest="$3" cat << EOF In the next step, the binary file will be extracted. Probably a license agreement will be displayed. Please read this agreement carefully. If you do not agree to the displayed license terms, the package will not be built. EOF read -e -p "Press [Return] to continue: " dummy echo local extract_dir="$tmp/extract" mkdir "$extract_dir" cd "$extract_dir" echo 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";; *.zip) extract_cmd="unzip -q";; *) extract_cmd=sh esac if ! $extract_cmd "$archive_path"; then cat << EOF WARNING: The package installation script exited with an error value. Usually, this means, that the installation failed for some reason. But in some cases there is no problem and you can continue creating the Debian package. Please check if there are any error messages. Press [Return] to continue or Ctrl-C to abort. EOF read fi echo echo -n "Testing extracted archive..." local size="$( diskusage "$extract_dir" )" if [ "$size" -lt "$expected_min_size" ]; then cat << EOF Invalid size ($size MB) of extracted archive. Probably you have not enough free disc space in the temporary directory. Note: You can specify an alternate directory by setting the environment variable TMPDIR. EOF error_exit else cd "$extract_dir" files=(*) if [ "${#files[*]}" -ne 1 ]; then cat << EOF Expected one file, but found the following ${#files[*]} files: ${files[*]} EOF error_exit fi mv "$files" "$dest" echo -e " okay.\n" fi } read_maintainer_info() { if [ -z "$maintainer_name" ]; then if [ -n "$DEBFULLNAME" ]; then maintainer_name="$DEBFULLNAME" elif [ -n "$DEBNAME" ]; then 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 field of the created package. EOF # 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 fi if [ -z "$maintainer_email" ]; then local default_email= if [ -n "$DEBEMAIL" ]; then maintainer_email="$DEBEMAIL" else if [ -r "/etc/mailname" ]; then default_email="$( id -run )@$( cat /etc/mailname )" else default_email="$( id -run )@$( hostname --fqdn )" fi cat << EOF Please enter a valid email address or press return to accept the default value. This address will be used in the maintainer field of the created package. EOF read -e -p "Email [$default_email]: " maintainer_email if [ -z "$maintainer_email" ]; then maintainer_email="$default_email" fi fi fi } # provide the architecture for evaluation by plugins get_architecture() { echo 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}" } # get browser plugin directories get_browser_plugin_dirs() { if [ $(lsb_release --id --short) = Ubuntu ]; then export browser_plugin_dirs="xulrunner-addons firefox iceape iceweasel mozilla midbrowser xulrunner" else export browser_plugin_dirs=mozilla fi } java-package-0.53/lib/javase.sh0000644000000000000000000001417212213611514013215 0ustar j2se_readme() { cat << EOF Package for $j2se_title --- 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 } j2se_changelog() { cat << EOF $j2se_package ($j2se_version) unstable; urgency=low * This package was created with java-package ($version). -- $maintainer_name <$maintainer_email> $( date -R ) EOF } j2se_control() { cat << EOF Source: $j2se_package Section: non-free/devel Priority: optional Maintainer: $maintainer_name <$maintainer_email> Build-Depends: debhelper (>= 4.0.0) Standards-Version: 3.7.2 EOF } j2se_copyright() { cat << EOF ---------------------------------------------------------------------- This file contains a copy of all copyright files found in the original distribution. The original copyright files and further information can be found in the directory $jvm_base$j2se_name and its subdirectories. ---------------------------------------------------------------------- EOF ( cd "$install_dir" find * -type f -iname copyright | while read file; do cat << EOF File: /$file ---------------------------------------------------------------------- EOF cat "$file" cat << EOF ---------------------------------------------------------------------- EOF done ) } j2se_install_scripts() { cat > "$debian_dir/postinst" << EOF #!/bin/bash set -e if [ "\$1" = configure ]; then # Common functions for all install scripts # install_alternatives program_base programs install_alternatives() { program_base="\$1" shift for program in \$*; do if [[ -f "\$program_base/\$program" ]]; then update-alternatives \\ --install "/usr/bin/\$program" "\$program" "\$program_base/\$program" $j2se_priority \\ --slave "/usr/share/man/man1/\$program.1.gz" "\$program.1.gz" "$jvm_base$j2se_name/man/man1/\$program.1.gz" fi done } # install_alternatives_no_man program_base programs install_no_man_alternatives() { program_base="\$1" shift for program in \$*; do if [[ -f "\$program_base/\$program" ]]; then update-alternatives --install "/usr/bin/\$program" "\$program" "\$program_base/\$program" $j2se_priority fi done } # install_browser_plugin link_path link_name plugin_name plugin install_browser_plugin() { local link_path="\$1" local link_name="\$2" local plugin_name="\$3" local plugin="\$4" [ -d "\$link_path" ] || install -d -m 755 "\$link_path" if [[ -f "\$plugin" ]]; then update-alternatives --install "\$link_path/\$link_name" "\$plugin_name" "\$plugin" $j2se_priority fi } EOF eval "$j2se_install" >> "$debian_dir/postinst" cat >> "$debian_dir/postinst" << EOF fi #DEBHELPER# exit 0 EOF chmod 755 "$debian_dir/postinst" cat > "$debian_dir/prerm" << EOF #!/bin/bash set -e case "\$1" in remove | deconfigure) # Common functions for all remove scripts # remove_alternatives program_base programs remove_alternatives() { program_base="\$1" shift for program in \$*; do update-alternatives --remove "\$program" "\$program_base/\$program" done } # remove_browser_plugin plugin_name plugin remove_browser_plugin() { local plugin_name="\$1" local plugin="\$2" update-alternatives --remove "\$plugin_name" "\$plugin" } EOF eval "$j2se_remove" >> "$debian_dir/prerm" cat >> "$debian_dir/prerm" << EOF ;; esac #DEBHELPER# exit 0 EOF chmod 755 "$debian_dir/prerm" } j2se_info() { cat << EOF version="$version" j2se_version="$j2se_version" maintainer_name="$maintainer_name" maintainer_email="$maintainer_email" date="$( date +%Y/%m/%d )" EOF } # jinfos prefix program_base programs jinfos() { prefix="$1" program_base="$2" shift ; shift for program in $*; do echo "$prefix $program $program_base$program" done } j2se_build() { cd "$tmp" echo "Create debian package:" #export DH_VERBOSE=1 export DH_COMPAT=7 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" 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 cat << EOF The Debian package has been created in the current directory. You can install the package as root with: dpkg -i $deb_filename EOF } java-package-0.53/lib/jdk-doc.sh0000644000000000000000000000312112213611514013247 0ustar j2sdk_doc_control() { j2se_control cat << EOF Package: $j2se_package Architecture: any Depends: Recommends: Provides: Description: $j2se_title The Java(TM) SE JDK is a development environment for building applications, applets, and components that can be deployed on the Java(TM) platform. . This package provides the official API documentation published by Oracle. . This package has been automatically created with java-package ($version). EOF } j2sdk_doc_doc-base() { cat << EOF Document: $j2se_package Title: $j2se_title Author: $maintainer_name Abstract: This is the API Javadoc provided by the vendor Section: Programming Format: HTML Index: /usr/share/doc/$j2se_vendor-java$j2se_release-doc/index.html Files: /usr/share/doc/$j2se_vendor-java$j2se_release-doc/*.html EOF } # build debian package j2sdk_doc_run() { echo diskfree "$j2se_required_space" 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" install -d -m 755 "$( dirname "$target" )" extract_bin "$archive_path" "$j2se_expected_min_size" "$target" rm -rf "$target/.systemPrefs" echo "7" > "$debian_dir/compat" j2se_readme > "$debian_dir/README.Debian" j2se_changelog > "$debian_dir/changelog" j2sdk_doc_control > "$debian_dir/control" j2se_copyright > "$debian_dir/copyright" j2sdk_doc_doc-base > "$debian_dir/$j2se_package.doc-base" j2se_install_scripts install -d "$target/debian" j2se_info > "$target/debian/info" j2se_build } java-package-0.53/lib/jdk.sh0000644000000000000000000000462312213611514012514 0ustar j2sdk_control() { j2se_control java_browser_plugin="java-browser-plugin, " depends="\${shlibs:Depends}" if [ "${DEB_BUILD_ARCH:0:3}" = "arm" ]; then # ARM is only softfloat ATM so if building on armhf # force the dependencies to pickup cross platform fu if [ "${DEB_BUILD_ARCH}" == "armhf" ]; then depends="libc6-armel, libsfgcc1, libsfstdc++6" fi # No browser on ARM yet java_browser_plugin="" fi cat << EOF Package: $j2se_package Architecture: any 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 The Java(TM) SE JDK is a development environment for building applications, applets, and components that can be deployed on the Java(TM) platform. . The Java(TM) SE JDK software includes tools useful for developing and testing programs written in the Java programming language and running on the Java platform. These tools are designed to be used from the command line. Except for appletviewer, these tools do not provide a graphical user interface. . This package has been automatically created with java-package ($version). EOF } # build debian package j2sdk_run() { echo diskfree "$j2se_required_space" 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" install -d -m 755 "$( dirname "$target" )" extract_bin "$archive_path" "$j2se_expected_min_size" "$target" rm -rf "$target/.systemPrefs" echo "7" > "$debian_dir/compat" j2se_readme > "$debian_dir/README.Debian" j2se_changelog > "$debian_dir/changelog" j2sdk_control > "$debian_dir/control" j2se_copyright > "$debian_dir/copyright" j2se_install_scripts install -d "$target/debian" j2se_info > "$target/debian/info" eval "$j2se_jinfo" > "$install_dir$jvm_base.$j2se_name.jinfo" j2se_build } java-package-0.53/lib/jre.sh0000644000000000000000000000340212213611514012516 0ustar j2re_control() { j2se_control cat << EOF Package: $j2se_package Architecture: any 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 The Java(TM) SE Runtime Environment contains the Java virtual machine, runtime class libraries, and Java application launcher that are necessary to run programs written in the Java programming language. It is not a development environment and does not contain development tools such as compilers or debuggers. For development tools, see the Java SE Development Kit (JDK). . This package has been automatically created with java-package ($version). EOF } # build debian package j2re_run() { echo diskfree "$j2se_required_space" 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" install -d -m 755 "$( dirname "$target" )" extract_bin "$archive_path" "$j2se_expected_min_size" "$target" rm -rf "$target/.systemPrefs" echo "7" > "$debian_dir/compat" j2se_readme > "$debian_dir/README.Debian" j2se_changelog > "$debian_dir/changelog" j2re_control > "$debian_dir/control" j2se_copyright > "$debian_dir/copyright" j2se_install_scripts install -d "$target/debian" j2se_info > "$target/debian/info" eval "$j2se_jinfo" > "$install_dir$jvm_base.$j2se_name.jinfo" j2se_build } java-package-0.53/lib/oracle-jdk-doc.sh0000644000000000000000000000513612213611514014522 0ustar # Detect product oracle_j2sdk_doc_detect() { j2se_release=0 # Update or GA release (jdk-7u25-apidocs.zip) if [[ $archive_name =~ jdk-([0-9]+)(u([0-9]+))?-apidocs\.zip ]] then j2se_release=${BASH_REMATCH[1]} j2se_update=${BASH_REMATCH[3]} if [[ $j2se_update != "" ]] then j2se_version_name="$j2se_release Update $j2se_update" j2se_version=${j2se_release}u${j2se_update} else j2se_version_name="$j2se_release GA" j2se_version=${j2se_release} fi fi # Early Access Release (jdk-8-ea-docs-b104-all-21_aug_2013.zip) if [[ $archive_name =~ jdk-([0-9]+)(u([0-9]+))?-(ea|fcs)-docs-(b[0-9]+)-all.*\.zip ]] then j2se_release=${BASH_REMATCH[1]} j2se_update=${BASH_REMATCH[3]} j2se_build=${BASH_REMATCH[5]} if [[ $j2se_update != "" ]] then j2se_version_name="$j2se_release Update $j2se_update Early Access Release Build $j2se_build" j2se_version=${j2se_release}u${j2se_update}~ea-build-${j2se_build} else j2se_version_name="$j2se_release Early Access Release Build $j2se_build" j2se_version=${j2se_release}~ea-build-${j2se_build} fi fi if [[ $j2se_release > 0 ]] then case "$j2se_release" in 6) # JDK 6 j2se_expected_min_size=44 #Mb ;; 7) # JDK 7 j2se_expected_min_size=290 #Mb ;; *) # JDK 8 and higher j2se_expected_min_size=320 #Mb ;; esac cat << EOF Detected product: Java(TM) Development Kit (JDK) Documentation Standard Edition, Version $j2se_version_name Oracle(TM) EOF if read_yn "Is this correct [Y/n]: "; then j2se_found=true j2se_required_space=$(( $j2se_expected_min_size * 2 + 20 )) j2se_vendor="oracle" j2se_title="Java™ Platform, Standard Edition $j2se_release Documentation" j2se_install=oracle_j2sdk_doc_install j2se_remove=oracle_j2sdk_doc_remove j2sdk_doc_run fi fi } j2se_detect_j2sdk_doc_oracle=oracle_j2sdk_doc_detect oracle_j2sdk_doc_install() { cat << EOF if [ ! -e "$javadoc_base$j2se_name" ]; then exit 0 fi # Register the documentation in the various documentation systems, i.e. dhelp and dwww. if [ "\$1" = configure ] ; then if which install-docs >/dev/null 2>&1; then install-docs -i $javadoc_base$j2se_name fi fi EOF } oracle_j2sdk_doc_remove() { cat << EOF if [ ! -e "$javadoc_base$j2se_name" ]; then exit 0 fi # Unregister documentation from the various documentation systems, i.e. dhelp and dwww. if [ "\$1" = configure ] ; then if which install-docs >/dev/null 2>&1; then install-docs -r $javadoc_base$j2se_name fi fi EOF } java-package-0.53/lib/oracle-jdk.sh0000644000000000000000000001364512213611514013763 0ustar # Detect product j2se_detect_oracle_j2sdk=oracle_j2sdk_detect oracle_j2sdk_detect() { j2se_release=0 # Update or GA release (jdk-7u15-linux-i586.tar.gz) if [[ $archive_name =~ jdk-([0-9]+)(u([0-9]+))?-linux-(i586|x64|amd64)\.(bin|tar\.gz) ]] then j2se_release=${BASH_REMATCH[1]} j2se_update=${BASH_REMATCH[3]} j2se_arch=${BASH_REMATCH[4]} if [[ $j2se_update != "" ]] then j2se_version_name="$j2se_release Update $j2se_update" j2se_version=${j2se_release}u${j2se_update} else j2se_version_name="$j2se_release GA" j2se_version=${j2se_release} fi fi # Early Access Release (jdk-8-ea-bin-b103-linux-i586-15_aug_2013.tar.gz) if [[ $archive_name =~ jdk-([0-9]+)(u([0-9]+))?-(ea|fcs)-bin-(b[0-9]+)-linux-(i586|x64|amd64).*\.(bin|tar\.gz) ]] then j2se_release=${BASH_REMATCH[1]} j2se_update=${BASH_REMATCH[3]} j2se_build=${BASH_REMATCH[5]} j2se_arch=${BASH_REMATCH[6]} if [[ $j2se_update != "" ]] then j2se_version_name="$j2se_release Update $j2se_update Early Access Release Build $j2se_build" j2se_version=${j2se_release}u${j2se_update}~ea-build-${j2se_build} else j2se_version_name="$j2se_release Early Access Release Build $j2se_build" j2se_version=${j2se_release}~ea-build-${j2se_build} fi fi if [[ $j2se_release > 0 ]] then j2se_priority=$((310 + $j2se_release)) j2se_expected_min_size=130 #Mb # check if the architecture matches let compatible=1 case "${DEB_BUILD_ARCH:-$DEB_BUILD_GNU_TYPE}" in i386|i486-linux-gnu) if [[ "$j2se_arch" != "i586" ]]; then compatible=0; fi ;; amd64|x86_64-linux-gnu) if [[ "$j2se_arch" != "x64" && "$j2se_arch" != "amd64" ]]; then compatible=0; fi ;; armhf|armel|arm-linux-gnueabihf|arm-linux-gnueabi) case "$archive_name" in "jdk-7u"[0-9]"-linux-arm-sfp.tar.gz") # SUPPORTED j2se_version=1.7.0+update${archive_name:6:1}${revision} j2se_expected_min_size=100 #Mb j2se_priority=317 found=true ;; "jdk-7u"[0-9][0-9]"-linux-arm-sfp.tar.gz") # SUPPORTED j2se_version=1.7.0+update${archive_name:6:2}${revision} j2se_expected_min_size=60 #Mb j2se_priority=317 found=true ;; esac ;; esac if [[ $compatible == 0 ]] then echo "The archive $archive_name is not supported on the ${DEB_BUILD_ARCH} architecture" return fi cat << EOF Detected product: Java(TM) Development Kit (JDK) Standard Edition, Version $j2se_version_name Oracle(TM) EOF if read_yn "Is this correct [Y/n]: "; then j2se_found=true j2se_required_space=$(( $j2se_expected_min_size * 2 + 20 )) j2se_vendor="oracle" j2se_title="Java™ Platform, Standard Edition $j2se_release Development Kit" j2se_install=oracle_j2sdk_install j2se_remove=oracle_j2sdk_remove j2se_jinfo=oracle_j2sdk_jinfo if [ "${DEB_BUILD_ARCH:0:3}" = "arm" ]; then oracle_jre_bin_hl="java keytool orbd pack200 rmid rmiregistry servertool tnameserv unpack200 policytool" oracle_jre_bin_jre="policytool" else oracle_jre_bin_hl="java javaws keytool orbd pack200 rmid rmiregistry servertool tnameserv unpack200 policytool" oracle_jre_bin_jre="javaws policytool" fi if [ "${DEB_BUILD_ARCH:0:3}" != "arm" ]; then oracle_no_man_jre_bin_jre="ControlPanel" fi oracle_jre_lib_hl="jexec" oracle_bin_jdk="appletviewer extcheck idlj jar jarsigner javac javadoc javah javap jconsole jdb jinfo jmap jps jsadebugd jstack jstat jstatd native2ascii rmic serialver" j2sdk_run fi fi } oracle_j2sdk_install() { cat << EOF if [ ! -e "$jvm_base$j2se_name/debian/info" ]; then exit 0 fi install_alternatives $jvm_base$j2se_name/jre/bin $oracle_jre_bin_hl install_alternatives $jvm_base$j2se_name/jre/bin $oracle_jre_bin_jre if [ -n "$oracle_no_man_jre_bin_jre" ]; then install_no_man_alternatives $jvm_base$j2se_name/jre/bin $oracle_no_man_jre_bin_jre fi install_no_man_alternatives $jvm_base$j2se_name/jre/lib $oracle_jre_lib_hl install_alternatives $jvm_base$j2se_name/bin $oracle_bin_jdk # No plugin for ARM architecture yet if [ "${DEB_BUILD_ARCH:0:3}" != "arm" ]; then plugin_dir="$jvm_base$j2se_name/jre/lib/$DEB_BUILD_ARCH" for b in $browser_plugin_dirs;do install_browser_plugin "/usr/lib/\$b/plugins" "libjavaplugin.so" "\$b-javaplugin.so" "\$plugin_dir/libnpjp2.so" done fi EOF } oracle_j2sdk_remove() { cat << EOF if [ ! -e "$jvm_base$j2se_name/debian/info" ]; then exit 0 fi remove_alternatives $jvm_base$j2se_name/jre/bin $oracle_jre_bin_hl remove_alternatives $jvm_base$j2se_name/jre/bin $oracle_jre_bin_jre if [ -n "$oracle_no_man_jre_bin_jre" ]; then remove_alternatives $jvm_base$j2se_name/jre/bin $oracle_no_man_jre_bin_jre fi remove_alternatives $jvm_base$j2se_name/jre/lib $oracle_jre_lib_hl remove_alternatives $jvm_base$j2se_name/bin $oracle_bin_jdk # No plugin for ARM architecture yet if [ "${DEB_BUILD_ARCH:0:3}" != "arm" ]; then plugin_dir="$jvm_base$j2se_name/jre/lib/$DEB_BUILD_ARCH" for b in $browser_plugin_dirs;do remove_browser_plugin "\$b-javaplugin.so" "\$plugin_dir/libnpjp2.so" done fi EOF } oracle_j2sdk_jinfo() { cat << EOF name=$j2se_name priority=$j2se_priority section=main EOF jinfos "hl" $jvm_base$j2se_name/jre/bin/ $oracle_jre_bin_hl jinfos "jre" $jvm_base$j2se_name/jre/bin/ $oracle_jre_bin_jre if [ -n "$oracle_no_man_jre_bin_jre" ]; then jinfos "jre" $jvm_base$j2se_name/jre/bin/ $oracle_no_man_jre_bin_jre fi jinfos "hl" $jvm_base$j2se_name/jre/lib/ $oracle_jre_lib_hl jinfos "jdk" $jvm_base$j2se_name/bin/ $oracle_bin_jdk if [ "${DEB_BUILD_ARCH:0:3}" != "arm" ]; then for b in $browser_plugin_dirs;do echo "plugin iceweasel-javaplugin.so $jvm_base$j2se_name/jre/lib/$DEB_BUILD_ARCH/libnpjp2.so" done fi } java-package-0.53/lib/oracle-jre.sh0000644000000000000000000001036512213611514013767 0ustar # Detect product j2se_detect_oracle_j2re=oracle_j2re_detect oracle_j2re_detect() { j2se_release=0 # Update or GA release (jre-7u13-linux-x64.tar.gz) if [[ $archive_name =~ jre-([0-9]+)(u([0-9]+))?-linux-(i586|x64|amd64)\.(bin|tar\.gz) ]] then j2se_release=${BASH_REMATCH[1]} j2se_update=${BASH_REMATCH[3]} j2se_arch=${BASH_REMATCH[4]} if [[ $j2se_update != "" ]] then j2se_version_name="$j2se_release Update $j2se_update" j2se_version=${j2se_release}u${j2se_update} else j2se_version_name="$j2se_release GA" j2se_version=${j2se_release} fi fi # Early Access Release (jre-8-ea-bin-b103-linux-x64-15_aug_2013.tar.gz) if [[ $archive_name =~ jre-([0-9]+)(u([0-9]+))?-(ea|fcs)-bin-(b[0-9]+)-linux-(i586|x64|amd64).*\.(bin|tar\.gz) ]] then j2se_release=${BASH_REMATCH[1]} j2se_update=${BASH_REMATCH[3]} j2se_build=${BASH_REMATCH[5]} j2se_arch=${BASH_REMATCH[6]} if [[ $j2se_update != "" ]] then j2se_version_name="$j2se_release Update $j2se_update Early Access Release Build $j2se_build" j2se_version=${j2se_release}u${j2se_update}~ea-build-${j2se_build} else j2se_version_name="$j2se_release Early Access Release Build $j2se_build" j2se_version=${j2se_release}~ea-build-${j2se_build} fi fi if [[ $j2se_release > 0 ]] then j2se_priority=$((310 + $j2se_release - 1)) j2se_expected_min_size=85 #Mb # check if the architecture matches let compatible=1 case "${DEB_BUILD_ARCH:-$DEB_BUILD_GNU_TYPE}" in i386|i486-linux-gnu) if [[ "$j2se_arch" != "i586" ]]; then compatible=0; fi ;; amd64|x86_64-linux-gnu) if [[ "$j2se_arch" != "x64" && "$j2se_arch" != "amd64" ]]; then compatible=0; fi ;; esac if [[ $compatible == 0 ]] then echo "The archive $archive_name is not supported on the ${DEB_BUILD_ARCH} architecture" return fi cat << EOF Detected product: Java(TM) Runtime Environment (JRE) Standard Edition, Version $j2se_version_name Oracle(TM) EOF if read_yn "Is this correct [Y/n]: "; then j2se_found=true j2se_required_space=$(( $j2se_expected_min_size * 2 + 20 )) j2se_vendor="oracle" j2se_title="Java™ Platform, Standard Edition $j2se_release Runtime Environment" j2se_install=oracle_j2re_install j2se_remove=oracle_j2re_remove j2se_jinfo=oracle_j2re_jinfo oracle_jre_bin_hl="java javaws keytool orbd pack200 rmid rmiregistry servertool tnameserv unpack200 policytool" oracle_jre_bin_jre="javaws policytool" oracle_no_man_jre_bin_jre="ControlPanel" oracle_jre_lib_hl="jexec" j2re_run fi fi } oracle_j2re_install() { cat << EOF if [ ! -e "$jvm_base$j2se_name/debian/info" ]; then exit 0 fi install_alternatives $jvm_base$j2se_name/bin $oracle_jre_bin_hl install_alternatives $jvm_base$j2se_name/bin $oracle_jre_bin_jre install_no_man_alternatives $jvm_base$j2se_name/bin $oracle_no_man_jre_bin_jre install_no_man_alternatives $jvm_base$j2se_name/lib $oracle_jre_lib_hl plugin_dir="$jvm_base$j2se_name/lib/$DEB_BUILD_ARCH" for b in $browser_plugin_dirs;do install_browser_plugin "/usr/lib/\$b/plugins" "libjavaplugin.so" "\$b-javaplugin.so" "\$plugin_dir/libnpjp2.so" done EOF } oracle_j2re_remove() { cat << EOF if [ ! -e "$jvm_base$j2se_name/debian/info" ]; then exit 0 fi remove_alternatives $jvm_base$j2se_name/bin $oracle_jre_bin_hl remove_alternatives $jvm_base$j2se_name/bin $oracle_jre_bin_jre remove_alternatives $jvm_base$j2se_name/bin $oracle_no_man_jre_bin_jre remove_alternatives $jvm_base$j2se_name/lib $oracle_jre_lib_hl plugin_dir="$jvm_base$j2se_name/lib/$DEB_BUILD_ARCH" for b in $browser_plugin_dirs;do remove_browser_plugin "\$b-javaplugin.so" "\$plugin_dir/libnpjp2.so" done EOF } oracle_j2re_jinfo() { cat << EOF name=$j2se_name priority=$j2se_priority section=main EOF jinfos "hl" $jvm_base$j2se_name/bin/ $oracle_jre_bin_hl jinfos "jre" $jvm_base$j2se_name/bin/ $oracle_jre_bin_jre jinfos "jre" $jvm_base$j2se_name/bin/ $oracle_no_man_jre_bin_jre jinfos "hl" $jvm_base$j2se_name/lib/ $oracle_jre_lib_hl for b in $browser_plugin_dirs;do echo "plugin $b-javaplugin.so $jvm_base$j2se_name/lib/$DEB_BUILD_ARCH/libnpjp2.so" done } java-package-0.53/make-jpkg0000755000000000000000000001307112213611514012433 0ustar #! /bin/bash -e shopt -s nullglob ### global variables # version of this package version="@VERSION@" working_dir="$( pwd )" program_name="$( basename "$0" )" program_dir="$( cd "$( dirname "$( type -p "$0" )" )" ; pwd )" 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 # Debian Java Maintainers project. if [ -z "$J2SE_PACKAGE_FULL_NAME" ]; then maintainer_name="Debian Java Maintainers" else maintainer_name="$J2SE_PACKAGE_FULL_NAME" fi if [ -z "$J2SE_PACKAGE_EMAIL" ]; then maintainer_email="pkg-java-maintainers@lists.alioth.debian.org" else maintainer_email="$J2SE_PACKAGE_EMAIL" fi genchanges="" ### check for run in fakeroot # are we running as fakeroot if ! dh_testroot >/dev/null 2>&1; then if [ -n "$FAKEROOTKEY" ]; then echo "Internal error, fakeroot seems to fail faking root" >&2 exit 1 fi exec fakeroot "$0" "$@" fi # check whether I'm real root, and bail out if so... ugly, but needed if touch /lib/.test 2>/dev/null; then rm -f /lib/.test echo "You are real root -- unfortunately, some Java distributions have" >&2 echo "install scripts that directly manipulate /etc, and may cause some" >&2 echo "inconsistencies on your system. Instead, you should become a" >&2 echo "non-root user and run:" >&2 echo >&2 echo "fakeroot make-jpkg $@" >&2 echo >&2 echo "which will allow no damage to be done to your system files and" >&2 echo "still permit the Java distribution to successfully extract." >&2 echo >&2 echo "Aborting." >&2 exit 1 fi ### Parse options print_usage() { cat << EOF Usage: $program_name [OPTION]... FILE $program_name builds a Debian package from the given Java binary distribution FILE Supported java binary distributions currently include: * Oracle (http://www.oracle.com/technetwork/java/javase/downloads) : - The Java Development Kit (JDK), version 6 and 7 - The Java Runtime Environment (JRE), version 6 and 7 - The Java API Javadoc, version 6 and 7 (Choose tar.gz archives or self-extracting archives, do _not_ choose the RPM!) The following options are recognized: --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 --revision add debian revision --help display this help and exit --version output version information and exit EOF } unrecognized_option() { cat >&2 << EOF $program_name: unrecognized option \`$1' Try \`$program_name --help' for more information. EOF exit 1 } missing_argument() { cat >&2 << EOF $program_name: missing argument for option \`$1' Try \`$program_name --help' for more information. EOF exit 1 } # options while [[ $# -gt 0 && "x$1" == x--* ]]; do if [[ "x$1" == x--version ]]; then echo "make-jpkg $version" exit 0 elif [[ "x$1" == x--help ]]; then print_usage exit 0 elif [[ "x$1" == x--full-name ]]; then [ $# -le 1 ] && missing_argument "$1" shift maintainer_name="$1" elif [[ "x$1" == x--email ]]; then [ $# -le 1 ] && missing_argument "$1" shift maintainer_email="$1" elif [[ "x$1" == x--revision ]]; then [ $# -le 1 ] && missing_argument "$1" shift revision="-${1}" elif [[ "x$1" == x--changes ]]; then genchanges="true" else unrecognized_option "$1" fi shift done # last argument if [[ $# -ne 1 ]]; then cat >&2 << EOF $program_name: missing pathname Try \`$program_name --help' for more information. EOF exit 1 fi archive="$1" if [[ ! -e "$archive" ]]; then echo "Error: The file \"$archive\" does not exist." exit 1 elif [[ ! -r "$archive" ]]; then echo "Error: The file \"$archive\" is not readable." exit 1 fi archive_name="$( basename "$archive" )" archive_dir="$( cd "$( dirname "$archive" )" ; pwd )" archive_path="$archive_dir/$archive_name" # error handling success= failed= tmp= # function is called when script terminates on_exit() { lastcmd="$_" if [[ -z "$success" && -z "$failed" ]]; then cat >&2 << EOF Aborted ($lastcmd). EOF fi # remove temporary directory if [ -n "$tmp" -a -d "$tmp" ]; then echo -n "Removing temporary directory: " rm -rf "$tmp" echo "done" fi } trap on_exit EXIT # print error message and terminate error_exit() { cat >&2 << EOF Aborted. EOF failed=true exit 1 } # The environment variable tmp points to a secure temporary directory. # There should be enough free disk space. echo -n "Creating temporary directory: " tmp="$( mktemp -d -t "$program_name.XXXXXXXXXX" )" echo "$tmp" debian_dir="$tmp/debian" install -d -m 755 "$debian_dir" install_dir="$tmp/install" install -d -m 755 "$install_dir" # load and execute plugins echo -n "Loading plugins:" files=($lib_dir/*.sh) for file in "${files[@]}"; do echo -n " $file" source "$file" done echo # get architecture information get_architecture # get browser plugin directories get_browser_plugin_dirs jvm_base="/usr/lib/jvm/" javadoc_base="/usr/share/doc/" j2se_found= for var in ${!j2se_detect_*}; do eval "\$$var" if [[ "$j2se_found" == "true" ]]; then break; fi done echo if [[ -z "$j2se_found" ]]; then echo "No matching packaging method was found for $archive_name." echo "Please make sure you are using a tar.gz or a self-extracting archive" fi ### exit success=true exit 0 java-package-0.53/make-jpkg.10000644000000000000000000000710212213611514012565 0ustar .\" Hey, EMACS: -*- nroff -*- .\" First parameter, NAME, should be all caps .\" Second parameter, SECTION, should be 1-8, maybe w/ subsection .\" other parameters are allowed: see man(7), man(1) .TH MAKE-JPKG 1 "January 22, 2012" .\" Please adjust this date whenever revising the manpage. .\" .\" Some roff macros, for reference: .\" .nh disable hyphenation .\" .hy enable hyphenation .\" .ad l left justify .\" .ad b justify to both left and right margins .\" .nf disable filling .\" .fi enable filling .\" .br insert line break .\" .sp insert n+1 empty lines .\" for manpage-specific macros, see man(7) .SH NAME make-jpkg \- builds Debian packages from Java binary distributions .SH SYNOPSIS .B make-jpkg [\fIOPTION\fR]... [\fIFILE\fR] .SH DESCRIPTION .\" TeX users may be more comfortable with the \fB\fP and .\" \fI\fP escape sequences to invode bold face and italics, .\" respectively. .PP \fBmake-jpkg\fP builds a Debian package from the given Java distribution FILE. .PP Supported java binary distributions currently include: * Oracle (http://www.oracle.com/technetwork/java/javase/downloads) : - The Java Development Kit (JDK), version 6, 7 and 8 - The Java Runtime Environment (JRE), version 6, 7 and 8 - The Java API Javadoc, version 6, 7 and 8 (Choose tar.gz archives or self-extracting archives, do _not_ choose the RPM!) .PP The following options are recognized: .TP .B --full-name \fINAME\fR full name used in the maintainer field of the package .TP .B --email \fIEMAIL\fR email address used in the maintainer field of the package .TP .B --changes create a .changes file .TP .B --revision add debian revision .TP .B --help display help text and exit .TP .B --version output version information and exit .PP Download a supported JRE, JDK, API tar.gz or self-extracting archive from .B http://www.oracle.com/technetwork/java/javase/downloads and execute .B make-jpkg .I file with the downloaded file. The program asks the user for additional 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 .I /tmp but you can specify an alternate directory by setting the environment variable \fITMPDIR\fR. .SH EXAMPLE To install Oracle(TM) 7 Standard Edition JDK, download a release - 64 bits version of update 2 from http://www.oracle.com/technetwork/java/javase/downloads/jdk-7u2-download-1377129.html in this example - and invoke make-jpkg: .IP make-jpkg /jdk-7u2-linux-x64.tar.gz .PP This generate a Debian package in the current directory, that can be installed using dpkg: .IP dpkg \-i oracle-java7-jdk_7u2_amd64.deb .PP When you're done, you can delete initial download as well as generated package: .IP rm /jdk-7u2-linux-x64.tar.gz oracle-java7-jdk_7u2_amd64.deb .PP .SH ENVIRONMENT .TP .SM TMPDIR base directory used for temporary files (defaults to /tmp) .TP .SM J2SE_PACKAGE_FULL_NAME full name used in the maintainer field of the package; if none is supplied then the default of "Debian Java Maintainers" is used. .TP .SM J2SE_PACKAGE_EMAIL email address used in the maintainer field of the package; if none is supplied the default of "pkg-java-maintainers@lists.alioth.debian.org" is used. .SH SEE ALSO .BR update-java-alternatives(1) .SH AUTHOR This manual page was written by Hubert Schmid . It is now maintained by the Debian Java Maintainers .