On Sun Jun 29 23:25, Richard Cole wrote: > > I'd be pleased if you (the collective of debian java packagers) would > look over what I've done and provide comments, hints and suggestions.
Well, some general observations just looking at the packaging. There is a built jar in the source, which isn't a problem, as long as it _has_ source (which it does) and you don't use it during the build (or rebuild it first, which you don't). You have also missed changing some of the templates such as the javadoc author and the ITP close, but you were presumably leaving those until later. In the rules file you do: jh_build -o-nowarn joda-time.jar src/* mkdir -p $(TZ_DEST_DIR) java -cp joda-time-1.5.2.jar org.joda.time.tz.ZoneInfoCompiler -dst $(TZ_DEST_DIR) -src $(TZ_SRC_DIR) $(TZ_ZONES) jh_build -o-nowarn joda-time.jar src/* You should use joda-time.jar not joda-time-1.5.2.jar, since the former is the one built from source. You should also call a specific version of Java, not which ever is first in path. If you are setting JAVA_HOME for jh_build, then $JAVA_HOME/bin/java is correct. I also think it would be better to manually add the classes to the jar with fastjar uf joda-time.jar <files>, in which case those lines become something like: jh_build -o-nowarn joda-time.jar src/* $JAVA_HOME/bin/java -cp joda-time.jar org.joda.time.tz.ZoneInfoCompiler -dst $(TZ_DEST_DIR) -src $(TZ_SRC_DIR) $(TZ_ZONES) fastjar uf joda-time.jar $(TZ_DEST_DIR)/* > One problem that I haven't solved so far is how to get the classpath > into the MANIFEST file as was proposed earlier in this thread. > > I presume that the standard java class loader honours the classpath in > the MANIFEST. Is that right? Should javahelper be adding junit.jar to > the classpath. Yes, it does and javahelper provides a couple of ways of doing so. jh_build should add it automatically. If you used the ant script then jh_manifest can be used to add it to the jar afterwards. In fact, testing it here, it does: $ jar xf joda-time.jar META-INF/MANIFEST.MF $ cat META-INF/MANIFEST.MF Class-Path: /usr/share/java/junit.jar This also causes junit to be added to the depends (and so, you don't need it in your debian/control file): $ cat debian/libjoda-time-java.substvars java:Depends=junit > I choose not to use the ant-script that came with Joda-time but > instead used the java-helper primitives.One issue I encountered was > that joda-time generates timezone files as part of the build process > using itself and then includes those in the jar. You'll see that I > call jh_build twice, one to build the jar, then again to package the > jar after adding the generated timezone files. > > At this stage I just tested with gcj. I had some problems building, but I appear to have a broken installation of gcj on the machine I have available to test at the moment. As you say, this is a slightly unusual build, so it will not fit exactly with the simple work flow in javahelper. > >> by which you presumably mean sun-java6-jdk, if you haven't noticed that > >> it's now in non-free > > > > sun-j2sdk1.6 is the package generated by java-package. If you want to > > really epend on a propriatory JDK please use sun-java6-jdk instead. > > Ah, I hadn't noticed that it was in non-free now. I presume this means > I can get rid of java-package and the packages it produced and swap to > the sun-java6-jdk. Yes, you can. Hope those comments were useful, Matt -- Matthew Johnson
signature.asc
Description: Digital signature