I've added a fix for the manifest, this should close the bug and make
the package useful as a build dependency

Can somebody please give me write permissions on pkg-java so I can push
this?

javahelper has been used to achieve this, I saw an example of this in
another package.  If there is a better way to do this with the
maven_repo_helper please feel free to improve on my fix.

It is now possible to install the package and just type

$ closure-compiler -h

and it shows help output.

Should it continue to be called libclosure-compiler-java.deb or should
it just be closure-compiler.deb now that it includes an executable?

I haven't uploaded though - please let me know if I should upload or if
somebody else has work in progress


>From f3a53a7ea17f51da7c19ef976e2015a5f1cb03b3 Mon Sep 17 00:00:00 2001
From: Daniel Pocock <dan...@pocock.com.au>
Date: Fri, 11 Oct 2013 11:38:47 +0200
Subject: [PATCH 1/3] Add manifest entries for classpath and main class

---
 debian/control                           |    2 +-
 debian/libclosure-compiler-java.manifest |    3 +++
 debian/rules                             |    2 +-
 3 files changed, 5 insertions(+), 2 deletions(-)
 create mode 100644 debian/libclosure-compiler-java.manifest

diff --git a/debian/control b/debian/control
index 475d354..3bd0169 100644
--- a/debian/control
+++ b/debian/control
@@ -6,7 +6,7 @@ Uploaders: Thomas Koch <tho...@koch.ro>
 Build-Depends: debhelper (>= 9), default-jdk, maven-repo-helper (>= 1.7.1), junit4,
  libandroid-json-org-java, libprotobuf-java, libargs4j-java, libguava-java, libjsr305-java,
  librhino-java (>= 1.7R4), ant, libjarjar-java, protobuf-compiler,
- libmaven-ant-tasks-java
+ libmaven-ant-tasks-java, javahelper (>=0.25)
 Build-Depends-Indep: default-jdk-doc, libmaven-javadoc-plugin-java
 Standards-Version: 3.9.4
 Vcs-Git: git://anonscm.debian.org/pkg-java/closure-compiler.git
diff --git a/debian/libclosure-compiler-java.manifest b/debian/libclosure-compiler-java.manifest
new file mode 100644
index 0000000..b0afce9
--- /dev/null
+++ b/debian/libclosure-compiler-java.manifest
@@ -0,0 +1,3 @@
+usr/share/java/closure-compiler.jar:
+ Class-Path: /usr/share/java/closure-compiler.jar                        /usr/share/java/args4j.jar                                              /usr/share/java/guava.jar                                                /usr/share/java/json.jar
+ Main-class: com.google.javascript.jscomp.CommandLineRunner
diff --git a/debian/rules b/debian/rules
index 3df5fc2..302665a 100755
--- a/debian/rules
+++ b/debian/rules
@@ -3,7 +3,7 @@
 JAVA_HOME      := /usr/lib/jvm/default-java
 
 %:
-	dh $@ --with maven_repo_helper
+	dh $@ --with maven_repo_helper,javahelper
 
 override_dh_auto_build:
 	ant -propertyfile debian/ant.properties jar-nodeps javadoc
-- 
1.7.10.4

>From 04aae7ec61db1e2ed6b3bdb12d3b0bab04b823e3 Mon Sep 17 00:00:00 2001
From: Daniel Pocock <dan...@pocock.com.au>
Date: Fri, 11 Oct 2013 11:46:26 +0200
Subject: [PATCH 2/3] Add symlink to usr/bin

---
 debian/libclosure-compiler-java.links |    1 +
 1 file changed, 1 insertion(+)
 create mode 100644 debian/libclosure-compiler-java.links

diff --git a/debian/libclosure-compiler-java.links b/debian/libclosure-compiler-java.links
new file mode 100644
index 0000000..c8edc77
--- /dev/null
+++ b/debian/libclosure-compiler-java.links
@@ -0,0 +1 @@
+/usr/share/java/closure-compiler.jar /usr/bin/closure-compiler
-- 
1.7.10.4

>From 8f1de0ac7c5f968ac0882a859db5006f2294c491 Mon Sep 17 00:00:00 2001
From: Daniel Pocock <dan...@pocock.com.au>
Date: Fri, 11 Oct 2013 11:48:15 +0200
Subject: [PATCH 3/3] changelog: manifest and symlink

---
 debian/changelog |    4 ++++
 1 file changed, 4 insertions(+)

diff --git a/debian/changelog b/debian/changelog
index 3da8f29..04d27e3 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,5 +1,6 @@
 closure-compiler (20130227+dfsg1-3) UNRELEASED; urgency=low
 
+  [Emmanuel Bourg]
   * Team upload.
   * Backported a change replacing the deprecated LimitInputStream class
     in Guava with ByteStreams.limit()
@@ -7,6 +8,9 @@ closure-compiler (20130227+dfsg1-3) UNRELEASED; urgency=low
   * Removed the build dependency on ant1.7
   * Removed unnecessary changes from build_xml.patch
 
+  [Daniel Pocock]
+  * Add manifest and symlink for runnable JAR (Closes: #705565)
+
  -- Emmanuel Bourg <ebo...@apache.org>  Thu, 12 Sep 2013 12:46:47 +0200
 
 closure-compiler (20130227+dfsg1-2) unstable; urgency=low
-- 
1.7.10.4

Reply via email to