[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: packaging of swig generated wrappers



On Sat, 2014-05-17 at 23:56 +0200, Emmanuel Bourg wrote:
> Le 16/05/2014 20:17, Ghislain Vaillant a écrit :
> 
> > So far, I have created a libismrmrd-java.install which moves the JNI
> > file to /usr/lib/jni and the JAR to /usr/share/java.
> > 
> > Is that enough or is there anything missing ?
> 
> Hi Ghislain,
> 
> If you want to adhere to the Java policy libjismrmrd.so would have to be
> packaged in an arch specific package (that would be libismrmrd-jni).
> 
> https://www.debian.org/doc/packaging-manuals/java-policy/x110.html
> 
> "If a Java library relies on native code, the dynamic libraries
> containing this compiled native code should be installed into the
> directory /usr/lib/jni. These dynamic libraries should be shipped in a
> separate architecture-specific package named libXXX[version]-jni. The
> package containing the Java bytecode (generally libXXX[version]-java)
> should depend on this package."
> 
> But if ismrmrd.jar is small I think it's ok to put the jar and the
> native library in the same package.
> 
> Emmanuel Bourg
> 

Hi Emmanuel,

Thanks for your quick reply. Indeed the .jar file is pretty small, so I
though about packaging then into one -java package, as explained in the
java-policy later.

Besides moving the jar and jni files to their respective system-wide
directories, do I need to do anything else for the package ?

There's an example script provided in the source of the library, which
tests the java bindings. With what I have done so far with the package,
the script still complains about missing classpath (which I then
provided with an export) and then missing JNI (which I am not quite sure
what to do with...). This makes me think that perhaps something is
missing packaging-wise ?

Any suggestion is welcome. Thanks,

Ghislain



Reply to: