Package: libguice-java Version: 3.0-2 Followup-For: Bug #685871 -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA256
Hi, I created a patch to enable the servlet extension. The patch also moves the assistedinjection extension in a separate binary package. I propose that all extensions, especially if they introduce additional dependencies, should go in a separate binary package. The patch is still buggy because the Depends: field isn't set correctly in the new extension binary packages. But I first want to hear your opinion on separate packages before continuing to work in this direction. Is there any automatic way how maven-debian-helper might handle the dependencies or do we need to put them manually into debian/control? The patch is also pushed to the Git repository in a separate branch. http://anonscm.debian.org/gitweb/?p=pkg-java/guice.git;h=refs/heads/thkoch_bug685871_enable_servlet_extension Best regards, Thomas Koch -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.12 (GNU/Linux) iQIcBAEBCAAGBQJQfWTVAAoJEAf8SJEEK6ZaIh0P+wcazyzkn+kasLVJnQI0sav2 j2+3I0cVD6tlkWozKGYlyJJIyQ04Mr8Pz/dvsnlWvdAlBXKBOOmCxI4fEoE6Y82b dO+KgA3jskL65DyvthaxX0r+OX0+OoDp2rjk4iOoLynllvQBv1XhbHmZxtIa9T5w amYcc6hukxWFPUP0GOPZjBIDhoylJCju9lwwP+gdaRYVXA6C1spMHYJY5r3SS+cK Vs8glZK641vgJ0mk0lMX29UhzzyIBcxGNQnPK4gSrx1G+NMdldYYLn6mMfb3zqEM WCjW4QUo1WHLwMFG8wd6sLkaIKayAUfvuozkGurim1ZBeB1wEgkvbyCbURm2MPeD ZIiK0p8IL5imN95AcDxSNJTA+caAEGaxtn07605furNiPnFZFoSJ1ds5vQamXORz c8G5N/7ymdFn/5MvRNdbtiNKIq+lY+0WZT1Ewih5vzVYC9hpav4JFSC+KTNwPXhc PwZGo6xBt+UmvWeIQIag1gDypqcsMcrIUMTZGcqgIG7tgeDmTpON65cxAeoHopt3 AagQpyhgbEeI/q5b9z8G2Payv5AafSFT5YLDoRAdFypZKF6LBn+s/toRmzoaYkYy TD8V1uVvHWnqdHPuHT4GE32msc8lrfPiK2n2qvu9o+QJnFY9syRgms0XPS4rcA6J yMMFdubXlkpGAvo1TqLd =eNH8 -----END PGP SIGNATURE-----
diff --git a/debian/changelog b/debian/changelog index d2fbf85..60fce2a 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,10 @@ +guice (3.0-3) UNRELEASED; urgency=low + + * Enable servlet extension. (Closes: #685871) + * Put each extension in a separate binary package + + -- Thomas Koch <tho...@koch.ro> Tue, 16 Oct 2012 14:15:50 +0200 + guice (3.0-2) experimental; urgency=low [ Miguel Landaeta ] diff --git a/debian/control b/debian/control index 4df0aa0..470f4f1 100644 --- a/debian/control +++ b/debian/control @@ -6,7 +6,8 @@ Uploaders: Miguel Landaeta <mig...@miguel.cc> DM-Upload-Allowed: yes Build-Depends: debhelper (>= 7.0.50~), javahelper (>= 0.32), default-jdk, ant, maven-debian-helper, libatinject-jsr330-api-java, libaopalliance-java, - libcglib-java, libasm3-java, bnd, default-jdk-doc, libjarjar-java + libcglib-java, libasm3-java, bnd, default-jdk-doc, libjarjar-java, + libservlet2.5-java Standards-Version: 3.9.3 Vcs-Git: git://git.debian.org/git/pkg-java/guice.git Vcs-Browser: http://git.debian.org/?p=pkg-java/guice.git @@ -47,3 +48,34 @@ Description: documentation for libguice-java injecting it. . This package provides javadocs for Guice framework and example code. + +Package: libguice-assistedinject-java +Architecture: all +Depends: ${misc:Depends} +Description: lightweight dependency injection framework for Java 5 and above + Guice provides support for dependency injection using annotations to + configure Java objects. Dependency injection is a design pattern whose + core principle is to separate behavior from dependency resolution. + . + Guice allows implementation classes to be programmatically bound to + an interface, then injected into constructors, methods or fields + using an @Inject annotation. When more than one implementation of + the same interface is needed, the user can create custom annotations + that identify an implementation, then use that annotation when + injecting it. + +Package: libguice-servlet-java +Architecture: all +Depends: ${misc:Depends} +Description: lightweight dependency injection framework for Java 5 and above + Guice provides support for dependency injection using annotations to + configure Java objects. Dependency injection is a design pattern whose + core principle is to separate behavior from dependency resolution. + . + Guice allows implementation classes to be programmatically bound to + an interface, then injected into constructors, methods or fields + using an @Inject annotation. When more than one implementation of + the same interface is needed, the user can create custom annotations + that identify an implementation, then use that annotation when + injecting it. + diff --git a/debian/libguice-assistedinject-java.poms b/debian/libguice-assistedinject-java.poms new file mode 100644 index 0000000..d66fdc5 --- /dev/null +++ b/debian/libguice-assistedinject-java.poms @@ -0,0 +1,2 @@ +extensions/assistedinject/pom.xml + diff --git a/debian/libguice-java.poms b/debian/libguice-java.poms index 09a13bc..7b7e9b9 100644 --- a/debian/libguice-java.poms +++ b/debian/libguice-java.poms @@ -1,3 +1,3 @@ core/pom.xml --no-parent extensions/pom.xml -extensions/assistedinject/pom.xml + diff --git a/debian/libguice-servlet-java.poms b/debian/libguice-servlet-java.poms new file mode 100644 index 0000000..49392a3 --- /dev/null +++ b/debian/libguice-servlet-java.poms @@ -0,0 +1 @@ +extensions/servlet/pom.xml diff --git a/debian/patches/03_extensions-assistedinject.diff b/debian/patches/03_extensions-assistedinject.diff index a00b211..c98602e 100644 --- a/debian/patches/03_extensions-assistedinject.diff +++ b/debian/patches/03_extensions-assistedinject.diff @@ -2,15 +2,8 @@ Description: Enable build of assistedinject extension Author: Miguel Landaeta <mig...@miguel.cc> Bug-Debian: http://bugs.debian.org/683644 Forwarded: no -Last-Update: 2012-08-09 +Last-Update: 2012-10-16 ---- guice-3.0.orig/extensions/assistedinject/build.properties -+++ guice-3.0/extensions/assistedinject/build.properties -@@ -5,3 +5,4 @@ build.dir=build - test.class=com.google.inject.assistedinject.FactoryProviderTest - module=com.google.inject.assistedinject - fragment=true -+debian.lib.dir=/usr/share/java --- guice-3.0.orig/extensions/assistedinject/build.xml +++ guice-3.0/extensions/assistedinject/build.xml @@ -5,8 +5,9 @@ diff --git a/debian/patches/04_extensions-servlet.diff b/debian/patches/04_extensions-servlet.diff new file mode 100644 index 0000000..69e3566 --- /dev/null +++ b/debian/patches/04_extensions-servlet.diff @@ -0,0 +1,19 @@ +diff --git a/extensions/servlet/build.xml b/extensions/servlet/build.xml +index 7b1f76f..5e564f0 100644 +--- a/extensions/servlet/build.xml ++++ b/extensions/servlet/build.xml +@@ -5,10 +5,10 @@ + <import file="../../common.xml"/> + + <path id="compile.classpath"> +- <fileset dir="${lib.dir}" includes="*.jar"/> +- <fileset dir="${lib.dir}/build" includes="*.jar"/> +- <fileset dir="${ext.lib.dir}" includes="*.jar"/> +- <fileset dir="${ext.lib.dir}/build" includes="*.jar"/> ++ <fileset dir="${debian.lib.dir}"> ++ <include name="servlet-api-2.5.jar"/> ++ <include name="atinject-jsr330-api.jar"/> ++ </fileset> + <pathelement path="../../build/classes"/> + </path> + diff --git a/debian/patches/series b/debian/patches/series index 4afc842..fda88ae 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -1,3 +1,4 @@ 01_fix_build.diff 02_link_javadocs.diff 03_extensions-assistedinject.diff +04_extensions-servlet.diff diff --git a/debian/rules b/debian/rules index 6d93e8c..e80b766 100755 --- a/debian/rules +++ b/debian/rules @@ -2,6 +2,7 @@ export JAVA_HOME=/usr/lib/jvm/default-java VERSION := \$(shell dpkg-parsechangelog | grep ^Version: | sed -r 's/^.*:\ (.*)-.*$$/\1/') +EXTENSIONS := assistedinject servlet %: dh $@ --with javahelper @@ -10,7 +11,9 @@ override_dh_auto_build: dh_auto_build ant -Dversion=$(VERSION) jar javadoc # build assistedinject extension - cd extensions/assistedinject && ant -Dversion=$(VERSION) jar + for EXTENSION in $(EXTENSIONS); do \ + cd extensions/$$EXTENSION && ant -Dversion=$(VERSION) -Ddebian.lib.dir=/usr/share/java jar; cd -; \ + done override_dh_auto_install: dh_auto_install @@ -19,14 +22,18 @@ override_dh_auto_install: core/pom.xml build/dist/guice-$(VERSION).jar mh_installpoms -plibguice-java --set-version=$(VERSION) # install assistedinject extension - mh_installjar -plibguice-java --set-version=$(VERSION) -l -v \ - extensions/assistedinject/pom.xml \ - extensions/assistedinject/build/guice-assistedinject-$(VERSION).jar + for EXTENSION in $(EXTENSIONS); do \ + mh_installjar -plibguice-$$EXTENSION-java --set-version=$(VERSION) -l -v \ + extensions/$$EXTENSION/pom.xml \ + extensions/$$EXTENSION/build/guice-$$EXTENSION-$(VERSION).jar; \ + done override_dh_auto_clean: dh_auto_clean # clean assistedinject extension build files - cd extensions/assistedinject && ant clean + for EXTENSION in $(EXTENSIONS); do \ + cd extensions/$$EXTENSION && ant clean; cd -; \ + done mh_clean override_dh_compress: