[libnb-platform-java] 02/03: Update packaging for 7.4

Andrew Ross rockclimb-guest at alioth.debian.org
Tue Oct 22 19:49:42 UTC 2013


This is an automated email from the git hooks/post-receive script.

rockclimb-guest pushed a commit to branch master
in repository libnb-platform-java.

commit dcccbae26534a937819d2c3f09141a52c8fa710c
Author: Andrew Ross <ubuntu at rossfamily.co.uk>
Date:   Tue Oct 22 20:42:10 2013 +0100

    Update packaging for 7.4
---
 debian/README.source                               |   11 -
 debian/changelog                                   |   27 +-
 debian/control                                     |   76 ++-
 debian/copyright                                   |  535 +-------------------
 ...ibnb-org-openide-modules-java.lintian-overrides |    3 +
 debian/libnb-org-openide-modules-java.manifest     |    2 -
 .../libnb-org-openide-util-java.lintian-overrides  |    3 +
 debian/libnb-org-openide-util-java.manifest        |    2 -
 debian/libnb-platform-devel-java.lintian-overrides |    6 +-
 debian/libnb-platform13-java-doc.doc-base          |   11 -
 debian/libnb-platform13-java.lintian-overrides     |   12 -
 debian/libnb-platform18-java-doc.javadoc           |    1 +
 debian/libnb-platform18-java.lintian-overrides     |    7 +
 .../libnb-platform18-nbms-java.lintian-overrides   |    4 +
 debian/linked-jars                                 |   19 +
 debian/orig-tar.sh                                 |  105 +++-
 .../netbeans-platform~classfile-version.patch      |   13 +
 .../netbeans-platform~empty-binaries-list.patch    |   67 +++
 .../patches/netbeans-platform~include-extras.patch |   61 +--
 debian/patches/netbeans-platform~jemmy.patch       |   14 +
 debian/patches/netbeans-platform~launcher.patch    |   17 +-
 debian/patches/netbeans-platform~nbi.patch         |    9 +-
 debian/patches/netbeans-platform~nodownloads.patch |   77 ---
 .../patches/netbeans-platform~nojnabinaries.patch  |   58 ++-
 debian/patches/netbeans-platform~properties.patch  |   16 +-
 debian/patches/netbeans-platform~suitebuild.patch  |   14 +
 .../netbeans-platform~windowslauncher.patch        |  411 ++++++++++-----
 debian/patches/series                              |    5 +-
 debian/pom/openide-modules.xml                     |    6 +-
 debian/pom/openide-util-lookup.xml                 |    2 +-
 debian/pom/openide-util.xml                        |    4 +-
 debian/rules                                       |  184 +++----
 debian/watch                                       |    4 +-
 33 files changed, 748 insertions(+), 1038 deletions(-)

diff --git a/debian/README.source b/debian/README.source
index 01c7da4..4a01bd4 100644
--- a/debian/README.source
+++ b/debian/README.source
@@ -1,14 +1,3 @@
 The tarball is generated from the upstream zip using orig-tar.sh which
 removes bundled jar files and other binaries, including some which we
 cannot regenerate in Debian but don't need.
-
-
-Note that the following files are zip files which contain ASCII source
-files along with jar files, however the jar files are again just zip
-files with ASCII only source files within. There is nothing here that
-can't be edited in this form.
-
-./autoupdate.services/test/unit/src/org/netbeans/api/autoupdate/data/*.nbm
-./autoupdate.services/test/unit/src/org/netbeans/modules/autoupdate/updateprovider/data/*.nbm
-
-
diff --git a/debian/changelog b/debian/changelog
index e7c8bd2..fe4136f 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,19 +1,16 @@
-libnb-platform-java (7.0+dfsg1-1) unstable; urgency=low
-
-  * New upstream release.
+libnb-platform18-java (7.4+dfsg1-1) unstable; urgency=low
+
+  * New upstream release of Netbeans.
+  * Switch to mingw-w64 (Closes: #680468)
+  * Separate Netbeans Platform back into its own package.
+  * Include cluster release number in source package name to allow
+    multiple Netbeans platforms to be installed at once.
+  * Build .nbm modules and install into their own package.
+  * Remove bashism from o.n.bootstrap/launcher/unix/nbexec (Closes: #690633)
   * Updated debian/patches.
-  * Bump standards version to 3.9.2.
-  * Added myself to Uploaders.
-  * Build Windows launcher using mingw.
-  * Move utilility libraries to their own packages. (Closes: #490433)
-  * Also close some bugs which were fixed in the 6.9 series which never
-    entered the Debian archives:
-    - Use packaged swinglayout.jar. (Closes: #448922)
-    - Depend on generic Java. (Closes: #499417)
-    - Package for Debian Main. (Closes: #531952)
-  * Update Copyright file to cover all files correctly.
-
- -- Andrew Ross <ubuntu at rossfamily.co.uk>  Sun, 19 Jun 2011 19:48:54 +0100
+  * Bump standards version to 3.9.4.
+
+ -- Andrew Ross <ubuntu at rossfamily.co.uk>  Tue, 07 Aug 2012 22:22:54 +0100
 
 libnb-platform-java (6.9-1) unstable; urgency=low
 
diff --git a/debian/control b/debian/control
index e6e0e97..71d8f90 100644
--- a/debian/control
+++ b/debian/control
@@ -1,28 +1,32 @@
-Source: libnb-platform-java
+Source: libnb-platform18-java
 Section: java
 Priority: optional
 Maintainer: Debian Java Maintainers <pkg-java-maintainers at lists.alioth.debian.org>
-Uploaders: Yulia Novozhilova <Yulia.Novozhilova at sun.com>,
- Andres Mejia <mcitadel at gmail.com>, Andrew Ross <ubuntu at rossfamily.co.uk>
-Build-Depends: debhelper (>= 7.0.50~), javahelper, ant, ant-optional,
- default-jdk, javahelp2, mingw32, libswing-layout-java (>= 1.0.3),
- libjna-java (>= 3.2.7-2~), junit4 (>= 4.6), w3c-dtd-xhtml, 
- libequinox-osgi-java, libfelix-framework-java, libfelix-main-java, 
- libbindex-java, antlr3, libjemmy2-java, libstringtemplate-java,
- maven-repo-helper
-Standards-Version: 3.9.2
+Uploaders: Andrew Ross <ubuntu at rossfamily.co.uk>
+Build-Depends: debhelper (>= 7.0.50~), javahelper, ant (>= 1.7.0),
+ ant-optional (>= 1.7.0), default-jdk, java7-jdk, g++-mingw-w64-i686, g++-mingw-w64-x86-64,
+ maven-repo-helper, w3c-dtd-xhtml, javacc,
+ libjemmy2-java, javahelp2, libbindex-java,
+ libswing-layout-java (>= 1.0.3), libjna-java (>= 3.2.7-2~),
+ libfelix-framework-java, libfelix-main-java, libosgi-core-java,
+ libosgi-compendium-java, antlr3 (>= 3.2), libstringtemplate-java,
+ junit4 (>= 4.6), libhamcrest-java, junit, libequinox-osgi-java,
+ testng (>=6.8), libjnlp-servlet-java
+Standards-Version: 3.9.4
 Homepage: http://netbeans.org/
-Vcs-Browser: http://git.debian.org/?p=pkg-java/libnb-platform-java.git
-Vcs-Git: git://git.debian.org/git/pkg-java/libnb-platform-java.git
+Vcs-Browser: http://anonscm.debian.org/gitweb/?p=pkg-java/libnb-platform-java.git
+Vcs-Git: git://anonscm.debian.org/pkg-java/libnb-platform-java.git
 
-Package: libnb-platform13-java
+Package: libnb-platform18-java
 Architecture: all
-Depends: ${misc:Depends}, ${java:Depends}, javahelp2,
+Depends: ${misc:Depends}, ${java:Depends}, javahelp2, 
  libswing-layout-java (>= 1.0.3), libjna-java(>= 3.2.7-2~), junit4 (>= 4.6),
- libequinox-osgi-java, libfelix-framework-java, libfelix-main-java,
- libnb-org-openide-util-java, libnb-org-openide-util-lookup-java, 
- libnb-org-openide-modules-java
-Suggests: libnb-platform13-java-doc
+ libfelix-framework-java, libfelix-main-java, libosgi-core-java,
+ libosgi-compendium-java, libnb-org-openide-util-java (>= ${source:Version}),
+ antlr3 (>= 3.2), libequinox-osgi-java, testng,
+ libnb-org-openide-util-lookup-java (>= ${source:Version}), 
+ libnb-org-openide-modules-java (>= ${source:Version})
+Suggests: libnb-platform16-java-doc
 Description: NetBeans Platform for building rich desktop applications in Java
  The NetBeans Platform is a framework for building rich desktop applications
  in Java. It provides the code that is required to connect actions to menu 
@@ -33,8 +37,8 @@ Description: NetBeans Platform for building rich desktop applications in Java
 
 Package: libnb-platform-devel-java
 Architecture: all
-Depends: ${misc:Depends}, ${java:Depends}, libnb-platform13-java,
- javahelp2, libbindex-java, libjemmy2-java
+Depends: ${misc:Depends}, ${java:Depends}, libnb-platform18-java,
+ ant, libjemmy2-java, javahelp2, libbindex-java, libjnlp-servlet-java,
 Replaces: libnb-platform8-devel-java, libnb-platform7-devel-java
 Conflicts: libnb-platform8-devel-java, libnb-platform7-devel-java
 Description: Build harness for NetBeans Platform
@@ -47,13 +51,13 @@ Description: Build harness for NetBeans Platform
  scripts and ant tasks required to build an application on top of NetBeans 
  Platform.
 
-Package: libnb-platform13-java-doc
+Package: libnb-platform18-java-doc
 Architecture: all
 Section: doc
 Depends: ${misc:Depends}
 Recommends: ${java:Recommends}
-Suggests: libnb-platform13-java
-Enhances: libnb-platform13-java
+Suggests: libnb-platform18-java
+Enhances: libnb-platform18-java
 Description: NetBeans Platform javadoc 
  NetBeans Platform is a set of modules, each providing their own APIs
  and working together or in a standalone mode. This package provides
@@ -61,7 +65,9 @@ Description: NetBeans Platform javadoc
 
 Package: libnb-org-openide-util-java
 Architecture: all
-Depends: ${misc:Depends}, ${java:Depends}, libnb-org-openide-util-lookup-java
+Depends: ${misc:Depends}, ${java:Depends}, 
+ libnb-org-openide-util-lookup-java (>= ${source:Version})
+Provides: libopenide-util-java
 Replaces: libopenide-util-java
 Conflicts: libopenide-util-java
 Description: Utility classes from the NetBeans Platform
@@ -80,9 +86,27 @@ Description: Utility lookup classes from the NetBeans Platform
 
 Package: libnb-org-openide-modules-java
 Architecture: all
-Depends: ${misc:Depends}, ${java:Depends}, libnb-org-openide-util-java,
- libnb-org-openide-util-lookup-java
+Depends: ${misc:Depends}, ${java:Depends},
+ libnb-org-openide-util-java (>= ${source:Version}),
+ libnb-org-openide-util-lookup-java (>= ${source:Version})
 Description: Utility classes for modules from the NetBeans Platform
  The NetBeans Platform is a set of modules, each providing their own 
  APIs and working together or in a standalone mode. This package provides
  some utility functions for managing NetBeans modules.
+
+Package: libnb-platform18-nbms-java
+Architecture: all
+Depends: ${misc:Depends}
+Built-Using: libswing-layout-java (>= 1.0.3), libjna-java(>= 3.2.7-2~), 
+ junit4 (>= 4.6), libfelix-framework-java, libfelix-main-java, libosgi-core-java,
+ libosgi-compendium-java, libnb-org-openide-util-java (>= ${source:Version}),
+ antlr3 (>= 3.2), libequinox-osgi-java, testng,
+ libjemmy2-java, javahelp2, libbindex-java, libjnlp-servlet-java
+Description: NBM files for NetBeans Platform
+ The NetBeans Platform is a framework for building rich desktop applications
+ in Java. It provides the code that is required to connect actions to menu 
+ items, toolbar items, keyboard shortcuts and more. It is the core of the 
+ NetBeans IDE.
+ .
+ This package contains the NBM bundles for the Netbeans Platform and 
+ Harness.
diff --git a/debian/copyright b/debian/copyright
index 77fb3b0..f341b92 100644
--- a/debian/copyright
+++ b/debian/copyright
@@ -1,9 +1,9 @@
-Format: http://svn.debian.org/wsvn/dep/web/deps/dep5.mdwn?op=file&rev=166
-Upstream-Name: libnb-platform-java
-Source: http://netbeans.org/downloads/zip.html
+Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
+Name: libnb-platform18-java
+Source: http://dlc.sun.com.edgesuite.net/netbeans/
 
 Files: *
-Copyright: Copyright 1997-2010 Oracle and/or its affiliates. 
+Copyright: Copyright 1997-2013 Oracle and/or its affiliates. 
           Portions Copyrighted 1997-2009 Sun Microsystems, Inc.
 License: CDDL-1 or GPL-2 with CLASSPATH exception
  "CLASSPATH" EXCEPTION TO THE GPL VERSION 2
@@ -37,6 +37,7 @@ License: CDDL-1 or GPL-2 with CLASSPATH exception
 
 Files: debian/*
 Copyright: 2008-2010, Yulia Novozhilova <Yulia.Novozhilova at sun.com>
+           2011-2012, Andrew Ross <ubuntu at rossfamily.co.uk>
 License: GPL-2
 
 Files: ./options.keymap/build.xml,
@@ -47,56 +48,17 @@ Files: ./options.keymap/build.xml,
  ./o.n.bootstrap/src/org/netbeans/ModuleFactory.java,
  ./apisupport.harness/jnlp-src/org/netbeans/modules/apisupport/jnlplauncher/RuntimePolicy.java,
  ./apisupport.harness/test/unit/src/org/netbeans/modules/apisupport/jnlplauncher/FixPolicyTest.java
-Copyright: Copyright 1997-2010 Oracle and/or its affiliates. All rights reserved.
+Copyright: Copyright 1997-2013 Oracle and/or its affiliates. All rights reserved.
            Portions Copyrihgt 2005-2006 Nokia
 License: CDDL-1 or GPL-2 with CLASSPATH exception
 
 Files: ./core.windows/test/unit/src/org/netbeans/core/windows/view/ui/CustomMenuBarTest.java,
  ./core.startup/test/unit/src/org/netbeans/core/startup/layers/CustomWritableSystemFileSystemTest.java
-Copyright: Copyright 1997-2010 Oracle and/or its affiliates. 
+Copyright: Copyright 1997-2013 Oracle and/or its affiliates. 
     Portions Copyrighted 2007 Nokia Siemens Networks Oy
 License: CDDL-1 or GPL-2 with CLASSPATH exception
 
-Files: ./jemmy/*
-Copyright: Copyright 1997-2008 Sun Microsystems, Inc.    
-License: CDDL-1 or GPL-2 with CLASSPATH exception
-
-
-Files: ./spi.quicksearch/arch.xml,
- ./o.n.swing.outline/arch.xml,
- ./core.startup/src/org/netbeans/core/startup/instance-mime-resolver.xml,
- ./core.startup/arch.xml,
- ./nbjunit/test/unit/src/org/netbeans/junit/TestBundle.properties,
- ./core.ui/arch.xml,
- ./libs.nbi.ant/stub/build.properties,
- ./api.annotations.common/arch.xml,
- ./spi.actions/arch.xml,
- ./nbi/engine/nbproject/genfiles.properties,
- ./sendopts/test/unit/src/org/netbeans/api/sendopts/StreamingTest.java,
-Copyright: Copyright 1997-2009 Sun Microsystems, Inc.    
-License: CDDL-1
-
-Files: ./nbjunit/test/unit/src/org/netbeans/junit/TestBundle.properties
-Copyright: Copyright (C) 2006 Jaroslav Tulach.
-License: CDDL-1
-
-Files: ./openide.util/test/unit/src/org/openide/util/UtilitiesTranslate29878.txt,
- ./nbbuild/test/unit/src/org/netbeans/nbbuild/testdist/TestDistFilterTest.java
-Copyright: Copyright 1997-2010 Oracle and/or its affiliates.
- Portions Copyright 1997-2006 Sun Microsystems, Inc.
-License: CDDL-1
-
-Files: ./openide.loaders/test/unit/src/org/openide/loaders/DataShadowLookupTest.java,
- ./nbbuild/test/unit/src/org/netbeans/nbbuild/CheckLicenseXmlExample.xml,
- ./nbbuild/test/unit/src/org/netbeans/nbbuild/ShorterPathsTest.xml,
- ./nbbuild/test/unit/src/org/netbeans/nbbuild/CheckLicenseHtmlExample.xml,
- ./nbbuild/test/unit/src/org/netbeans/nbbuild/CheckLicensePropertiesExample.properties
-Copyright: Copyright 1997-2006 Sun Microsystems, Inc.
-License: SPL-1
-
-
-
-Files: ./o.n.core/external/nsProxyAutoConfig.js
+Files: ./core.network/external/nsProxyAutoConfig.js
 Copyright: Copyright (C) 1998 Netscape Communications Corporation.
  Contributor(s):
     Akhil Arora <akhil.arora at sun.com>
@@ -126,494 +88,16 @@ License: MPL-1.1 or GPL-2 or LGPL-2.1
  the terms of any one of the MPL, the GPL or the LGPL.
 
 
-
 License: GPL-2
      On Debian systems the full text of the GNU General Public 
      License can be found in the `/usr/share/common-licenses/GPL-2'
      file.
 
-
-License LGPL-2.1
+License: LGPL-2.1
      On Debian systems the full text of the GNU General Public 
      License can be found in the `/usr/share/common-licenses/LGPL-2.1'
      file.
 
-
-License: SPL-1
- SUN PUBLIC LICENSE Version 1.0 
- .
- 1. Definitions. 
- .
-	1.0.1. "Commercial Use" means distribution or otherwise making the 
-	Covered Code available to a third party. 
- .
-	1.1. "Contributor" means each entity that creates or contributes to 
-	the creation of Modifications. 
- .
-	1.2. "Contributor Version" means the combination of the Original Code, 
-	prior Modifications used by a Contributor, and the Modifications made 
-	by that particular Contributor. 
- .
-	1.3. "Covered Code" means the Original Code or Modifications or the 
-	combination of the Original Code and Modifications, in each case 
-	including portions thereof and corresponding documentation released 
-	with the source code. 
- .
-	1.4. "Electronic Distribution Mechanism" means a mechanism generally 
-	accepted in the software development community for the electronic 
-	transfer of data. 
- .
-	1.5. "Executable" means Covered Code in any form other than Source 
-	Code. 
- .
-	1.6. "Initial Developer" means the individual or entity identified as 
-	the Initial Developer in the Source Code notice required by Exhibit A. 
- .
-	1.7. "Larger Work" means a work which combines Covered Code or 
-	portions thereof with code not governed by the terms of this License. 
- .
-	1.8. "License" means this document. 
- .
-	1.8.1. "Licensable" means having the right to grant, to the maximum 
-	extent possible, whether at the time of the initial grant or 
-	subsequently acquired, any and all of the rights conveyed herein. 
- .
-	1.9. "Modifications" means any addition to or deletion from the 
-	substance or structure of either the Original Code or any previous 
-	Modifications. When Covered Code is released as a series of files, a 
-	Modification is: 
- .
-	A. Any addition to or deletion from the contents of a file containing 
-	Original Code or previous Modifications. 
- .
-	B. Any new file that contains any part of the Original Code or 
-	previous Modifications. 
- .
-	1.10. "Original Code" means Source Code of computer software code 
-	which is described in the Source Code notice required by Exhibit A as 
-	Original Code, and which, at the time of its release under this 
-	License is not already Covered Code governed by this License. 
- .
-	1.10.1. "Patent Claims" means any patent claim(s), now owned or 
-	hereafter acquired, including without limitation, method, process, and 
-	apparatus claims, in any patent Licensable by grantor. 
- .
-	1.11. "Source Code" means the preferred form of the Covered Code for 
-	making modifications to it, including all modules it contains, plus 
-	any associated documentation, interface definition files, scripts used 
-	to control compilation and installation of an Executable, or source 
-	code differential comparisons against either the Original Code or 
-	another well known, available Covered Code of the Contributor's 
-	choice. The Source Code can be in a compressed or archival form, 
-	provided the appropriate decompression or de-archiving software is 
-	widely available for no charge. 
- .
-	1.12. "You" (or "Your") means an individual or a legal entity 
-	exercising rights under, and complying with all of the terms of, this 
-	License or a future version of this License issued under Section 6.1. 
-	For legal entities, "You" includes any entity which controls, is 
-	controlled by, or is under common control with You. For purposes of 
-	this definition, "control" means (a) the power, direct or indirect, to 
-	cause the direction or management of such entity, whether by contract 
-	or otherwise, or (b) ownership of more than fifty percent (50%) of the 
-	outstanding shares or beneficial ownership of such entity.
- .
- 2. Source Code License. 
- .
- 2.1 The Initial Developer Grant. 
- .
-	The Initial Developer hereby grants You a world-wide, royalty-free, 
-	non-exclusive license, subject to third party intellectual property 
-	claims: 
- .
-	(a)  under intellectual property rights (other than patent or 
-	trademark) Licensable by Initial Developer to use, reproduce, modify, 
-	display, perform, sublicense and distribute the Original Code (or 
-	portions thereof) with or without Modifications, and/or as part of a 
-	Larger Work; and 
- .
-	(b) under Patent Claims infringed by the making, using or selling of 
-	Original Code, to make, have made, use, practice, sell, and offer for 
-	sale, and/or otherwise dispose of the Original Code (or portions 
-	thereof). 
- .
-	(c) the licenses granted in this Section 2.1(a) and (b) are effective 
-	on the date Initial Developer first distributes Original Code under 
-	the terms of this License. 
- .
-	(d) Notwithstanding Section 2.1(b) above, no patent license is 
-	granted: 1) 	for code that You delete from the Original Code; 2) 
-	separate from the 	Original Code; or 3) for infringements caused by: 
-	i) the modification of the Original Code or ii) the combination of the 
-	Original Code with other software or devices. 
- .
- 2.2. Contributor Grant. 
- .
-	Subject to third party intellectual property claims, each Contributor 
-	hereby grants You a world-wide, royalty-free, non-exclusive license 
- .
-	(a) under intellectual property rights (other than patent or 
-	trademark) Licensable by Contributor, to use, reproduce,  modify, 
-	display, perform, sublicense and distribute the Modifications created 
-	by such Contributor (or portions thereof) either on an unmodified 
-	basis, with other Modifications, as Covered Code and/or as part of a 
-	Larger Work; and 
- .
-	(b) under Patent Claims infringed by the making, using, or selling of  
-	Modifications made by that Contributor either alone and/or in 
-	combination with its Contributor Version (or portions of such 
-	combination), to make, use, sell, offer for sale, have made, and/or 
-	otherwise dispose of: 1) Modifications made by that Contributor (or 
-	portions thereof); and 2) the combination of Modifications made by 
-	that Contributor with its Contributor Version (or portions of such 
-	combination). 
- .
-	(c) the licenses granted in Sections 2.2(a) and 2.2(b) are effective 
-	on the date Contributor first makes Commercial Use of the Covered 
-	Code. 
- .
-	(d)  notwithstanding Section 2.2(b) above, no patent license is 
-	granted: 1) for any code that Contributor has deleted from the 
-	Contributor Version; 2)  separate from the Contributor Version; 3) for 
-	infringements caused by: i) third party modifications of Contributor 
-	Version or ii) the combination of Modifications made by that 
-	Contributor with other software (except as part of the Contributor 
-	Version) or other devices; or 4) under Patent Claims infringed by 
-	Covered Code in the absence of Modifications made by that Contributor.
- .
- 3. Distribution Obligations. 
- .
- 3.1. Application of License.
- .
-	The Modifications which You create or to which You contribute are 
-	governed by the terms of this License, including without limitation 
-	Section 2.2. The Source Code version of Covered Code may be 
-	distributed only under the terms of this License or a future version 
-	of this License released under Section 6.1, and You must include a 
-	copy of this License with every copy of the Source Code You 
-	distribute. You may not offer or impose any terms on any Source Code 
-	version that alters or restricts the applicable version of this 
-	License or the recipients' rights hereunder. However, You may include 
-	an additional document offering the additional rights described in 
-	Section 3.5. 
- .
- 3.2. Availability of Source Code.
- .
-	Any Modification which You create or to which You contribute must be 
-	made available in Source Code form under the terms of this License 
-	either on the same media as an Executable version or via an accepted 
-	Electronic Distribution Mechanism to anyone to whom you made an 
-	Executable version available; and if made available via Electronic 
-	Distribution Mechanism, must remain available for at least twelve (12) 
-	months after the date it initially became available, or at least six 
-	(6) months after a subsequent version of that particular Modification 
-	has been made available to such recipients. You are responsible for 
-	ensuring that the Source Code version remains available even if the 
-	Electronic Distribution Mechanism is maintained by a third party. 
- .
- 3.3. Description of Modifications.
- .
-	You must cause all Covered Code to which You contribute to contain a 
-	file documenting the changes You made to create that Covered Code and 
-	the date of any change. You must include a prominent statement that 
-	the Modification is derived, directly or indirectly, from Original 
-	Code provided by the Initial Developer and including the name of the 
-	Initial Developer in (a) the Source Code, and (b) in any notice in an 
-	Executable version or related documentation in which You describe the 
-	origin or ownership of the Covered Code. 
- .
- 3.4. Intellectual Property Matters.
- .
-	(a) Third Party Claims.
- .
-	If Contributor has knowledge that a license under a third party's 
-	intellectual property rights is required to exercise the rights 
-	granted by such Contributor under Sections 2.1 or 2.2, Contributor 
-	must include a text file with the Source Code distribution titled 
-	"LEGAL'' which describes the claim and the party making the claim in 
-	sufficient detail that a recipient will know whom to contact. If 
-	Contributor obtains such knowledge after the Modification is made 
-	available as described in Section 3.2, Contributor shall promptly 
-	modify the LEGAL file in all copies Contributor makes available 
-	thereafter and shall take other steps (such as notifying appropriate 
-	mailing lists or newsgroups) reasonably calculated to inform those who 
-	received the Covered Code that new knowledge has been obtained. 
- .
-	(b) Contributor APIs.
- .
-	If Contributor's Modifications include an application programming 
-	interface ("API") and Contributor has knowledge of patent licenses 
-	which are reasonably necessary to implement that API, Contributor must 
-	also include this information in the LEGAL file. 
- .
-	(c) Representations.
- .
-	Contributor represents that, except as disclosed pursuant to Section 
-	3.4(a) above, Contributor believes that Contributor's Modifications 
-	are Contributor's original creation(s) and/or Contributor has 
-	sufficient rights to grant the rights conveyed by this License.
- .
- 3.5. Required Notices.
- .
-	You must duplicate the notice in Exhibit A in each file of the Source 
-	Code. If it is not possible to put such notice in a particular Source 
-	Code file due to its structure, then You must include such notice in a 
-	location (such as a relevant directory) where a user would be likely 
-	to look for such a notice.  If You created one or more Modification(s) 
-	You may add your name as a Contributor to the notice described in 
-	Exhibit A. You must also duplicate this License in any documentation 
-	for the Source Code where You describe recipients' rights or ownership 
-	rights relating to Covered Code. You may choose to offer, and to 
-	charge a fee for, warranty, support, indemnity or liability 
-	obligations to one or more recipients of Covered Code. However, You 
-	may do so only on Your own behalf, and not on behalf of the Initial 
-	Developer or any Contributor. You must make it absolutely clear than 
-	any such warranty, support, indemnity or liability obligation is 
-	offered by You alone, and You hereby agree to indemnify the Initial 
-	Developer and every Contributor for any liability incurred by the 
-	Initial Developer or such Contributor as a result of warranty, 
-	support, indemnity or liability terms You offer. 
- .
- 3.6. Distribution of Executable Versions.
- .
-	You may distribute Covered Code in Executable form only if the 
-	requirements of Section 3.1-3.5 have been met for that Covered Code, 
-	and if You include a notice stating that the Source Code version of 
-	the Covered Code is available under the terms of this License, 
-	including a description of how and where You have fulfilled the 
-	obligations of Section 3.2. The notice must be conspicuously included 
-	in any notice in an Executable version, related documentation or 
-	collateral in which You describe recipients' rights relating to the 
-	Covered Code. You may distribute the Executable version of Covered 
-	Code or ownership rights under a license of Your choice, which may 
-	contain terms different from this License, provided that You are in 
-	compliance with the terms of this License and that the license for the 
-	Executable version does not attempt to limit or alter the recipient's 
-	rights in the Source Code version from the rights set forth in this 
-	License. If You distribute the Executable version under a different 
-	license You must make it absolutely clear that any terms which differ 
-	from this License are offered by You alone, not by the Initial 
-	Developer or any Contributor. You hereby agree to indemnify the 
-	Initial Developer and every Contributor for any liability incurred by 
-	the Initial Developer or such Contributor as a result of any such 
-	terms You offer. 
- .
- 3.7. Larger Works.
- .
-	You may create a Larger Work by combining Covered Code with other code 
-	not governed by the terms of this License and distribute the Larger 
-	Work as a single product. In such a case, You must make sure the 
-	requirements of this License are fulfilled for the Covered Code.
- .
- 4. Inability to Comply Due to Statute or Regulation. 
- .
-	If it is impossible for You to comply with any of the terms of this 
-	License with respect to some or all of the Covered Code due to 
-	statute, judicial order, or regulation then You must: (a) comply with 
-	the terms of this License to the maximum extent possible; and (b) 
-	describe the limitations and the code they affect. Such description 
-	must be included in the LEGAL file described in Section 3.4 and must 
-	be included with all distributions of the Source Code. Except to the 
-	extent prohibited by statute or regulation, such description must be 
-	sufficiently detailed for a recipient of ordinary skill to be able to 
-	understand it.
- .
- 5. Application of this License. 
- .
-	This License applies to code to which the Initial Developer has 
-	attached the notice in Exhibit A and to related Covered Code.
- .
- 6. Versions of the License. 
- .
- 6.1. New Versions.
- .
-	Sun Microsystems, Inc. ("Sun") may publish revised and/or new versions 
-	of the License from time to time. Each version will be given a 
-	distinguishing version number. 
- .
- 6.2. Effect of New Versions.
- .
-	Once Covered Code has been published under a particular version of the 
-	License, You may always continue to use it under the terms of that 
-	version. You may also choose to use such Covered Code under the terms 
-	of any subsequent version of the License published by Sun. No one 
-	other than Sun has the right to modify the terms applicable to Covered 
-	Code created under this License. 
- .
- 6.3. Derivative Works.
- .
-	If You create or use a modified version of this License (which you may 
-	only do in order to apply it to code which is not already Covered Code 
-	governed by this License), You must: (a) rename Your license so that 
-	the phrases "Sun," "Sun Public License," or "SPL" or any confusingly 
-	similar phrase do not appear in your license (except to note that your 
-	license differs from this License) and (b) otherwise make it clear 
-	that Your version of the license contains terms which differ from the 
-	Sun Public License. (Filling in the name of the Initial Developer, 
-	Original Code or Contributor in the notice described in Exhibit A 
-	shall not of themselves be deemed to be modifications of this 
-	License.)
- .
- 7. DISCLAIMER OF WARRANTY. 
- .
-	COVERED CODE IS PROVIDED UNDER THIS LICENSE ON AN "AS IS'' BASIS, 
-	WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, 
-	WITHOUT LIMITATION, WARRANTIES THAT THE COVERED CODE IS FREE OF 
-	DEFECTS, MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE OR NON-INFRINGING. 
-	THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE COVERED CODE 
-	IS WITH YOU. SHOULD ANY COVERED CODE PROVE DEFECTIVE IN ANY RESPECT, 
-	YOU (NOT THE INITIAL DEVELOPER OR ANY OTHER CONTRIBUTOR) ASSUME THE 
-	COST OF ANY NECESSARY SERVICING, REPAIR OR CORRECTION. THIS DISCLAIMER 
-	OF WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS LICENSE. NO USE OF 
-	ANY COVERED CODE IS AUTHORIZED HEREUNDER EXCEPT UNDER THIS DISCLAIMER.
- .
- 8. TERMINATION. 
- .
-	8.1. This License and the rights granted hereunder will terminate 
-	automatically if You fail to comply with terms herein and fail to cure 
-	such breach within 30 days of becoming aware of the breach. All 
-	sublicenses to the Covered Code which are properly granted shall 
-	survive any termination of this License. Provisions which, by their 
-	nature, must remain in effect beyond the termination of this License 
-	shall survive. 
- .
-	8.2. If You initiate litigation by asserting a patent infringement 
-	claim (excluding declaratory judgment actions) against Initial Developer 
-	or a Contributor (the Initial Developer or Contributor against whom 
-	You file such action is referred to as "Participant")  alleging that: 
- .
-	(a) such Participant's Contributor Version directly or indirectly 
-	infringes any patent, then any and all rights granted by such 
-	Participant to You under Sections 2.1 and/or 2.2 of this License 
-	shall, upon 60 days notice from Participant terminate prospectively, 
-	unless if within 60 days after receipt of notice You either: (i)  
-	agree in writing to pay Participant a mutually agreeable reasonable 
-	royalty for Your past and future use of Modifications made by such 
-	Participant, or (ii) withdraw Your litigation claim with respect to 
-	the Contributor Version against such Participant.  If within 60 days 
-	of notice, a reasonable royalty and payment arrangement are not 
-	mutually agreed upon in writing by the parties or the litigation claim 
-	is not withdrawn, the rights granted by Participant to You under 
-	Sections 2.1 and/or 2.2 automatically terminate at the expiration of 
-	the 60 day notice period specified above. 
- .
-	(b) any software, hardware, or device, other than such Participant's 
-	Contributor Version, directly or indirectly infringes any patent, then 
-	any rights granted to You by such Participant under Sections 2.1(b) 
-	and 2.2(b) are revoked effective as of the date You first made, used, 
-	sold, distributed, or had made, Modifications made by that 
-	Participant. 
- .
-	8.3. If You assert a patent infringement claim against Participant 
-	alleging that such Participant's Contributor Version directly or 
-	indirectly infringes any patent where such claim is resolved (such as 
-	by license or settlement) prior to the initiation of patent 
-	infringement litigation, then the reasonable value of the licenses 
-	granted by such Participant under Sections 2.1 or 2.2 shall be taken 
-	into account in determining the amount or value of any payment or 
-	license. 
- .
-	8.4. In the event of termination under Sections 8.1 or 8.2 above,  all 
-	end user license agreements (excluding distributors and resellers) 
-	which have been validly granted by You or any distributor hereunder 
-	prior to termination shall survive termination.
- .
- 9. LIMITATION OF LIABILITY. 
- .
-	UNDER NO CIRCUMSTANCES AND UNDER NO LEGAL THEORY, WHETHER TORT 
-	(INCLUDING NEGLIGENCE), CONTRACT, OR OTHERWISE, SHALL YOU, THE INITIAL 
-	DEVELOPER, ANY OTHER CONTRIBUTOR, OR ANY DISTRIBUTOR OF COVERED CODE, 
-	OR ANY SUPPLIER OF ANY OF SUCH PARTIES, BE LIABLE TO ANY PERSON FOR 
-	ANY INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES OF ANY 
-	CHARACTER INCLUDING, WITHOUT LIMITATION, DAMAGES FOR LOSS OF GOODWILL, 
-	WORK STOPPAGE, COMPUTER FAILURE OR MALFUNCTION, OR ANY AND ALL OTHER 
-	COMMERCIAL DAMAGES OR LOSSES, EVEN IF SUCH PARTY SHALL HAVE BEEN 
-	INFORMED OF THE POSSIBILITY OF SUCH DAMAGES. THIS LIMITATION OF 
-	LIABILITY SHALL NOT APPLY TO LIABILITY FOR DEATH OR PERSONAL INJURY 
-	RESULTING FROM SUCH PARTY'S NEGLIGENCE TO THE EXTENT APPLICABLE LAW 
-	PROHIBITS SUCH LIMITATION. SOME JURISDICTIONS DO NOT ALLOW THE 
-	EXCLUSION OR LIMITATION OF INCIDENTAL OR CONSEQUENTIAL DAMAGES, SO 
-	THIS EXCLUSION AND LIMITATION MAY NOT APPLY TO YOU.
- .
- 10. U.S. GOVERNMENT END USERS. 
- .
-	The Covered Code is a "commercial item," as that term is defined in 48 
-	C.F.R. 2.101 (Oct. 1995), consisting of "commercial computer software" 
-	and "commercial computer software documentation," as such terms are 
-	used in 48 C.F.R. 12.212 (Sept. 1995). Consistent with 48 C.F.R. 
-	12.212 and 48 C.F.R. 227.7202-1 through 227.7202-4 (June 1995), all 
-	U.S. Government End Users acquire Covered Code with only those rights 
-	set forth herein.
- .
- 11. MISCELLANEOUS. 
- .
-	This License represents the complete agreement concerning subject 
-	matter hereof. If any provision of this License is held to be 
-	unenforceable, such provision shall be reformed only to the extent 
-	necessary to make it enforceable. This License shall be governed by 
-	California law provisions (except to the extent applicable law, if 
-	any, provides otherwise), excluding its conflict-of-law provisions. 
-	With respect to disputes in which at least one party is a citizen of, 
-	or an entity chartered or registered to do business in the United 
-	States of America, any litigation relating to this License shall be 
-	subject to the jurisdiction of the Federal Courts of the Northern 
-	District of California, with venue lying in Santa Clara County, 
-	California, with the losing party responsible for costs, including 
-	without limitation, court costs and reasonable attorneys' fees and 
-	expenses. The application of the United Nations Convention on 
-	Contracts for the International Sale of Goods is expressly excluded. 
-	Any law or regulation which provides that the language of a contract 
-	shall be construed against the drafter shall not apply to this 
-	License.
- .
- 12. RESPONSIBILITY FOR CLAIMS. 
- .
-	As between Initial Developer and the Contributors, each party is 
-	responsible for claims and damages arising, directly or indirectly, 
-	out of its utilization of rights under this License and You agree to 
-	work with Initial Developer and Contributors to distribute such 
-	responsibility on an equitable basis. Nothing herein is intended or 
-	shall be deemed to constitute any admission of liability.
- .
- 13. MULTIPLE-LICENSED CODE. 
- .
-	Initial Developer may designate portions of the Covered Code as 
-	?Multiple-Licensed?. ?Multiple-Licensed? means that the Initial 
-	Developer permits you to utilize portions of the Covered Code under 
-	Your choice of the alternative licenses, if any, specified by the 
-	Initial Developer in the file described in Exhibit A.
- .
- Exhibit A -Sun Public License Notice. 
- .
-	The contents of this file are subject to the Sun Public License 
-	Version 1.0 (the "License"); you may not use this file except in 
-	compliance with the License. A copy of the License is available at 
-	http://www.sun.com/
- .
-	The Original Code is _________________. The Initial Developer of the 
-	Original Code is ___________. Portions created by ______ are Copyright 
-	(C)_________. All Rights Reserved.
- .
-	Contributor(s): ______________________________________. 
- .
-	Alternatively, the contents of this file may be used under the terms 
-	of the _____ license (the  ?[___] License?), in which case the 
-	provisions of [______] License are applicable  instead of those above.  
-	If you wish to allow use of your version of this file only under the 
-	terms of the [____] License and not to allow others to use your 
-	version of this file under the SPL, indicate your decision by deleting  
-	the provisions above and replace  them with the notice and other 
-	provisions required by the [___] License. If you do not delete the 
-	provisions above, a recipient may use your version of this file under 
-	either the SPL or the [___] License." 
- .
-	[NOTE: The text of this Exhibit A may differ slightly from the text of 
-	the notices in the Source Code files of the Original Code. You should 
-	use the text of this Exhibit A rather than the text found in the 
-	Original Code Source Code for Your Modifications.] 
-
-
-
 License: MPL-1.1
                           MOZILLA PUBLIC LICENSE
                                 Version 1.1
@@ -1085,7 +569,6 @@ License: MPL-1.1
      use the text of this Exhibit A rather than the text found in the
      Original Code Source Code for Your Modifications.]
 
-
 License: CDDL-1
     COMMON DEVELOPMENT AND DISTRIBUTION LICENSE (CDDL)
     Version 1.0
diff --git a/debian/libnb-org-openide-modules-java.lintian-overrides b/debian/libnb-org-openide-modules-java.lintian-overrides
new file mode 100644
index 0000000..e648f48
--- /dev/null
+++ b/debian/libnb-org-openide-modules-java.lintian-overrides
@@ -0,0 +1,3 @@
+# Netbeans has it's own way to set the classpath, and it breaks things if we 
+# set it separately.
+libnb-org-openide-modules-java: missing-classpath
diff --git a/debian/libnb-org-openide-modules-java.manifest b/debian/libnb-org-openide-modules-java.manifest
deleted file mode 100644
index 64cad90..0000000
--- a/debian/libnb-org-openide-modules-java.manifest
+++ /dev/null
@@ -1,2 +0,0 @@
-usr/share/java/org-openide-modules.jar:
- Class-Path: org-openide-util.jar org-openide-util-lookup.jar
diff --git a/debian/libnb-org-openide-util-java.lintian-overrides b/debian/libnb-org-openide-util-java.lintian-overrides
new file mode 100644
index 0000000..6e5d028
--- /dev/null
+++ b/debian/libnb-org-openide-util-java.lintian-overrides
@@ -0,0 +1,3 @@
+# Netbeans has it's own way to set the classpath, and it breaks things if we 
+# set it separately.
+libnb-org-openide-util-java: missing-classpath
diff --git a/debian/libnb-org-openide-util-java.manifest b/debian/libnb-org-openide-util-java.manifest
deleted file mode 100644
index e5c0dda..0000000
--- a/debian/libnb-org-openide-util-java.manifest
+++ /dev/null
@@ -1,2 +0,0 @@
-usr/share/java/org-openide-util.jar:
- Class-Path: org-openide-util-lookup.jar
diff --git a/debian/libnb-platform-devel-java.lintian-overrides b/debian/libnb-platform-devel-java.lintian-overrides
index affa279..c371f7c 100644
--- a/debian/libnb-platform-devel-java.lintian-overrides
+++ b/debian/libnb-platform-devel-java.lintian-overrides
@@ -1,12 +1,8 @@
 # Netbeans builds lots of codeless jars on purpose, so don't warn us about them
 libnb-platform-devel-java: codeless-jar
 
-# Netbeans uses relative paths in its jar files. It would be too much work to 
-# fix this so we instead put symlinks in the right place. This is useful when 
-# you build a package to export too.
-libnb-platform-devel-java: classpath-contains-relative-path
-
 # This is a library package in the sense that it doesn't by itself provide an 
 # application. But the jar files don't live in /usr/share/java since they are 
 # specific to the NetBeans platform and need to live in a "cluster"
 libnb-platform-devel-java: javalib-but-no-public-jars
+
diff --git a/debian/libnb-platform13-java-doc.doc-base b/debian/libnb-platform13-java-doc.doc-base
deleted file mode 100644
index f100ce4..0000000
--- a/debian/libnb-platform13-java-doc.doc-base
+++ /dev/null
@@ -1,11 +0,0 @@
-Document: netbeans-platform13-api
-Title: NetBeans Platform API Javadoc
-Author: NetBeans
-Abstract: This document contains NetBeans Platform API Javadoc.
-Section: Programming
-
-Format: HTML
-Index: /usr/share/doc/libnb-platform13-java-doc/api/index.html
-Files: /usr/share/doc/libnb-platform13-java-doc/api/*.html
-
-
diff --git a/debian/libnb-platform13-java.lintian-overrides b/debian/libnb-platform13-java.lintian-overrides
deleted file mode 100644
index 6699b0a..0000000
--- a/debian/libnb-platform13-java.lintian-overrides
+++ /dev/null
@@ -1,12 +0,0 @@
-# Netbeans builds lots of codeless jars on purpose, so don't warn us about them
-libnb-platform13-java: codeless-jar
-
-# Netbeans uses relative paths in its jar files. It would be too much work to 
-# fix this so we instead put symlinks in the right place. This is useful when 
-# you build a package to export too.
-libnb-platform13-java: classpath-contains-relative-path
-
-# This is a library package in the sense that it doesn't by itself provide an 
-# application. But the jar files don't live in /usr/share/java since they are 
-# specific to the NetBeans platform and need to live in a "cluster"
-libnb-platform13-java: javalib-but-no-public-jars
diff --git a/debian/libnb-platform18-java-doc.javadoc b/debian/libnb-platform18-java-doc.javadoc
new file mode 100644
index 0000000..4270eda
--- /dev/null
+++ b/debian/libnb-platform18-java-doc.javadoc
@@ -0,0 +1 @@
+nbbuild/build/javadoc /usr/share/doc/libnb-platform18-java-doc/api
diff --git a/debian/libnb-platform18-java.lintian-overrides b/debian/libnb-platform18-java.lintian-overrides
new file mode 100644
index 0000000..cd83956
--- /dev/null
+++ b/debian/libnb-platform18-java.lintian-overrides
@@ -0,0 +1,7 @@
+# Netbeans builds lots of codeless jars on purpose, so don't warn us about them
+libnb-platform18-java: codeless-jar
+
+# This is a library package in the sense that it doesn't by itself provide an 
+# application. But the jar files don't live in /usr/share/java since they are 
+# specific to the NetBeans platform and need to live in a "cluster"
+libnb-platform18-java: javalib-but-no-public-jars
diff --git a/debian/libnb-platform18-nbms-java.lintian-overrides b/debian/libnb-platform18-nbms-java.lintian-overrides
new file mode 100644
index 0000000..66193fa
--- /dev/null
+++ b/debian/libnb-platform18-nbms-java.lintian-overrides
@@ -0,0 +1,4 @@
+# This is a library package in the sense that it doesn't by itself provide an 
+# application. But the nbm files don't live in /usr/share/java since they are 
+# specific to the NetBeans platform
+libnb-platform18-nbms-java: javalib-but-no-public-jars
diff --git a/debian/linked-jars b/debian/linked-jars
new file mode 100644
index 0000000..e256be0
--- /dev/null
+++ b/debian/linked-jars
@@ -0,0 +1,19 @@
+$JAVADIR/jna-platform.jar libs.jna.platform/external platform/modules/ext platform-3.4.0.jar
+$JAVADIR/jhall.jar javahelp/external platform/modules/ext jhall-2.0_05.jar
+$JAVADIR/antlr3.jar libs.antlr3.devel/external platform/modules/ext antlr-3.4.jar
+$JAVADIR/stringtemplate.jar libs.antlr3.devel/external platform/modules/ext stringtemplate-3.2.jar
+$JAVADIR/org.apache.felix.main.jar libs.felix/external platform/modules/ext felix-4.0.2.jar
+$JAVADIR/jna.jar libs.jna/external platform/modules/ext jna-3.4.0.jar
+$JAVADIR/osgi.core.jar libs.osgi/external platform/modules/ext osgi.core-5.0.0.jar
+$JAVADIR/osgi.compendium.jar libs.osgi/external platform/modules/ext osgi.cmpn-4.2.jar
+$JAVADIR/testng.jar libs.testng/external platform/modules/ext testng-6.8.1-dist.jar
+$JAVADIR/org.eclipse.osgi.jar netbinox/external platform/modules/ext org.eclipse.osgi_3.8.0.v20120529-1548.jar
+$JAVADIR/swing-layout.jar o.jdesktop.layout/external platform/modules/ext swing-layout-1.0.4.jar
+
+$JAVADIR/jemmy2.jar jemmy/external harness/modules/ext jemmy-2.3.1.1.jar
+$JAVADIR/jsearch.jar apisupport.harness/external harness/antlib jsearch-2.0_05.jar
+$JAVADIR/bindex.jar apisupport.harness/external harness/antlib bindex-2.2.jar
+$JAVADIR/jnlp-servlet.jar apisupport.harness/external harness/jnlp jnlp-servlet.jar
+
+$JAVADIR/junit4.jar libs.junit4/external platform/modules/ext junit-4.10.jar
+$JAVADIR/hamcrest-core.jar libs.junit4/external platform/modules/ext hamcrest-core.jar
diff --git a/debian/orig-tar.sh b/debian/orig-tar.sh
index 6109f5c..cd37f87 100755
--- a/debian/orig-tar.sh
+++ b/debian/orig-tar.sh
@@ -3,40 +3,37 @@
 VERSION=$2
 FILE=$3
 
-# The file isn't the real file. And it's pretty much impossible to
-# figure out the actual download URL without using a browser with
-# javascript enabled. If we're asked for the current version then we
-# can go and download that, otherwise, unless we're given a zip file,
-# we'll tell the user they'll have to get it themselves.
-
 FILENAME=`basename $FILE`
 BASE=`basename $FILE .zip`
 DIR=`dirname $FILE`
 
-if [ "x$VERSION" = "x7.0" ] && [ "x$BASE.zip" != "x$FILENAME" ]
+if [ "x$BASE.zip" != "x$FILENAME" ]
 then
-    # it's not a zip, but we know where to download this
-    echo "Downloading real release file..."
+# The file isn't the real file, but we can use it to find the real
+# file and download it.
+    SITE="http://dlc.sun.com.edgesuite.net/netbeans/$VERSION/final/zip/"
+    DL_FILE=`perl -ne 'if(/HREF="(netbeans-[0-9.]+-\d+-platform-src.zip)"/) {print $1."\n" }' $FILE | tail -n 1`
     rm -f $FILE
-    wget -O "$DIR/libnb-platform-java_7.0.zip" "http://download.netbeans.org/netbeans/7.0/final/zip/netbeans-7.0-201104080000-platform-src.zip"
-    BASE="libnb-platform-java_7.0"
-    FILE="$DIR/$BASE.zip"
-elif [ "x$BASE.zip" != "x$FILENAME" ]
-then
-    # if not a zip file then we alert the user and quit
-    echo "This script can't download version $VERSION of netbeans automatically."
-    echo "Visit http://netbeans.org/downloads/ and retrieve the zip file, then "
-    echo "run orig-tar.sh --upstream-version $VERSION <path_to_zip_file>"
-    exit
+    FILE="$DIR/$DL_FILE"
+    
+    if [ ! -e $FILE ]
+    then
+	echo "Downloading real file $DL_FILE from $SITE"
+	wget -O "$FILE" "$SITE/$DL_FILE"
+    fi
+
 fi
 
-TAR=../libnb-platform-java_$VERSION+dfsg1.orig.tar.gz
+TARFILE=../libnb-platform18-java_$VERSION+dfsg1.orig.tar.gz
 # Resolve symbolic links
 FILE=`readlink -f $FILE`
+BASE="libnb-platform-java-$VERSION"
 
+echo "Extracting zip file..."
 mkdir $BASE
+unzip -q -d $BASE $FILE
 
-unzip -d $BASE $FILE
+echo "Cleaning source code..."
 
 # Remove jar files - we'll use debian packaged jars from
 # /usr/share/java
@@ -67,16 +64,76 @@ find $BASE/ -name "*.class" -type f -execdir rm \{\} \;
 
 # Remove some files where it's not clear how they were generated, and
 # which we (hopefully) don't need
-rm -f $BASE/jellytools.platform/test/qa-functional/data/SampleProject/src/sample1/unrecognized
-rm -f $BASE/jellytools.platform/test/qa-functional/data/SampleProject/src/sample1/url.url
+find $BASE/ -name "url.url" -type f -execdir rm \{\} \;
+find $BASE/ -name "unrecognized" -type f -execdir rm \{\} \;
 
 # Remove all the .nbm files. They are only used in unit testing, and
 # we'd ideally need to generate them as part of the build.
 find $BASE/ -name "*.nbm" -type f -execdir rm \{\} \;
 
+# Remove object files
+find $BASE/ -name "*.o" -type f -execdir rm \{\} \;
+
+# Remove .data files
+find $BASE/ -name "*.data" -type f -execdir rm \{\} \;
+
+# Remove data files
+find $BASE/ -name "data" -type f -execdir rm \{\} \;
+
+# Remove .bin files
+find $BASE/ -name "*.bin" -type f -execdir rm \{\} \;
+
+# Remove .cfs files
+find $BASE/ -name "*.cfs" -type f -execdir rm \{\} \;
+
+# Remove .gen files
+find $BASE/ -name "*.gen" -type f -execdir rm \{\} \;
+
+# Remove .gen files
+find $BASE/ -name "segments_2" -type f -execdir rm \{\} \;
+
+# Remove some ELF binaries
+rm -rf $BASE/dlight.tools/release/tools/*
+
+find $BASE/ -name "*.sl" -type f -execdir rm \{\} \;
+find $BASE/ -name "*.jnilib" -type f -execdir rm \{\} \;
+
+# Remove framemaker files and the pdf they build, since we can't edit them
+# with software in Debian.
+rm -f $BASE/usersguide/tutorials/j2ee-tut/fm/*
+
+# remove .gz files. We could re-create at least some if we need, but they're only
+# used in unit tests.
+find $BASE/ -name "*.gz" -type f -execdir rm \{\} \;
+
+# Remove .warContent files since they are binary files we can't build.
+find $BASE/ -name "*.warContent" -type f -execdir rm \{\} \;
+
+# Remove .jts media files as we don't appear to have a codec for them
+find $BASE/ -name "*.jts" -type f -execdir rm \{\} \;
+
+# Remove .pdf media files. We can recreate the ones in ide.branding
+find $BASE/ -name "*.pdf" -type f -execdir rm \{\} \;
+
+# Remove binary .out files.
+find $BASE/ -name "*.out" -type f -execdir rm \{\} \;
+
+# Remove zip files. We'll have to reproduce some.
+find $BASE/ -name "*.zip" -type f -execdir rm \{\} \;
+find $BASE/ -name "*.cap" -type f -execdir rm \{\} \;
+find $BASE/ -name "*.eap" -type f -execdir rm \{\} \;
+find $BASE/ -name "*.war" -type f -execdir rm \{\} \;
+find $BASE/ -name "*.ear" -type f -execdir rm \{\} \;
+
+
+# Remove bits of a version control repository
+rm -rf $BASE/versioning.util/test/unit/data/
+
+
 # Make our ".orig.tar.gz"
-tar -czf $TAR $BASE
+tar -czf $TARFILE $BASE
 
 # Remove our unpack directory
 rm -rf $BASE
 
+echo "Done."
diff --git a/debian/patches/netbeans-platform~classfile-version.patch b/debian/patches/netbeans-platform~classfile-version.patch
new file mode 100644
index 0000000..0a47b1e
--- /dev/null
+++ b/debian/patches/netbeans-platform~classfile-version.patch
@@ -0,0 +1,13 @@
+Where possible, use version 1.6 for our classfiles.
+
+--- a/openide.util/nbproject/project.properties
++++ b/openide.util/nbproject/project.properties
+@@ -42,7 +42,7 @@
+ 
+ javac.compilerargs=-Xlint -Xlint:-serial -Xlint:-processing
+ javac.source=1.6
+-javac.target=1.7
++javac.target=1.6
+ module.jar.dir=lib
+ 
+ 
diff --git a/debian/patches/netbeans-platform~empty-binaries-list.patch b/debian/patches/netbeans-platform~empty-binaries-list.patch
new file mode 100644
index 0000000..24b632a
--- /dev/null
+++ b/debian/patches/netbeans-platform~empty-binaries-list.patch
@@ -0,0 +1,67 @@
+Empty all the binaries-list files so nothing gets downloaded.
+
+--- a/apisupport.harness/external/binaries-list
++++ /dev/null
+@@ -1,4 +0,0 @@
+-D4EF66C1CC8A5B3C97E0CC7C210227AAEC1F1086 jsearch-2.0_05.jar
+-A806D99716C5E9441BFD8B401176FDDEFC673022 bindex-2.2.jar
+-20D826CC819A5A969CF3F7204E2E26CB6263EC43 jnlp-servlet.jar
+-
+--- a/javahelp/external/binaries-list
++++ /dev/null
+@@ -1 +0,0 @@
+-CA70822C47A67FC3A11670270567C2D01566DAE1 jhall-2.0_05.jar
+--- a/o.jdesktop.layout/external/binaries-list
++++ /dev/null
+@@ -1,3 +0,0 @@
+-1C7FE319052EF49126CF07D0DB6953CB7007229E swing-layout-1.0.4-doc.zip
+-69D72835E165439CF7816EFDA65868FD4E0C6E2A swing-layout-1.0.4.jar
+-D2503D2217868ABAE1A5E7480A9CCA1DB3522464 swing-layout-1.0.4-src.zip
+--- a/libs.felix/external/binaries-list
++++ /dev/null
+@@ -1,2 +0,0 @@
+-14F630EDF137F54188636B5139432986D5FB19B7 felix-4.0.2.jar
+-
+--- a/libs.junit4/external/binaries-list
++++ /dev/null
+@@ -1 +0,0 @@
+-E4F1766CE7404A08F45D859FB9C226FC9E41A861 junit-4.10.jar
+--- a/nbbuild/external/binaries-list
++++ b/nbbuild/external/binaries-list
+@@ -1,2 +1 @@
+-EAE299D9D3B1C6E2F8B030DCD3BCF0B05517FBA9 apitest.jar
+ 
+--- a/libs.jna/external/binaries-list
++++ /dev/null
+@@ -1 +0,0 @@
+-F4E1672A22B63E37A5D929603CB67E093E3729D5 jna-3.4.0.jar
+--- a/netbinox/external/binaries-list
++++ /dev/null
+@@ -1 +0,0 @@
+-B54E470D47DF378B9DCE9423F919CCF4C7A60138 org.eclipse.osgi_3.8.0.v20120529-1548.jar
+\ No newline at end of file
+--- a/jemmy/external/binaries-list
++++ /dev/null
+@@ -1,3 +0,0 @@
+-D325D3913CBC0F9A8D73A466FABB98EDEEC014AB jemmy-2.3.1.1.jar
+-D06C8980C9025183C044202419EA29E69FBD4B99 jemmy-2.3.1.1-doc.zip
+-49197106637CCA8C337AF16CC01BB5D9DEC7E179 jemmy-2.3.1.1-src.zip
+\ No newline at end of file
+--- a/libs.osgi/external/binaries-list
++++ /dev/null
+@@ -1,2 +0,0 @@
+-972E6455724DC6ADB1C1912F53B5E3D7DF20C5FD osgi.cmpn-4.2.jar
+-2F2FBFF3FB80F91B159A7FA9F0C42A894BB8BCC5 osgi.core-5.0.0.jar
+--- a/libs.antlr3.devel/external/binaries-list
++++ /dev/null
+@@ -1 +0,0 @@
+-5CAB59D859CAA6598E28131D30DD2E89806DB57F antlr-3.4.jar
+--- a/libs.jna.platform/external/binaries-list
++++ /dev/null
+@@ -1 +0,0 @@
+-4B58AF397FD3156D700AD5016BCDD307A7A62EF5 platform-3.4.0.jar
+--- a/libs.testng/external/binaries-list
++++ /dev/null
+@@ -1,2 +0,0 @@
+-AC97B566699146713B3CF0ABC226B5C08EF7CF33 testng-6.8.1-dist.jar
+-AF022CBCACD8CBFCF946816441D1E7568D817745 testng-6.8.1-javadoc.zip
diff --git a/debian/patches/netbeans-platform~include-extras.patch b/debian/patches/netbeans-platform~include-extras.patch
index 953012a..266fb20 100644
--- a/debian/patches/netbeans-platform~include-extras.patch
+++ b/debian/patches/netbeans-platform~include-extras.patch
@@ -1,53 +1,48 @@
 Include the extra modules libs.junit4 and libs.antlr3.devel.
 
-Index: libnb-platform-java-7.0+dfsg1/libs.junit4/nbproject/project.xml
-===================================================================
---- libnb-platform-java-7.0+dfsg1.orig/libs.junit4/nbproject/project.xml	2011-06-13 21:39:34.377759015 +0100
-+++ libnb-platform-java-7.0+dfsg1/libs.junit4/nbproject/project.xml	2011-06-13 21:40:18.366926695 +0100
-@@ -63,6 +63,10 @@
-                 <package>org.junit.runners</package>
+--- a/libs.junit4/nbproject/project.xml
++++ b/libs.junit4/nbproject/project.xml
+@@ -64,6 +64,10 @@
+                 <package>org.junit.runners.model</package>
              </public-packages>
              <class-path-extension>
 +                <runtime-relative-path>ext/hamcrest-core.jar</runtime-relative-path>
 +                <binary-origin>external/hamcrest-core.jar</binary-origin>
 +            </class-path-extension>
 +            <class-path-extension>
-                 <runtime-relative-path>ext/junit-4.8.2.jar</runtime-relative-path>
-                 <binary-origin>external/junit-4.8.2.jar</binary-origin>
+                 <runtime-relative-path>ext/junit-4.10.jar</runtime-relative-path>
+                 <binary-origin>external/junit-4.10.jar</binary-origin>
              </class-path-extension>
-Index: libnb-platform-java-7.0+dfsg1/libs.junit4/nbproject/project.properties
-===================================================================
---- libnb-platform-java-7.0+dfsg1.orig/libs.junit4/nbproject/project.properties	2011-06-13 21:39:34.357759030 +0100
-+++ libnb-platform-java-7.0+dfsg1/libs.junit4/nbproject/project.properties	2011-06-13 21:40:18.366926695 +0100
-@@ -42,6 +42,7 @@
- 
- is.autoload=true
- release.external/junit-4.8.2.jar=modules/ext/junit-4.8.2.jar
-+release.external/hamcrest-core.jar=modules/ext/hamcrest-core.jar
- nbm.target.cluster=platform
- sigtest.skip.check=true
- 
-Index: libnb-platform-java-7.0+dfsg1/nbbuild/cluster.properties
-===================================================================
---- libnb-platform-java-7.0+dfsg1.orig/nbbuild/cluster.properties	2011-06-13 22:38:44.426926832 +0100
-+++ libnb-platform-java-7.0+dfsg1/nbbuild/cluster.properties	2011-06-13 23:03:50.246926496 +0100
-@@ -167,9 +167,11 @@
-         javahelp,\
-         keyring,\
+--- a/nbbuild/cluster.properties
++++ b/nbbuild/cluster.properties
+@@ -181,10 +181,12 @@
+         keyring.fallback,\
          keyring.impl,\
+         lib.uihandler,\
 +        libs.antlr3.devel,\
          libs.felix,\
          libs.jna,\
+         libs.jna.platform,\
          libs.jsr223,\
 +        libs.junit4,\
          libs.osgi,\
+         libs.testng,\
          masterfs,\
-         o.jdesktop.layout,\
-@@ -1044,7 +1046,6 @@
-         kenai.maven,\
+@@ -1021,7 +1023,6 @@
          kenai.ui,\
-         libs.jira,\
+         lib.cvsclient,\
+         libs.findbugs,\
 -        libs.junit4,\
-         libs.svnjavahlwin32,\
+         libs.oracle.cloud,\
          loadgenerator,\
-         mobility.proguard,\
+ 		maven.util,\
+--- a/libs.junit4/nbproject/project.properties
++++ b/libs.junit4/nbproject/project.properties
+@@ -42,6 +42,7 @@
+ 
+ is.autoload=true
+ release.external/junit-4.10.jar=modules/ext/junit-4.10.jar
++release.external/hamcrest-core.jar=modules/ext/hamcrest-core.jar
+ nbm.target.cluster=platform
+ sigtest.skip.check=true
+ 
diff --git a/debian/patches/netbeans-platform~jemmy.patch b/debian/patches/netbeans-platform~jemmy.patch
new file mode 100644
index 0000000..0d7e384
--- /dev/null
+++ b/debian/patches/netbeans-platform~jemmy.patch
@@ -0,0 +1,14 @@
+We don't include zips of the jemmy doc or src.
+
+--- a/jemmy/nbproject/project.properties
++++ b/jemmy/nbproject/project.properties
+@@ -43,7 +43,7 @@
+ javac.compilerargs=-Xlint -Xlint:-serial
+ javac.source=1.6
+ release.external/jemmy-2.3.1.1.jar=modules/ext/jemmy-2.3.1.1.jar
+-release.external/jemmy-2.3.1.1-doc.zip=docs/jemmy-2.3.1.1-doc.zip
+-release.external/jemmy-2.3.1.1-src.zip=docs/jemmy-2.3.1.1-src.zip
++#release.external/jemmy-2.3.1.1-doc.zip=docs/jemmy-2.3.1.1-doc.zip
++#release.external/jemmy-2.3.1.1-src.zip=docs/jemmy-2.3.1.1-src.zip
+ sigtest.gen.fail.on.error=false
+ 
diff --git a/debian/patches/netbeans-platform~launcher.patch b/debian/patches/netbeans-platform~launcher.patch
index b95d7ec..64f10ea 100644
--- a/debian/patches/netbeans-platform~launcher.patch
+++ b/debian/patches/netbeans-platform~launcher.patch
@@ -1,19 +1,8 @@
 Include the jni path /usr/lib/jni on the library search path.
 
-Index: libnb-platform-java-7.0+dfsg1/o.n.bootstrap/launcher/unix/nbexec
-===================================================================
---- libnb-platform-java-7.0+dfsg1.orig/o.n.bootstrap/launcher/unix/nbexec	2011-04-08 00:33:00.000000000 +0100
-+++ libnb-platform-java-7.0+dfsg1/o.n.bootstrap/launcher/unix/nbexec	2011-06-12 21:16:28.031368069 +0100
-@@ -180,7 +180,7 @@
- fi
- 
- # if heap dump on OOME is supported enable it
--if "${jdkhome}/bin/java" -XX:+HeapDumpOnOutOfMemoryError > /dev/null 2>&1 ; then
-+if "${jdkhome}/bin/java" -XX:+HeapDumpOnOutOfMemoryError &> /dev/null 2>&1 ; then
-    jargs="$jargs -XX:+HeapDumpOnOutOfMemoryError"
-    if echo $jargs | grep -v -- "-XX:HeapDumpPath=" > /dev/null ; then
-       jargs="$jargs -XX:HeapDumpPath=\"${userdir}/var/log/heapdump.hprof\""
-@@ -541,7 +541,7 @@
+--- a/o.n.bootstrap/launcher/unix/nbexec
++++ b/o.n.bootstrap/launcher/unix/nbexec
+@@ -454,7 +454,7 @@
      #
      delete_new_clusters_file
      rm -f "${restart_file}"
diff --git a/debian/patches/netbeans-platform~nbi.patch b/debian/patches/netbeans-platform~nbi.patch
index b219563..32deddb 100644
--- a/debian/patches/netbeans-platform~nbi.patch
+++ b/debian/patches/netbeans-platform~nbi.patch
@@ -1,10 +1,8 @@
 Don't build the Netbeans Installer modules.
 
-Index: libnb-platform-java-7.0+dfsg1/nbbuild/cluster.properties
-===================================================================
---- libnb-platform-java-7.0+dfsg1.orig/nbbuild/cluster.properties	2011-06-14 23:47:49.198990461 +0100
-+++ libnb-platform-java-7.0+dfsg1/nbbuild/cluster.properties	2011-06-14 23:47:49.999823035 +0100
-@@ -763,8 +763,6 @@
+--- a/nbbuild/cluster.properties
++++ b/nbbuild/cluster.properties
+@@ -758,8 +758,6 @@
          apisupport.harness,\
          jellytools.platform,\
          jemmy,\
@@ -13,4 +11,3 @@ Index: libnb-platform-java-7.0+dfsg1/nbbuild/cluster.properties
          nbjunit,\
          o.n.insane
  
-
diff --git a/debian/patches/netbeans-platform~nodownloads.patch b/debian/patches/netbeans-platform~nodownloads.patch
deleted file mode 100644
index 74b12fe..0000000
--- a/debian/patches/netbeans-platform~nodownloads.patch
+++ /dev/null
@@ -1,77 +0,0 @@
-Don't try and download jar files from the netbeans website. We want to use those that are 
-already packaged in Debian instead.
-
-Index: platform/o.jdesktop.layout/external/binaries-list
-===================================================================
---- platform.orig/o.jdesktop.layout/external/binaries-list	2011-05-22 19:45:34.183504401 +0100
-+++ /dev/null	1970-01-01 00:00:00.000000000 +0000
-@@ -1,3 +0,0 @@
--1C7FE319052EF49126CF07D0DB6953CB7007229E swing-layout-1.0.4-doc.zip
--69D72835E165439CF7816EFDA65868FD4E0C6E2A swing-layout-1.0.4.jar
--D2503D2217868ABAE1A5E7480A9CCA1DB3522464 swing-layout-1.0.4-src.zip
-Index: platform/libs.jna/external/binaries-list
-===================================================================
---- platform.orig/libs.jna/external/binaries-list	2011-05-22 19:45:38.754338310 +0100
-+++ /dev/null	1970-01-01 00:00:00.000000000 +0000
-@@ -1 +0,0 @@
--4F25AA7292F70E721A9B96A6ED49365BA6E03EAB jna-3.2.7.jar
-Index: platform/apisupport.harness/external/binaries-list
-===================================================================
---- platform.orig/apisupport.harness/external/binaries-list	2011-05-22 19:45:41.736004847 +0100
-+++ /dev/null	1970-01-01 00:00:00.000000000 +0000
-@@ -1,2 +0,0 @@
--D4EF66C1CC8A5B3C97E0CC7C210227AAEC1F1086 jsearch-2.0_05.jar
--A806D99716C5E9441BFD8B401176FDDEFC673022 bindex-2.2.jar
-Index: platform/javahelp/external/binaries-list
-===================================================================
---- platform.orig/javahelp/external/binaries-list	2011-05-22 19:45:44.513504895 +0100
-+++ /dev/null	1970-01-01 00:00:00.000000000 +0000
-@@ -1 +0,0 @@
--CA70822C47A67FC3A11670270567C2D01566DAE1 jhall-2.0_05.jar
-Index: platform/libs.osgi/external/binaries-list
-===================================================================
---- platform.orig/libs.osgi/external/binaries-list	2011-05-22 19:45:47.933510917 +0100
-+++ /dev/null	1970-01-01 00:00:00.000000000 +0000
-@@ -1,2 +0,0 @@
--986195A7E31034EE73F7A896A36B24169692F142 osgi.core-4.2.jar
--972E6455724DC6ADB1C1912F53B5E3D7DF20C5FD osgi.cmpn-4.2.jar
-Index: platform/libs.felix/external/binaries-list
-===================================================================
---- platform.orig/libs.felix/external/binaries-list	2011-05-22 19:45:51.025171080 +0100
-+++ /dev/null	1970-01-01 00:00:00.000000000 +0000
-@@ -1,2 +0,0 @@
--08676C719D33D26DF4F3988E210A04D7F11183B7 felix-2.0.3.jar
--BD5615C6A15497B60A0AAA9A04D4F05E2BC42D07 felix-main-2.0.2.jar
-Index: platform/libs.junit4/external/binaries-list
-===================================================================
---- platform.orig/libs.junit4/external/binaries-list	2011-05-22 19:45:54.016006455 +0100
-+++ /dev/null	1970-01-01 00:00:00.000000000 +0000
-@@ -1 +0,0 @@
--C94F54227B08100974C36170DCB53329435FE5AD junit-4.8.2.jar
-\ No newline at end of file
-Index: platform/core.nativeaccess/external/binaries-list
-===================================================================
---- platform.orig/core.nativeaccess/external/binaries-list	2011-05-22 19:45:56.875171251 +0100
-+++ /dev/null	1970-01-01 00:00:00.000000000 +0000
-@@ -1 +0,0 @@
--AF109BEA46056EF1D09172A96E968ADFA8CE74F1 platform-3.2.7.jar
-Index: platform/jemmy/external/binaries-list
-===================================================================
---- platform.orig/jemmy/external/binaries-list	2011-05-22 19:46:00.094337657 +0100
-+++ /dev/null	1970-01-01 00:00:00.000000000 +0000
-@@ -1 +0,0 @@
--418FC62C8A6EF5311987B01FE389B1F88EFDDCA2 jemmy-2.3.0.0.jar
-Index: platform/nbbuild/external/binaries-list
-===================================================================
---- platform.orig/nbbuild/external/binaries-list	2011-05-22 19:46:02.803504511 +0100
-+++ /dev/null	1970-01-01 00:00:00.000000000 +0000
-@@ -1,2 +0,0 @@
--E160D64FA4680FD5C581A0F5AB516D88FB09AD47 apitest.jar
--
-Index: platform/libs.antlr3.devel/external/binaries-list
-===================================================================
---- platform.orig/libs.antlr3.devel/external/binaries-list	2011-05-22 19:46:05.415171258 +0100
-+++ /dev/null	1970-01-01 00:00:00.000000000 +0000
-@@ -1,2 +0,0 @@
--1E18576780EB117E410E7A262453A99B01E55B02 antlr-3.1.3.jar
--6FE2E3BB57DAEBD1555494818909F9664376DD6C stringtemplate-3.2.jar
diff --git a/debian/patches/netbeans-platform~nojnabinaries.patch b/debian/patches/netbeans-platform~nojnabinaries.patch
index fd323d5..6601888 100644
--- a/debian/patches/netbeans-platform~nojnabinaries.patch
+++ b/debian/patches/netbeans-platform~nojnabinaries.patch
@@ -1,21 +1,41 @@
 We don't need to install any JNA binaries, since they're already installed.
 
-Index: platform/libs.jna/nbproject/project.properties
-===================================================================
---- platform.orig/libs.jna/nbproject/project.properties	2011-05-22 19:51:45.514338125 +0100
-+++ platform/libs.jna/nbproject/project.properties	2011-05-22 21:56:53.854338968 +0100
-@@ -41,9 +41,9 @@
- # made subject to such option by the copyright holder.
- 
- release.external/jna-3.2.7.jar=modules/ext/jna-3.2.7.jar
--release.external/jna-3.2.7.jar!/com/sun/jna/darwin/libjnidispatch.jnilib=modules/lib/libjnidispatch.jnilib
--release.external/jna-3.2.7.jar!/com/sun/jna/linux-amd64/libjnidispatch.so=modules/lib/amd64/Linux/libjnidispatch.so
--release.external/jna-3.2.7.jar!/com/sun/jna/linux-i386/libjnidispatch.so=modules/lib/i386/Linux/libjnidispatch.so
--release.external/jna-3.2.7.jar!/com/sun/jna/win32-amd64/jnidispatch.dll=modules/lib/amd64/jnidispatch.dll
--release.external/jna-3.2.7.jar!/com/sun/jna/win32-x86/jnidispatch.dll=modules/lib/x86/jnidispatch.dll
-+#release.external/jna-3.2.7.jar!/com/sun/jna/darwin/libjnidispatch.jnilib=modules/lib/libjnidispatch.jnilib
-+#release.external/jna-3.2.7.jar!/com/sun/jna/linux-amd64/libjnidispatch.so=modules/lib/amd64/Linux/libjnidispatch.so
-+#release.external/jna-3.2.7.jar!/com/sun/jna/linux-i386/libjnidispatch.so=modules/lib/i386/Linux/libjnidispatch.so
-+#release.external/jna-3.2.7.jar!/com/sun/jna/win32-amd64/jnidispatch.dll=modules/lib/amd64/jnidispatch.dll
-+#release.external/jna-3.2.7.jar!/com/sun/jna/win32-x86/jnidispatch.dll=modules/lib/x86/jnidispatch.dll
- jnlp.indirect.files=modules/lib/**/*jnidispatch*
+--- a/libs.jna/nbproject/project.properties
++++ b/libs.jna/nbproject/project.properties
+@@ -43,15 +43,15 @@
+ javac.source=1.6
+ release.external/jna-3.4.0.jar=modules/ext/jna-3.4.0.jar
+ # Do not forget to rename native libs being extracted from the JAR when upgrading the JNA library, and patch org.netbeans.libs.jna.Installer as well.
+-release.external/jna-3.4.0.jar!/com/sun/jna/darwin/libjnidispatch.jnilib=modules/lib/libjnidispatch-340.jnilib
+-release.external/jna-3.4.0.jar!/com/sun/jna/linux-amd64/libjnidispatch.so=modules/lib/amd64/linux/libjnidispatch-340.so
+-release.external/jna-3.4.0.jar!/com/sun/jna/linux-i386/libjnidispatch.so=modules/lib/i386/linux/libjnidispatch-340.so
+-release.external/jna-3.4.0.jar!/com/sun/jna/win32-amd64/jnidispatch.dll=modules/lib/amd64/jnidispatch-340.dll
+-release.external/jna-3.4.0.jar!/com/sun/jna/win32-x86/jnidispatch.dll=modules/lib/x86/jnidispatch-340.dll
+-jnlp.verify.excludes=\
+-    modules/lib/amd64/jnidispatch-340.dll,\
+-    modules/lib/amd64/linux/libjnidispatch-340.so,\
+-    modules/lib/i386/linux/libjnidispatch-340.so,\
+-    modules/lib/x86/jnidispatch-340.dll,\
+-    modules/lib/libjnidispatch-340.jnilib
++#release.external/jna-3.4.0.jar!/com/sun/jna/darwin/libjnidispatch.jnilib=modules/lib/libjnidispatch-340.jnilib
++#release.external/jna-3.4.0.jar!/com/sun/jna/linux-amd64/libjnidispatch.so=modules/lib/amd64/linux/libjnidispatch-340.so
++#release.external/jna-3.4.0.jar!/com/sun/jna/linux-i386/libjnidispatch.so=modules/lib/i386/linux/libjnidispatch-340.so
++#release.external/jna-3.4.0.jar!/com/sun/jna/win32-amd64/jnidispatch.dll=modules/lib/amd64/jnidispatch-340.dll
++#release.external/jna-3.4.0.jar!/com/sun/jna/win32-x86/jnidispatch.dll=modules/lib/x86/jnidispatch-340.dll
++#jnlp.verify.excludes=\
++#    modules/lib/amd64/jnidispatch-340.dll,\
++#    modules/lib/amd64/linux/libjnidispatch-340.so,\
++#    modules/lib/i386/linux/libjnidispatch-340.so,\
++#    modules/lib/x86/jnidispatch-340.dll,\
++#    modules/lib/libjnidispatch-340.jnilib
+ sigtest.gen.fail.on.error=false
+--- a/libs.jna/src/org/netbeans/libs/jna/Installer.java
++++ b/libs.jna/src/org/netbeans/libs/jna/Installer.java
+@@ -50,6 +50,6 @@
+     public void validate() {
+         super.validate();
+         //#211655
+-        System.setProperty( "jna.boot.library.name", "jnidispatch-340" ); //NOI18N
++        System.setProperty( "jna.boot.library.name", "jnidispatch" ); //NOI18N
+     }
+ }
diff --git a/debian/patches/netbeans-platform~properties.patch b/debian/patches/netbeans-platform~properties.patch
index 2b5fec1..1d7c4f4 100644
--- a/debian/patches/netbeans-platform~properties.patch
+++ b/debian/patches/netbeans-platform~properties.patch
@@ -1,8 +1,7 @@
 We don't include the swing layout source zip.
 
-diff -Nur netbeans-platform-6.9/o.jdesktop.layout/nbproject/project.properties netbeans-platform-6.9.new/o.jdesktop.layout/nbproject/project.properties
---- netbeans-platform-6.9/o.jdesktop.layout/nbproject/project.properties	2010-05-31 20:58:16.000000000 +0400
-+++ netbeans-platform-6.9.new/o.jdesktop.layout/nbproject/project.properties	2010-06-10 09:34:11.689150157 +0400
+--- a/o.jdesktop.layout/nbproject/project.properties
++++ b/o.jdesktop.layout/nbproject/project.properties
 @@ -42,6 +42,6 @@
  
  is.autoload=true
@@ -12,3 +11,14 @@ diff -Nur netbeans-platform-6.9/o.jdesktop.layout/nbproject/project.properties n
 +#release.external/swing-layout-1.0.4-doc.zip=docs/swing-layout-1.0.4-doc.zip
 +#release.external/swing-layout-1.0.4-src.zip=docs/swing-layout-1.0.4-src.zip
  jnlp.indirect.jars=docs/swing-layout-1.0.4-doc.zip, docs/swing-layout-1.0.4-src.zip
+--- a/libs.testng/nbproject/project.properties
++++ b/libs.testng/nbproject/project.properties
+@@ -42,7 +42,7 @@
+ 
+ is.autoload=true
+ release.external/testng-6.8.1-dist.jar=modules/ext/testng-6.8.1-dist.jar
+-release.external/testng-6.8.1-javadoc.zip=docs/testng-6.8.1-javadoc.zip
++#release.external/testng-6.8.1-javadoc.zip=docs/testng-6.8.1-javadoc.zip
+ sigtest.skip.check=true
+ sigtest.fail.on.error=false
+ jnlp.indirect.jars=\
diff --git a/debian/patches/netbeans-platform~suitebuild.patch b/debian/patches/netbeans-platform~suitebuild.patch
new file mode 100644
index 0000000..d9c6fbc
--- /dev/null
+++ b/debian/patches/netbeans-platform~suitebuild.patch
@@ -0,0 +1,14 @@
+Don't fail if we can't find the Windows exe launcher. This lets us build for older netbeans platforms where the
+package didn't contain Windows launchers.
+
+--- a/apisupport.harness/release/suite.xml
++++ b/apisupport.harness/release/suite.xml
+@@ -327,7 +327,7 @@
+         <condition property="app.exe.prefix" value="" else="pre7_">
+             <isset property="nbexec.dll.found"/>
+         </condition>
+-        <copy file="${harness.dir}/launchers/${app.exe.prefix}app.exe" tofile="${build.launcher.dir}/bin/${app.name}.exe" overwrite="true"/>
++        <copy file="${harness.dir}/launchers/${app.exe.prefix}app.exe" tofile="${build.launcher.dir}/bin/${app.name}.exe" failonerror="false" overwrite="true"/>
+         <copy file="${harness.dir}/launchers/${app.exe.prefix}app64.exe" tofile="${build.launcher.dir}/bin/${app.name}64.exe" failonerror="false" overwrite="true"/>
+         <copy file="${harness.dir}/launchers/${app.exe.prefix}app_w.exe" tofile="${build.launcher.dir}/bin/${app.name}_w.exe" failonerror="false" overwrite="true"/>
+ 
diff --git a/debian/patches/netbeans-platform~windowslauncher.patch b/debian/patches/netbeans-platform~windowslauncher.patch
index f667fb8..dbb4b7c 100644
--- a/debian/patches/netbeans-platform~windowslauncher.patch
+++ b/debian/patches/netbeans-platform~windowslauncher.patch
@@ -1,168 +1,341 @@
 Use mingw32 to build the windows launchers. These are useful if the Netbeans platform is used to build 
 another application on Debian which you want to be able to run on a Windows system.
 
-Index: libnb-platform-java-7.0+dfsg1/o.n.bootstrap/launcher/windows/Makefile
-===================================================================
---- libnb-platform-java-7.0+dfsg1.orig/o.n.bootstrap/launcher/windows/Makefile	2011-06-13 21:39:36.107758898 +0100
-+++ libnb-platform-java-7.0+dfsg1/o.n.bootstrap/launcher/windows/Makefile	2011-06-14 23:46:57.388989761 +0100
-@@ -34,7 +34,7 @@
+--- a/o.n.bootstrap/launcher/windows/Makefile
++++ b/o.n.bootstrap/launcher/windows/Makefile
+@@ -15,7 +15,7 @@
  MKDIR=mkdir
  CP=cp
  CCADMIN=CCadmin
 -RANLIB=ranlib
-+RANLIB=i586-mingw32msvc-ranlib
++RANLIB=i686-w64-mingw32-ranlib
  
- # build
- build: .build-post
-@@ -48,8 +48,8 @@
- 	cp nbexec.dll ../../../nbbuild/netbeans/platform/lib/
  
- nbexec.exe: nbexecexe.cpp nbexecloader.h utilsfuncs.cpp nbexec_exe.rc
+ 
+@@ -26,16 +26,12 @@
+ # Add your pre 'build' code here...
+ 
+ .build-post-nbexec: .build-impl nbexecexe.cpp nbexecloader.h utilsfuncs.cpp nbexec_exe.rc
 -	windres.exe -Ocoff nbexec_exe.rc nbexec_exe.res
--	g++ -s -mno-cygwin nbexecexe.cpp utilsfuncs.cpp nbexec_exe.res -o nbexec.exe
-+	i586-mingw32msvc-windres -Ocoff nbexec_exe.rc nbexec_exe.res
-+	i586-mingw32msvc-g++ -s -mno-cygwin nbexecexe.cpp utilsfuncs.cpp nbexec_exe.res -o nbexec.exe
+-	g++ -s -mno-cygwin -DNBEXEC_DLL=\"nbexec.dll\" nbexecexe.cpp utilsfuncs.cpp nbexec_exe.res -o nbexec.exe
+-	cp nbexec.exe ../../../nbbuild/netbeans/platform/lib/
+-	cp nbexec.dll ../../../nbbuild/netbeans/platform/lib/
++	i686-w64-mingw32-windres -Ocoff nbexec_exe.rc nbexec_exe.res
++	i686-w64-mingw32-g++ -s -DNBEXEC_DLL=\"nbexec.dll\" nbexecexe.cpp utilsfuncs.cpp nbexec_exe.res -o nbexec.exe
+ 	
+ .build-post-nbexec64: .build-impl nbexecexe.cpp nbexecloader.h utilsfuncs.cpp nbexec_exe.rc
+-	x86_64-w64-mingw32-windres.exe -Ocoff nbexec_exe.rc nbexec_exe64.res 
+-	x86_64-w64-mingw32-g++.exe -m64 -s -mno-cygwin -DNBEXEC_DLL=\"nbexec64.dll\" -static-libgcc -static-libstdc++ nbexecexe.cpp utilsfuncs.cpp nbexec_exe64.res -o nbexec64.exe 
+-	cp nbexec64.exe ../../../nbbuild/netbeans/platform/lib/
+-	cp nbexec64.dll ../../../nbbuild/netbeans/platform/lib/
++	x86_64-w64-mingw32-windres -Ocoff nbexec_exe.rc nbexec_exe64.res 
++	x86_64-w64-mingw32-g++ -m64 -s -DNBEXEC_DLL=\"nbexec64.dll\" -static-libgcc -static-libstdc++ nbexecexe.cpp utilsfuncs.cpp nbexec_exe64.res -o nbexec64.exe 
  
- # clean
- clean: .clean-post
-Index: libnb-platform-java-7.0+dfsg1/o.n.bootstrap/launcher/windows/nbproject/Makefile-nbexec.mk
-===================================================================
---- libnb-platform-java-7.0+dfsg1.orig/o.n.bootstrap/launcher/windows/nbproject/Makefile-nbexec.mk	2011-06-13 21:39:36.137760501 +0100
-+++ libnb-platform-java-7.0+dfsg1/o.n.bootstrap/launcher/windows/nbproject/Makefile-nbexec.mk	2011-06-14 23:47:19.998990498 +0100
-@@ -11,12 +11,12 @@
+ 
+ 
+@@ -46,7 +42,7 @@
+ # Add your pre 'clean' code here...
+ 
+ .clean-post-nbexec: .clean-impl
+-	rm -f nbexec_exe32.res nbexec32.exe
++	rm -f nbexec_exe.res nbexec.exe
+ 	
+ .clean-post-nbexec64: .clean-impl
+ 	rm -f nbexec_exe64.res nbexec64.exe
+--- a/apisupport.harness/windows-launcher-src/Makefile
++++ b/apisupport.harness/windows-launcher-src/Makefile
+@@ -17,7 +17,7 @@
  MKDIR=mkdir
  CP=cp
  CCADMIN=CCadmin
 -RANLIB=ranlib
--CC=gcc
--CCC=g++
--CXX=g++
-+RANLIB=i586-mingw32msvc-ranlib
-+CC=i586-mingw32msvc-gcc
-+CCC=i586-mingw32msvc-g++
-+CXX=i586-mingw32msvc-g++
- FC=
--AS=as
-+AS=i586-mingw32msvc-as
++RANLIB=i686-w64-mingw32-ranlib
+ 
+ 
+ 
+@@ -28,10 +28,10 @@
+ # Add your pre 'build' code here...
+ 
+ .build-pre-app.exe: app.rc
+-	windres -oapp.res -Ocoff app.rc
++	i686-w64-mingw32-windres -oapp.res -Ocoff app.rc
+ 
+ .build-pre-app64.exe: app.rc
+-	x86_64-w64-mingw32-windres.exe -oapp64.res -Ocoff app.rc
++	x86_64-w64-mingw32-windres -oapp64.res -Ocoff app.rc
+ 
+ .build-post: .build-impl
+ # Add your post 'build' code here...	
+@@ -40,6 +40,7 @@
+ 
+ # clean
+ clean: .clean-post
++	rm -f app.res app64.res
+ 
+ .clean-pre:
+ # Add your pre 'clean' code here...
+--- a/o.n.bootstrap/launcher/windows/jvmlauncher.h
++++ b/o.n.bootstrap/launcher/windows/jvmlauncher.h
+@@ -50,6 +50,18 @@
+ #include <windows.h>
+ #include <string>
+ #include <list>
++
++// Use the definitions below rather than the linux jdk ones
++#define _JAVASOFT_JNI_MD_H_
++// imports, exports, and calling conventions need to match those used in a dll
++#define JNIEXPORT __declspec(dllexport)
++#define JNIIMPORT __declspec(dllimport)
++#define JNICALL __stdcall
++// Correct types for the windows platform
++typedef long jint;
++typedef __int64 jlong;
++typedef signed char jbyte;
++
+ #include "jni.h"
+ #include "utilsfuncs.h"
+ 
+--- a/o.n.bootstrap/launcher/windows/nbproject/Makefile-nbexec.mk
++++ b/o.n.bootstrap/launcher/windows/nbproject/Makefile-nbexec.mk
+@@ -13,12 +13,12 @@
+ GREP=grep
+ NM=nm
+ CCADMIN=CCadmin
+-RANLIB=ranlib
+-CC=gcc.exe
+-CCC=g++.exe
+-CXX=g++.exe
+-FC=gfortran
+-AS=as.exe
++RANLIB=i686-w64-mingw32-ranlib
++CC=
++CCC=i686-w64-mingw32-g++
++CXX=i686-w64-mingw32-g++
++FC=
++AS=i686-w64-mingw32-as
  
  # Macros
  CND_PLATFORM=Cygwin-Windows
-@@ -65,22 +65,22 @@
- ${OBJECTDIR}/platformlauncher.o: nbproject/Makefile-${CND_CONF}.mk platformlauncher.cpp 
- 	${MKDIR} -p ${OBJECTDIR}
- 	${RM} $@.d
--	$(COMPILE.cc) -O2 -Wall -s -I/cygdrive/c/cygwin/usr/include/mingw -I/cygdrive/D/Program\ Files/Java/jdk1.6.0_22/include/win32 -I/cygdrive/D/Program\ Files/Java/jdk1.6.0_22/include -fPIC  -MMD -MP -MF $@.d -o ${OBJECTDIR}/platformlauncher.o platformlauncher.cpp
-+	$(COMPILE.cc) -O2 -Wall -s -I/usr/lib/jvm/default-java/include -fPIC  -MMD -MP -MF $@.d -o ${OBJECTDIR}/platformlauncher.o platformlauncher.cpp
+@@ -46,8 +46,8 @@
+ CFLAGS=
  
- ${OBJECTDIR}/nbexec.o: nbproject/Makefile-${CND_CONF}.mk nbexec.cpp 
+ # CC Compiler Flags
+-CCFLAGS=-m32 -mno-cygwin
+-CXXFLAGS=-m32 -mno-cygwin
++CCFLAGS=-m32
++CXXFLAGS=-m32
+ 
+ # Fortran Compiler Flags
+ FFLAGS=
+@@ -65,12 +65,12 @@
+ nbexec.dll: ${OBJECTDIR}/nbexec.res
+ 
+ nbexec.dll: ${OBJECTFILES}
+-	${LINK.cc} -mno-cygwin -shared -o nbexec.dll ${OBJECTFILES} ${LDLIBSOPTIONS} 
++	${LINK.cc} -shared -o nbexec.dll ${OBJECTFILES} ${LDLIBSOPTIONS} 
+ 
+ ${OBJECTDIR}/jvmlauncher.o: jvmlauncher.cpp 
  	${MKDIR} -p ${OBJECTDIR}
  	${RM} $@.d
--	$(COMPILE.cc) -O2 -Wall -s -I/cygdrive/c/cygwin/usr/include/mingw -I/cygdrive/D/Program\ Files/Java/jdk1.6.0_22/include/win32 -I/cygdrive/D/Program\ Files/Java/jdk1.6.0_22/include -fPIC  -MMD -MP -MF $@.d -o ${OBJECTDIR}/nbexec.o nbexec.cpp
-+	$(COMPILE.cc) -O2 -Wall -s -I/usr/lib/jvm/default-java/include -fPIC  -MMD -MP -MF $@.d -o ${OBJECTDIR}/nbexec.o nbexec.cpp
+-	$(COMPILE.cc) -O2 -s -DNBEXEC_DLL=\"nbexec.dll\" -I/cygdrive/C/Program\ Files/Java/jdk1.7.0_17/include -I/cygdrive/C/Program\ Files/Java/jdk1.7.0_17/include/win32  -MMD -MP -MF $@.d -o ${OBJECTDIR}/jvmlauncher.o jvmlauncher.cpp
++	$(COMPILE.cc) -O2 -s -DNBEXEC_DLL=\"nbexec.dll\" -I/usr/lib/jvm/default-java/include -MMD -MP -MF $@.d -o ${OBJECTDIR}/jvmlauncher.o jvmlauncher.cpp
  
- ${OBJECTDIR}/nbexec.res: nbproject/Makefile-${CND_CONF}.mk nbexec.rc version.h
+ : nbexec_exe.rc 
+ 	@echo 
+@@ -79,27 +79,27 @@
+ ${OBJECTDIR}/nbexec.res: nbexec.rc version.h
  	${MKDIR} -p ${OBJECTDIR}
  	@echo Compiling Resource files...
 -	windres.exe -Ocoff nbexec.rc ${OBJECTDIR}/nbexec.res
-+	i586-mingw32msvc-windres -Ocoff nbexec.rc ${OBJECTDIR}/nbexec.res
++	i686-w64-mingw32-windres -Ocoff nbexec.rc ${OBJECTDIR}/nbexec.res
  
- ${OBJECTDIR}/nbexecexe.o: nbproject/Makefile-${CND_CONF}.mk nbexecexe.cpp 
+ ${OBJECTDIR}/platformlauncher.o: platformlauncher.cpp 
  	${MKDIR} -p ${OBJECTDIR}
  	${RM} $@.d
--	$(COMPILE.cc) -O2 -Wall -s -I/cygdrive/c/cygwin/usr/include/mingw -I/cygdrive/D/Program\ Files/Java/jdk1.6.0_22/include/win32 -I/cygdrive/D/Program\ Files/Java/jdk1.6.0_22/include -fPIC  -MMD -MP -MF $@.d -o ${OBJECTDIR}/nbexecexe.o nbexecexe.cpp
-+	$(COMPILE.cc) -O2 -Wall -s -I/usr/lib/jvm/default-java/include -fPIC  -MMD -MP -MF $@.d -o ${OBJECTDIR}/nbexecexe.o nbexecexe.cpp
+-	$(COMPILE.cc) -O2 -s -DNBEXEC_DLL=\"nbexec.dll\" -I/cygdrive/C/Program\ Files/Java/jdk1.7.0_17/include -I/cygdrive/C/Program\ Files/Java/jdk1.7.0_17/include/win32  -MMD -MP -MF $@.d -o ${OBJECTDIR}/platformlauncher.o platformlauncher.cpp
++	$(COMPILE.cc) -O2 -s -DNBEXEC_DLL=\"nbexec.dll\" -I/usr/lib/jvm/default-java/include -MMD -MP -MF $@.d -o ${OBJECTDIR}/platformlauncher.o platformlauncher.cpp
  
- : nbproject/Makefile-${CND_CONF}.mk nbexec_exe.rc 
- 	@echo 
-@@ -89,12 +89,12 @@
- ${OBJECTDIR}/jvmlauncher.o: nbproject/Makefile-${CND_CONF}.mk jvmlauncher.cpp 
+ ${OBJECTDIR}/nbexec.o: nbexec.cpp 
+ 	${MKDIR} -p ${OBJECTDIR}
+ 	${RM} $@.d
+-	$(COMPILE.cc) -O2 -s -DNBEXEC_DLL=\"nbexec.dll\" -I/cygdrive/C/Program\ Files/Java/jdk1.7.0_17/include -I/cygdrive/C/Program\ Files/Java/jdk1.7.0_17/include/win32  -MMD -MP -MF $@.d -o ${OBJECTDIR}/nbexec.o nbexec.cpp
++	$(COMPILE.cc) -O2 -s -DNBEXEC_DLL=\"nbexec.dll\" -I/usr/lib/jvm/default-java/include -MMD -MP -MF $@.d -o ${OBJECTDIR}/nbexec.o nbexec.cpp
+ 
+ ${OBJECTDIR}/utilsfuncs.o: utilsfuncs.cpp 
  	${MKDIR} -p ${OBJECTDIR}
  	${RM} $@.d
--	$(COMPILE.cc) -O2 -Wall -s -I/cygdrive/c/cygwin/usr/include/mingw -I/cygdrive/D/Program\ Files/Java/jdk1.6.0_22/include/win32 -I/cygdrive/D/Program\ Files/Java/jdk1.6.0_22/include -fPIC  -MMD -MP -MF $@.d -o ${OBJECTDIR}/jvmlauncher.o jvmlauncher.cpp
-+	$(COMPILE.cc) -O2 -Wall -s -I/usr/lib/jvm/default-java/include -fPIC  -MMD -MP -MF $@.d -o ${OBJECTDIR}/jvmlauncher.o jvmlauncher.cpp
+-	$(COMPILE.cc) -O2 -s -DNBEXEC_DLL=\"nbexec.dll\" -I/cygdrive/C/Program\ Files/Java/jdk1.7.0_17/include -I/cygdrive/C/Program\ Files/Java/jdk1.7.0_17/include/win32  -MMD -MP -MF $@.d -o ${OBJECTDIR}/utilsfuncs.o utilsfuncs.cpp
++	$(COMPILE.cc) -O2 -s -DNBEXEC_DLL=\"nbexec.dll\" -I/usr/lib/jvm/default-java/include -MMD -MP -MF $@.d -o ${OBJECTDIR}/utilsfuncs.o utilsfuncs.cpp
  
- ${OBJECTDIR}/utilsfuncs.o: nbproject/Makefile-${CND_CONF}.mk utilsfuncs.cpp 
+ ${OBJECTDIR}/nbexecexe.o: nbexecexe.cpp 
  	${MKDIR} -p ${OBJECTDIR}
  	${RM} $@.d
--	$(COMPILE.cc) -O2 -Wall -s -I/cygdrive/c/cygwin/usr/include/mingw -I/cygdrive/D/Program\ Files/Java/jdk1.6.0_22/include/win32 -I/cygdrive/D/Program\ Files/Java/jdk1.6.0_22/include -fPIC  -MMD -MP -MF $@.d -o ${OBJECTDIR}/utilsfuncs.o utilsfuncs.cpp
-+	$(COMPILE.cc) -O2 -Wall -s -I/usr/lib/jvm/default-java/include -fPIC  -MMD -MP -MF $@.d -o ${OBJECTDIR}/utilsfuncs.o utilsfuncs.cpp
+-	$(COMPILE.cc) -O2 -s -DNBEXEC_DLL=\"nbexec.dll\" -I/cygdrive/C/Program\ Files/Java/jdk1.7.0_17/include -I/cygdrive/C/Program\ Files/Java/jdk1.7.0_17/include/win32  -MMD -MP -MF $@.d -o ${OBJECTDIR}/nbexecexe.o nbexecexe.cpp
++	$(COMPILE.cc) -O2 -s -DNBEXEC_DLL=\"nbexec.dll\" -I/usr/lib/jvm/default-java/include -MMD -MP -MF $@.d -o ${OBJECTDIR}/nbexecexe.o nbexecexe.cpp
  
  # Subprojects
  .build-subprojects:
-Index: libnb-platform-java-7.0+dfsg1/apisupport.harness/windows-launcher-src/Makefile
-===================================================================
---- libnb-platform-java-7.0+dfsg1.orig/apisupport.harness/windows-launcher-src/Makefile	2011-06-14 23:46:57.338990509 +0100
-+++ libnb-platform-java-7.0+dfsg1/apisupport.harness/windows-launcher-src/Makefile	2011-06-14 23:56:49.309005828 +0100
-@@ -34,7 +34,7 @@
- MKDIR=mkdir
- CP=cp
+--- a/o.n.bootstrap/launcher/windows/utilsfuncs.cpp
++++ b/o.n.bootstrap/launcher/windows/utilsfuncs.cpp
+@@ -52,6 +52,7 @@
+ #include "argnames.h"
+ #include <tlhelp32.h>
+ #include <windows.h>
++#include <stdio.h>
+ 
+ using namespace std;
+ 
+--- a/apisupport.harness/windows-launcher-src/nbproject/Makefile-app.exe.mk
++++ b/apisupport.harness/windows-launcher-src/nbproject/Makefile-app.exe.mk
+@@ -13,12 +13,12 @@
+ GREP=grep
+ NM=nm
  CCADMIN=CCadmin
 -RANLIB=ranlib
-+RANLIB=i586-mingw32msvc-ranlib
+-CC=gcc.exe
+-CCC=g++.exe
+-CXX=g++.exe
+-FC=gfortran
+-AS=as.exe
++RANLIB=i686-w64-mingw32-ranlib
++CC=
++CCC=i686-w64-mingw32-g++
++CXX=i686-w64-mingw32-g++
++FC=
++AS=i686-w64-mingw32-as
  
+ # Macros
+ CND_PLATFORM=Cygwin-Windows
+@@ -45,8 +45,8 @@
+ CFLAGS=
  
- # build
-@@ -47,10 +47,11 @@
- # Add your post 'build' code here...
+ # CC Compiler Flags
+-CCFLAGS=-m32 -mno-cygwin
+-CXXFLAGS=-m32 -mno-cygwin
++CCFLAGS=-m32
++CXXFLAGS=-m32
  
- app.res : app.rc
--	windres -o$@ -Ocoff app.rc
-+	i586-mingw32msvc-windres -o$@ -Ocoff app.rc
+ # Fortran Compiler Flags
+ FFLAGS=
+--- a/ide/launcher/windows/nblauncher.cpp
++++ b/ide/launcher/windows/nblauncher.cpp
+@@ -53,6 +53,7 @@
+ #include "../../../o.n.bootstrap/launcher/windows/utilsfuncs.h"
+ #include "../../../o.n.bootstrap/launcher/windows/argnames.h"
+ #include "../../../o.n.bootstrap/launcher/windows/nbexecloader.h"
++#include <stdio.h>
  
- # clean
- clean: .clean-post
-+	rm -f app.res
+ using namespace std;
  
- .clean-pre:
- # Add your pre 'clean' code here...
-Index: libnb-platform-java-7.0+dfsg1/apisupport.harness/windows-launcher-src/nbproject/Makefile-Release.mk
-===================================================================
---- libnb-platform-java-7.0+dfsg1.orig/apisupport.harness/windows-launcher-src/nbproject/Makefile-Release.mk	2011-06-14 23:46:57.358990425 +0100
-+++ libnb-platform-java-7.0+dfsg1/apisupport.harness/windows-launcher-src/nbproject/Makefile-Release.mk	2011-06-14 23:47:19.998990498 +0100
-@@ -11,10 +11,10 @@
- MKDIR=mkdir
- CP=cp
+--- a/o.n.bootstrap/launcher/windows/nbproject/Makefile-nbexec64.mk
++++ b/o.n.bootstrap/launcher/windows/nbproject/Makefile-nbexec64.mk
+@@ -13,12 +13,12 @@
+ GREP=grep
+ NM=nm
  CCADMIN=CCadmin
 -RANLIB=ranlib
--CC=gcc.exe
--CCC=g++.exe
--CXX=g++.exe
-+RANLIB=i586-mingw32msvc-ranlib
-+CC=i586-mingw32msvc-gcc
-+CCC=i586-mingw32msvc-g++
-+CXX=i586-mingw32msvc-g++
- FC=
- AS=
- 
-@@ -84,7 +84,7 @@
- # Clean Targets
- .clean-conf:
- 	${RM} -r build/Release
--	${RM} ../release/launchers/app.exe.exe
-+	${RM} ../release/launchers/app.exe
+-CC=x86_64-w64-mingw32-gcc.exe
+-CCC=x86_64-w64-mingw32-g++.exe
+-CXX=x86_64-w64-mingw32-g++.exe
+-FC=gfortran
+-AS=as.exe
++RANLIB=x86_64-w64-mingw32-ranlib
++CC=
++CCC=x86_64-w64-mingw32-g++
++CXX=x86_64-w64-mingw32-g++
++FC=
++AS=x86_64-w64-mingw32-as
+ 
+ # Macros
+ CND_PLATFORM=Cygwin64-Windows
+@@ -46,8 +46,8 @@
+ CFLAGS=
+ 
+ # CC Compiler Flags
+-CCFLAGS=-m64 -mno-cygwin -static-libgcc -static-libstdc++
+-CXXFLAGS=-m64 -mno-cygwin -static-libgcc -static-libstdc++
++CCFLAGS=-m64 -static-libgcc -static-libstdc++
++CXXFLAGS=-m64 -static-libgcc -static-libstdc++
+ 
+ # Fortran Compiler Flags
+ FFLAGS=
+@@ -65,12 +65,12 @@
+ nbexec64.dll: ${OBJECTDIR}/nbexec64.res
+ 
+ nbexec64.dll: ${OBJECTFILES}
+-	${LINK.cc} -mno-cygwin -shared -o nbexec64.dll ${OBJECTFILES} ${LDLIBSOPTIONS} 
++	${LINK.cc} -shared -o nbexec64.dll ${OBJECTFILES} ${LDLIBSOPTIONS} 
+ 
+ ${OBJECTDIR}/jvmlauncher.o: jvmlauncher.cpp 
+ 	${MKDIR} -p ${OBJECTDIR}
+ 	${RM} $@.d
+-	$(COMPILE.cc) -O2 -s -DNBEXEC_DLL=\"nbexec64.dll\" -I/cygdrive/C/Program\ Files/Java/jdk1.7.0_17/include -I/cygdrive/C/Program\ Files/Java/jdk1.7.0_17/include/win32  -MMD -MP -MF $@.d -o ${OBJECTDIR}/jvmlauncher.o jvmlauncher.cpp
++	$(COMPILE.cc) -O2 -s -DNBEXEC_DLL=\"nbexec64.dll\" -I/usr/lib/jvm/default-java/include -MMD -MP -MF $@.d -o ${OBJECTDIR}/jvmlauncher.o jvmlauncher.cpp
+ 
+ : nbexec_exe.rc 
+ 	@echo 
+@@ -79,27 +79,27 @@
+ ${OBJECTDIR}/nbexec64.res: nbexec.rc version.h
+ 	${MKDIR} -p ${OBJECTDIR}
+ 	@echo Compiling Resource files...
+-	x86_64-w64-mingw32-windres.exe -Ocoff nbexec.rc ${OBJECTDIR}/nbexec64.res
++	x86_64-w64-mingw32-windres -Ocoff nbexec.rc ${OBJECTDIR}/nbexec64.res
+ 
+ ${OBJECTDIR}/platformlauncher.o: platformlauncher.cpp 
+ 	${MKDIR} -p ${OBJECTDIR}
+ 	${RM} $@.d
+-	$(COMPILE.cc) -O2 -s -DNBEXEC_DLL=\"nbexec64.dll\" -I/cygdrive/C/Program\ Files/Java/jdk1.7.0_17/include -I/cygdrive/C/Program\ Files/Java/jdk1.7.0_17/include/win32  -MMD -MP -MF $@.d -o ${OBJECTDIR}/platformlauncher.o platformlauncher.cpp
++	$(COMPILE.cc) -O2 -s -DNBEXEC_DLL=\"nbexec64.dll\" -I/usr/lib/jvm/default-java/include -MMD -MP -MF $@.d -o ${OBJECTDIR}/platformlauncher.o platformlauncher.cpp
+ 
+ ${OBJECTDIR}/nbexec.o: nbexec.cpp 
+ 	${MKDIR} -p ${OBJECTDIR}
+ 	${RM} $@.d
+-	$(COMPILE.cc) -O2 -s -DNBEXEC_DLL=\"nbexec64.dll\" -I/cygdrive/C/Program\ Files/Java/jdk1.7.0_17/include -I/cygdrive/C/Program\ Files/Java/jdk1.7.0_17/include/win32  -MMD -MP -MF $@.d -o ${OBJECTDIR}/nbexec.o nbexec.cpp
++	$(COMPILE.cc) -O2 -s -DNBEXEC_DLL=\"nbexec64.dll\" -I/usr/lib/jvm/default-java/include -MMD -MP -MF $@.d -o ${OBJECTDIR}/nbexec.o nbexec.cpp
+ 
+ ${OBJECTDIR}/utilsfuncs.o: utilsfuncs.cpp 
+ 	${MKDIR} -p ${OBJECTDIR}
+ 	${RM} $@.d
+-	$(COMPILE.cc) -O2 -s -DNBEXEC_DLL=\"nbexec64.dll\" -I/cygdrive/C/Program\ Files/Java/jdk1.7.0_17/include -I/cygdrive/C/Program\ Files/Java/jdk1.7.0_17/include/win32  -MMD -MP -MF $@.d -o ${OBJECTDIR}/utilsfuncs.o utilsfuncs.cpp
++	$(COMPILE.cc) -O2 -s -DNBEXEC_DLL=\"nbexec64.dll\" -I/usr/lib/jvm/default-java/include -MMD -MP -MF $@.d -o ${OBJECTDIR}/utilsfuncs.o utilsfuncs.cpp
+ 
+ ${OBJECTDIR}/nbexecexe.o: nbexecexe.cpp 
+ 	${MKDIR} -p ${OBJECTDIR}
+ 	${RM} $@.d
+-	$(COMPILE.cc) -O2 -s -DNBEXEC_DLL=\"nbexec64.dll\" -I/cygdrive/C/Program\ Files/Java/jdk1.7.0_17/include -I/cygdrive/C/Program\ Files/Java/jdk1.7.0_17/include/win32  -MMD -MP -MF $@.d -o ${OBJECTDIR}/nbexecexe.o nbexecexe.cpp
++	$(COMPILE.cc) -O2 -s -DNBEXEC_DLL=\"nbexec64.dll\" -I/usr/lib/jvm/default-java/include -MMD -MP -MF $@.d -o ${OBJECTDIR}/nbexecexe.o nbexecexe.cpp
  
  # Subprojects
- .clean-subprojects:
-Index: libnb-platform-java-7.0+dfsg1/o.n.bootstrap/launcher/windows/jvmlauncher.h
-===================================================================
---- libnb-platform-java-7.0+dfsg1.orig/o.n.bootstrap/launcher/windows/jvmlauncher.h	2011-06-14 23:46:57.428989809 +0100
-+++ libnb-platform-java-7.0+dfsg1/o.n.bootstrap/launcher/windows/jvmlauncher.h	2011-06-15 18:56:36.509511571 +0100
-@@ -50,6 +50,18 @@
- #include <windows.h>
- #include <string>
- #include <list>
-+
-+// Use the definitions below rather than the linux jdk ones
-+#define _JAVASOFT_JNI_MD_H_
-+// imports, exports, and calling conventions need to match those used in a dll
-+#define JNIEXPORT __declspec(dllexport)
-+#define JNIIMPORT __declspec(dllimport)
-+#define JNICALL __stdcall
-+// Correct types for the windows platform
-+typedef long jint;
-+typedef __int64 jlong;
-+typedef signed char jbyte;
-+
- #include "jni.h"
- #include "utilsfuncs.h"
+ .build-subprojects:
+--- a/apisupport.harness/windows-launcher-src/nbproject/Makefile-app64.exe.mk
++++ b/apisupport.harness/windows-launcher-src/nbproject/Makefile-app64.exe.mk
+@@ -13,12 +13,12 @@
+ GREP=grep
+ NM=nm
+ CCADMIN=CCadmin
+-RANLIB=ranlib
+-CC=x86_64-w64-mingw32-gcc.exe
+-CCC=x86_64-w64-mingw32-g++.exe
+-CXX=x86_64-w64-mingw32-g++.exe
+-FC=gfortran
+-AS=as.exe
++RANLIB=x86_64-w64-mingw32-ranlib
++CC=x86_64-w64-mingw32-gcc
++CCC=x86_64-w64-mingw32-g++
++CXX=x86_64-w64-mingw32-g++
++FC=
++AS=x86_64-w64-mingw32-as
+ 
+ # Macros
+ CND_PLATFORM=Cygwin64-Windows
+@@ -45,8 +45,8 @@
+ CFLAGS=
+ 
+ # CC Compiler Flags
+-CCFLAGS=-m64 -mno-cygwin -static-libgcc -static-libstdc++
+-CXXFLAGS=-m64 -mno-cygwin -static-libgcc -static-libstdc++
++CCFLAGS=-m64 -static-libgcc -static-libstdc++
++CXXFLAGS=-m64 -static-libgcc -static-libstdc++
  
+ # Fortran Compiler Flags
+ FFLAGS=
diff --git a/debian/patches/series b/debian/patches/series
index 2a49a93..812a1a4 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,7 +1,10 @@
+netbeans-platform~empty-binaries-list.patch
 netbeans-platform~launcher.patch
-netbeans-platform~nodownloads.patch
 netbeans-platform~nojnabinaries.patch
 netbeans-platform~windowslauncher.patch
 netbeans-platform~include-extras.patch
 netbeans-platform~nbi.patch
 netbeans-platform~properties.patch
+netbeans-platform~suitebuild.patch
+netbeans-platform~jemmy.patch
+netbeans-platform~classfile-version.patch
diff --git a/debian/pom/openide-modules.xml b/debian/pom/openide-modules.xml
index 40c598d..3582157 100644
--- a/debian/pom/openide-modules.xml
+++ b/debian/pom/openide-modules.xml
@@ -5,17 +5,17 @@
   <modelVersion>4.0.0</modelVersion>
   <groupId>org.netbeans.api</groupId>
   <artifactId>org-openide-modules</artifactId>
-  <version>7.0</version>
+  <version>7.4</version>
   <dependencies>
     <dependency>
       <groupId>org.netbeans.api</groupId>
       <artifactId>org-openide-util</artifactId>
-      <version>7.0</version>
+      <version>7.4</version>
     </dependency>
     <dependency>
       <groupId>org.netbeans.api</groupId>
       <artifactId>org-openide-util-lookup</artifactId>
-      <version>7.0</version>
+      <version>7.4</version>
     </dependency>
   </dependencies>
 </project>
diff --git a/debian/pom/openide-util-lookup.xml b/debian/pom/openide-util-lookup.xml
index 2c5db14..5a283d7 100644
--- a/debian/pom/openide-util-lookup.xml
+++ b/debian/pom/openide-util-lookup.xml
@@ -5,5 +5,5 @@
   <modelVersion>4.0.0</modelVersion>
   <groupId>org.netbeans.api</groupId>
   <artifactId>org-openide-util-lookup</artifactId>
-  <version>7.0</version>
+  <version>7.4</version>
 </project>
diff --git a/debian/pom/openide-util.xml b/debian/pom/openide-util.xml
index ab842c2..e3cac27 100644
--- a/debian/pom/openide-util.xml
+++ b/debian/pom/openide-util.xml
@@ -5,12 +5,12 @@
   <modelVersion>4.0.0</modelVersion>
   <groupId>org.netbeans.api</groupId>
   <artifactId>org-openide-util</artifactId>
-  <version>7.0</version>
+  <version>7.4</version>
   <dependencies>
     <dependency>
       <groupId>org.netbeans.api</groupId>
       <artifactId>org-openide-util-lookup</artifactId>
-      <version>7.0</version>
+      <version>7.4</version>
     </dependency>
   </dependencies>
 </project>
diff --git a/debian/rules b/debian/rules
index 791e109..ec013fc 100755
--- a/debian/rules
+++ b/debian/rules
@@ -1,60 +1,42 @@
 #!/usr/bin/make -f
 
 export JAVA_HOME=/usr/lib/jvm/default-java
+# export JAVA_HOME=/usr/lib/jvm/java-7-openjdk-amd64
 
 #package names
-pkg-base			:= platform13
-pkg-lib-base			:= libnb-$(pkg-base)
-libnb-platform-java		:= $(pkg-lib-base)-java
-libnb-platform-java-doc 	:= $(pkg-lib-base)-java-doc
+pkg-platform			:= platform18
+pkg-lib-platform		:= libnb-$(pkg-platform)
+libnb-platform-java		:= $(pkg-lib-platform)-java
+libnb-platform-java-doc 	:= $(pkg-lib-platform)-java-doc
 libnb-platform-devel-java	:= libnb-platform-devel-java
+libnb-platform-nbms-java	:= $(pkg-lib-platform)-nbms-java
 
-JAVADIR		:= /usr/share/java
+# Included clusters
+base-platform                  := $(pkg-platform)
+
+NBDIR          := /usr/share/netbeans
+export JAVADIR := /usr/share/java
 
-SWINGL_JAR      := swing-layout.jar
 JH_JAR          := jhall.jar
-JNA_JAR         := jna.jar
-JNA_PF_JAR      := jna-platform.jar
-FELIX_FRW_JAR   := org.apache.felix.framework.jar
-FELIX_MAIN_JAR  := org.apache.felix.main.jar
-OSGI_CORE_JAR   := org.eclipse.osgi.jar
-OSGI_CMPN_JAR   := org.eclipse.osgi.services.jar
 JSEARCH_JAR     := jsearch.jar
-BINDEX_JAR      := bindex.jar
-JEMMY_JAR       := jemmy2.jar
-ANTLR_JAR       := antlr3.jar
-STRTEMPL_JAR    := stringtemplate.jar
-JUNIT_JAR       := junit4.jar
-HAMCREST_JAR    := hamcrest-core.jar
-
-NB_SWINGL_JAR   := swing-layout-1.0.4.jar
 NB_JH_JAR       := jhall-2.0_05.jar
-NB_JNA_JAR      := jna-3.2.7.jar
-NB_JNA_PF_JAR   := platform-3.2.7.jar
-NB_FELIX_FRW_JAR:= felix-2.0.3.jar
-NB_FELIX_MAIN_JAR:= felix-main-2.0.2.jar
-NB_OSGI_CORE_JAR:= osgi.core-4.2.jar
-NB_OSGI_CMPN_JAR:= osgi.cmpn-4.2.jar
 NB_JSEARCH_JAR  := jsearch-2.0_05.jar
-NB_BINDEX_JAR   := bindex-2.2.jar
-NB_JEMMY_JAR    := jemmy-2.3.0.0.jar
-NB_ANTLR_JAR    := antlr-3.1.3.jar
-NB_STRTEMPL_JAR := stringtemplate-3.2.jar
-NB_JUNIT_JAR    := junit-4.8.2.jar
-NB_HAMCREST_JAR := hamcrest-core.jar
 
+JAVADOC_WEBSITE		:= http://bits.netbeans.org/7.4/javadoc
 
-JAVADOC_INSTALL_DIR	:= usr/share/doc/$(libnb-platform-java-doc)/api
-NB_INSTALL_DIR		:= usr/share/netbeans
+NB_INSTALL_DIR := usr/share/netbeans
 
-EXT_JAR_LINK_DIR	:= $(NB_INSTALL_DIR)/$(pkg-base)/modules/ext/
-LIB_DIR			:= $(NB_INSTALL_DIR)/$(pkg-base)/lib/
+EXT_JAR_LINK_DIR	:= $(NB_INSTALL_DIR)/$(pkg-platform)/modules/ext/
+LIB_DIR			:= $(NB_INSTALL_DIR)/$(pkg-platform)/lib/
 
+INSTALL        := dh_install -p
+LINK           := dh_link -p
 
-JAVADOC_WEBSITE		:= http://bits.netbeans.org/7.0/javadoc
+NB_PLATFORM_BUILD_DIR := $(shell pwd)/nbbuild/netbeans/platform
 
-INSTALL	:= dh_install -p
-LINK	:= dh_link -p
+DEB_UPSTREAM_VERSION = $(shell dpkg-parsechangelog | \
+			       grep -e '^Version' | \
+                               perl -pi -e 's/^Version:\s+(.*)\+dfsg\d+-\d+.*$$/$$1/')
 
 # Defined function to be used to create symlinks
 define symlink
@@ -69,61 +51,45 @@ override_dh_auto_build:
 	mkdir -p nbbuild/external/xhtml1-dtds
 	ln -sf /usr/share/xml/xhtml/schema/dtd/1.0/xhtml* nbbuild/external/xhtml1-dtds
 	ln -sf /usr/share/xml/entities/xhtml/xhtml* nbbuild/external/xhtml1-dtds
-	$(call symlink, $(JAVADIR)/$(SWINGL_JAR), o.jdesktop.layout/external/$(NB_SWINGL_JAR))
-	$(call symlink, $(JAVADIR)/$(JH_JAR), javahelp/external/$(NB_JH_JAR))
-	$(call symlink, $(JAVADIR)/$(JNA_JAR), libs.jna/external/$(NB_JNA_JAR))
-	$(call symlink, $(JAVADIR)/$(JNA_PF_JAR), core.nativeaccess/external/$(NB_JNA_PF_JAR))
-	$(call symlink, $(JAVADIR)/$(FELIX_FRW_JAR), libs.felix/external/$(NB_FELIX_FRW_JAR))
-	$(call symlink, $(JAVADIR)/$(FELIX_MAIN_JAR), libs.felix/external/$(NB_FELIX_MAIN_JAR))
-#	$(call symlink, $(JAVADIR)/$(OSGI_CORE_JAR), libs.osgi/external/$(NB_OSGI_CORE_JAR))
-	$(call symlink, $(JAVADIR)/$(OSGI_CMPN_JAR), libs.osgi/external/$(NB_OSGI_CMPN_JAR))
-	$(call symlink, $(JAVADIR)/$(JSEARCH_JAR), apisupport.harness/external/$(NB_JSEARCH_JAR))
-	$(call symlink, $(JAVADIR)/$(BINDEX_JAR), apisupport.harness/external/$(NB_BINDEX_JAR))
-	$(call symlink, $(JAVADIR)/$(JEMMY_JAR), jemmy/external/$(NB_JEMMY_JAR))
-	$(call symlink, $(JAVADIR)/$(ANTLR_JAR), libs.antlr3.devel/external/$(NB_ANTLR_JAR))
-	$(call symlink, $(JAVADIR)/$(STRTEMPL_JAR), libs.antlr3.devel/external/$(NB_STRTEMPL_JAR))
-	$(call symlink, $(JAVADIR)/$(JUNIT_JAR), libs.junit4/external/$(NB_JUNIT_JAR))
-	$(call symlink, $(JAVADIR)/$(HAMCREST_JAR), libs.junit4/external/$(NB_HAMCREST_JAR))
-	#
-	######## Remove services and org/eclipse/* from equinox osgi.jar#####################
-	mkdir debian/jar_tmp;  cd debian/jar_tmp; \
-	jar -xf $(JAVADIR)/$(OSGI_CORE_JAR); \
-	rm -rf META-INF/services org/eclipse; \
-	jar -cf ../../libs.osgi/external/$(NB_OSGI_CORE_JAR) ./*;
-	rm -rf debian/jar_tmp
+	# link the required jars
+	$(shell awk 'NF==4 {printf("ln -sf %s %s/%s;\n",$$1,$$2,$$4)}' debian/linked-jars)
 	################################################################
 	# Build the Windows launcher
-	cd o.n.bootstrap/launcher/windows && make .build-impl nbexec.exe
-	cd apisupport.harness/windows-launcher-src && make
+	mkdir -p nbbuild/netbeans/platform/lib
+	cd o.n.bootstrap/launcher/windows && LDFLAGS="" CONF="nbexec" make -e
+	cd o.n.bootstrap/launcher/windows && LDFLAGS="" CONF="nbexec64" make -e
+	cd apisupport.harness/windows-launcher-src && LDFLAGS="" CONF="app.exe" make -e
+	cd apisupport.harness/windows-launcher-src && LDFLAGS="" CONF="app64.exe" make -e
 	################################################################
-	# Build main package. DISPLAY must be unset or tests will fail
+	# Build the platform. DISPLAY must be unset to avoid build failures.
 	unset DISPLAY; ant \
-	-Dpermit.jdk6.builds=true \
+	-Dhg.id=debian-$(DEB_FULL_VERSION) \
+	-Dpermit.jdk7.builds=true \
 	-Dbuild.compiler.deprecation=false \
 	-Dbuild.compiler.debug=false \
+	-Dext.binaries.downloaded=true \
 	-Dverify.checkout=false \
-	-f nbbuild/build.xml build-platform
+	-f nbbuild/build.xml build-platform build-nbms
 	################################################################
 	# Build javadoc package
 	ant \
+	-Dpermit.jdk7.builds=true \
 	-Dbuild.compiler.deprecation=false \
 	-Dbuild.compiler.debug=false \
 	-Dverify.checkout=false \
 	-Dallmodules= \
 	-Dcluster.config=platform \
-	-Dconfig.javadoc.cluster=$(pkg-base) \
 	-Djavadoc.docs.org-netbeans-api-java=$(JAVADOC_WEBSITE)/org-netbeans-api-java/ \
 	-Djavadoc.docs.org-netbeans-modules-project-ant=$(JAVADOC_WEBSITE)/org-netbeans-modules-project-ant/ \
 	-Djavadoc.docs.org-netbeans-modules-projectapi=$(JAVADOC_WEBSITE)/org-netbeans-modules-projectapi/ \
 	-f nbbuild/build.xml build-javadoc
-#	-Dconfig.javadoc.netbeans=\
-#openide.util,openide.actions,openide.options,openide.awt,\
-#openide.dialogs,openide.nodes,openide.explorer,openide.filesystems,openide.modules,\
-#openide.text,openide.windows,openide.loaders,openide.io,queries,\
-#o.n.api.progress,settings,javahelp,openide.execution,\
-#sendopts,options.api,editor.mimelookup \
+	# remove the zip files - we only want the extracted files
+	rm -f nbbuild/build/javadoc/*.zip
+
 
 override_dh_auto_install:
+	# recreate links
+	$(shell awk 'NF==4 {printf("ln -sf %s nbbuild/netbeans/%s/%s;\n",$$1,$$3,$$4)}' debian/linked-jars)
 	# Install libraries
 	mh_installjar -plibnb-org-openide-util-java -l debian/pom/openide-util.xml \
 		nbbuild/netbeans/platform/lib/org-openide-util.jar
@@ -135,27 +101,15 @@ override_dh_auto_install:
 		nbbuild/netbeans/platform/lib/org-openide-modules.jar
 	mh_installpom -plibnb-org-openide-modules-java debian/pom/openide-modules.xml
 	#
-	# Install main package
+	# Install Platform
 	echo > nbbuild/netbeans/platform/.noautoupdate
 	echo > nbbuild/netbeans/platform/.lastModified
-	$(INSTALL)$(libnb-platform-java)   nbbuild/netbeans/platform/* $(NB_INSTALL_DIR)/$(pkg-base)
-	$(INSTALL)$(libnb-platform-java)   nbbuild/netbeans/platform/.noautoupdate $(NB_INSTALL_DIR)/$(pkg-base)
-	$(INSTALL)$(libnb-platform-java)   nbbuild/netbeans/platform/.lastModified $(NB_INSTALL_DIR)/$(pkg-base)
-	$(LINK)$(libnb-platform-java)      $(JAVADIR)/$(SWINGL_JAR)	$(EXT_JAR_LINK_DIR)/$(NB_SWINGL_JAR)
-	$(LINK)$(libnb-platform-java)      $(JAVADIR)/$(JH_JAR)		$(EXT_JAR_LINK_DIR)/$(NB_JH_JAR)
-	$(LINK)$(libnb-platform-java)      $(JAVADIR)/$(JNA_JAR)	$(EXT_JAR_LINK_DIR)/$(NB_JNA_JAR)
-	$(LINK)$(libnb-platform-java)      $(JAVADIR)/$(JNA_PF_JAR)	$(EXT_JAR_LINK_DIR)/$(NB_JNA_PF_JAR)
-	$(LINK)$(libnb-platform-java)      $(JAVADIR)/$(FELIX_FRW_JAR)	$(EXT_JAR_LINK_DIR)/$(NB_FELIX_FRW_JAR)
-	$(LINK)$(libnb-platform-java)      $(JAVADIR)/$(FELIX_MAIN_JAR)	$(EXT_JAR_LINK_DIR)/$(NB_FELIX_MAIN_JAR)
-#	$(LINK)$(libnb-platform-java)      $(JAVADIR)/$(OSGI_CORE_JAR)	$(EXT_JAR_LINK_DIR)/$(NB_OSGI_CORE_JAR)
-	$(LINK)$(libnb-platform-java)      $(JAVADIR)/$(OSGI_CMPN_JAR)	$(EXT_JAR_LINK_DIR)/$(NB_OSGI_CMPN_JAR)
-	$(LINK)$(libnb-platform-java)      $(JAVADIR)/$(ANTLR_JAR)	$(EXT_JAR_LINK_DIR)/$(NB_ANTLR_JAR)
-	$(LINK)$(libnb-platform-java)      $(JAVADIR)/$(STRTEMPL_JAR)	$(EXT_JAR_LINK_DIR)/$(NB_STRTEMPL_JAR)
-	$(LINK)$(libnb-platform-java)      $(JAVADIR)/$(JUNIT_JAR)	$(EXT_JAR_LINK_DIR)/$(NB_JUNIT_JAR)
-	$(LINK)$(libnb-platform-java)      $(JAVADIR)/$(HAMCREST_JAR)	$(EXT_JAR_LINK_DIR)/$(NB_HAMCREST_JAR)
-	$(LINK)$(libnb-platform-java)      $(JAVADIR)/org-openide-util.jar 	$(LIB_DIR)/org-openide-util.jar
-	$(LINK)$(libnb-platform-java)      $(JAVADIR)/org-openide-util-lookup.jar 	$(LIB_DIR)/org-openide-util-lookup.jar
-	$(LINK)$(libnb-platform-java)      $(JAVADIR)/org-openide-modules.jar 	$(LIB_DIR)/org-openide-modules.jar
+	$(INSTALL)$(libnb-platform-java)   nbbuild/netbeans/platform/* $(NB_INSTALL_DIR)/$(pkg-platform)
+	$(INSTALL)$(libnb-platform-java)   nbbuild/netbeans/platform/.noautoupdate $(NB_INSTALL_DIR)/$(pkg-platform)
+	$(INSTALL)$(libnb-platform-java)   nbbuild/netbeans/platform/.lastModified $(NB_INSTALL_DIR)/$(pkg-platform)
+	$(LINK)$(libnb-platform-java) $(JAVADIR)/org-openide-util.jar        $(LIB_DIR)/org-openide-util.jar
+	$(LINK)$(libnb-platform-java) $(JAVADIR)/org-openide-util-lookup.jar $(LIB_DIR)/org-openide-util-lookup.jar
+	$(LINK)$(libnb-platform-java) $(JAVADIR)/org-openide-modules.jar     $(LIB_DIR)/org-openide-modules.jar
 	#
 	# Install devel package
 	rm -f nbbuild/netbeans/harness/antlib/$(NB_JSEARCH_JAR)
@@ -164,52 +118,34 @@ override_dh_auto_install:
 	$(INSTALL)$(libnb-platform-devel-java)   nbbuild/netbeans/harness/* $(NB_INSTALL_DIR)/harness
 	$(INSTALL)$(libnb-platform-devel-java)   nbbuild/netbeans/harness/.noautoupdate $(NB_INSTALL_DIR)/harness
 	$(INSTALL)$(libnb-platform-devel-java)   nbbuild/netbeans/harness/.lastModified $(NB_INSTALL_DIR)/harness
-	$(LINK)$(libnb-platform-devel-java)      $(JAVADIR)/$(JSEARCH_JAR)	$(NB_INSTALL_DIR)/harness/antlib/$(NB_JSEARCH_JAR)
-	$(LINK)$(libnb-platform-devel-java)      $(JAVADIR)/$(BINDEX_JAR)	$(NB_INSTALL_DIR)/harness/antlib/$(NB_BINDEX_JAR)
-	$(LINK)$(libnb-platform-devel-java)      $(JAVADIR)/$(JEMMY_JAR)	$(NB_INSTALL_DIR)/harness/modules/ext/$(NB_JEMMY_JAR)
 	#
 	#Fixing permissions
 	chmod 0755 debian/$(libnb-platform-devel-java)/$(NB_INSTALL_DIR)/harness/launchers/app.sh
 	#
-	# Install javadoc package
-	# copy core platform files
-	rm -f nbbuild/build/javadoc/*.zip
-	$(INSTALL)$(libnb-platform-java-doc) nbbuild/build/javadoc/* $(JAVADOC_INSTALL_DIR)
+	# Install nbms package
+	$(INSTALL)$(libnb-platform-nbms-java)   nbbuild/nbms/* $(NB_INSTALL_DIR)/$(pkg-platform)-nbms
 
 override_dh_auto_clean:
-	-rm -f  *.cdbs-config_list
-	-rm -f  stamp-build-$(libnb-platform-java)
-	-rm -f  stamp-build-$(libnb-platform-devel-java)
-	-rm -f  stamp-build-$(libnb-platform-java-doc)
+	-rm -f *.cdbs-config_list
+	-rm -f stamp-build-$(libnb-platform-java)
+	-rm -f stamp-build-$(libnb-platform-devel-java)
+	-rm -f stamp-build-$(libnb-platform-java-doc)
 	$(call symlink, $(JAVADIR)/$(JH_JAR), javahelp/external/$(NB_JH_JAR))
 	$(call symlink, $(JAVADIR)/$(JSEARCH_JAR), apisupport.harness/external/$(NB_JSEARCH_JAR))
-	ant -Dpermit.jdk6.builds=true -f nbbuild/build.xml clean
-	cd o.n.bootstrap/launcher/windows && make clean
-	cd apisupport.harness/windows-launcher-src && make clean
+	ant -Dpermit.jdk7.builds=true -f nbbuild/build.xml clean
+	cd o.n.bootstrap/launcher/windows && CONF="nbexec" make -e clean
+	cd o.n.bootstrap/launcher/windows && CONF="nbexec64" make -e clean
+	cd apisupport.harness/windows-launcher-src && CONF="app.exe" make -e clean
+	cd apisupport.harness/windows-launcher-src && CONF="app64.exe" make -e clean
 	mh_clean
-	-rm -f  o.jdesktop.layout/external/$(NB_SWINGL_JAR)
-	-rm -f  javahelp/external/$(NB_JH_JAR)
-	-rm -f  libs.jna/external/$(NB_JNA_JAR)
-	-rm -f  core.nativeaccess/external/$(NB_JNA_PF_JAR)
-	-rm -f  libs.felix/external/$(NB_FELIX_FRW_JAR)
-	-rm -f  libs.felix/external/$(NB_FELIX_MAIN_JAR)
-	-rm -f  libs.osgi/external/$(NB_OSGI_CORE_JAR)
-	-rm -f  libs.osgi/external/$(NB_OSGI_CMPN_JAR)
-	-rm -f  apisupport.harness/external/$(NB_JSEARCH_JAR)
-	-rm -f  apisupport.harness/external/$(NB_BINDEX_JAR)
-	-rm -f 	jemmy/external/$(NB_JEMMY_JAR)
-	-rm -f 	libs.antlr3.devel/external/$(NB_ANTLR_JAR)
-	-rm -f 	libs.antlr3.devel/external/$(NB_STRTEMPL_JAR)
-	-rm -f  libs.junit4/external/$(NB_JUNIT_JAR)
-	-rm -f  libs.junit4/external/$(NB_HAMCREST_JAR)
+# remove all the symlinks to jar files we created
+	find . -name "*.jar" -type l -execdir rm -f \{\} \;
 	-rm -rf nbbuild/external/xhtml1-dtds
 	-rm -f  nbbuild/nbproject/private/scan-cache-standard.ser
-#	-rm -f  nbbuild/nbantext.jar
-	-rm -rf debian/jar_tmp
 
 override_jh_depends:
 	# Skipping jh_depends run - since we use symlinks to /usr/share/java then 
 	# jh_depends gets it wrong.
 
 get-orig-source:
-	uscan --verbose --rename --force-download
+	uscan --download-version $(subst +dfsg\d*,,$(DEB_UPSTREAM_VERSION)) --force-download
diff --git a/debian/watch b/debian/watch
index 282f44d..9759b38 100644
--- a/debian/watch
+++ b/debian/watch
@@ -1,3 +1,3 @@
 version=3
-opts=dversionmangle=s/\+dfsg.?$// \
-http://download.netbeans.org/netbeans/ ([\d\.]*)/ debian debian/orig-tar.sh
+opts=dversionmangle=s/\+dfsg\d*$//,downloadurlmangle=s/$/final\/zip/ \
+http://dlc.sun.com.edgesuite.net/netbeans/ ([0-9.]+)/ debian debian/orig-tar.sh

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-java/libnb-platform-java.git



More information about the pkg-java-commits mailing list