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

Re: [fedora-java] libvirt-java bindings

On Wed, Jul 02, 2008 at 12:24:02PM -0400, David Walluck wrote:
> Hash: SHA1
> Daniel Veillard wrote:
> | And outside of the distro build the macros are not available and that's
> | where the user selection should be done, so this doesn't help much in the
> | case of a manual user rpmbuild, except maybe if one uses them to override
> | the alternative default.
> To my knowledge they are available. At least allow the user to set
> JAVA_HOME. This is much cleaner than a hack on following that has been
> proven not to work ever since IBM JDK 1.4.
> |   I guess I need to think a bit more about it, but i'm firmly in the camp
> | of those who think the package should be distribution agnostic as much as
> | possible.
> It is distribution agnostic. Were the 6+ RPM-based distributions I
> mentioned in a previous email not agnostic enough? Even Debian/Ubuntu
> follow the same layout for JVM's.
> But you were speaking of an RPM build, so that covers ever major RPM
> distro I know of.
> And if you allow $JAVA_HOME and --with-java-home= as a configure option,
> and try /usr/lib/jvm/java first if none is specficed, then you will also
> support Ubuntu out of the box without resorting to a hack.

  Ah, finally some informations which may help save the problem in a
generic fashion.

So is the following looks the Right Way to package JNI code for you ?

in configure.in/ac:

- use the $JAVA_HOME as the user provided environment variable to point to
  the top of the JDK tree
- in configure.in provide an option --with-java-home allowing to override it
- if still not defined try with /usr/lib/jvm/java
- then check that $JAVA_HOME/bin contains the binaries for
  javah/javac/javah/javadoc/jar to be used when building the binaries
- then look under $JAVA_HOME/include and $JAVA_HOME/include/$system for
  the JNI includes

in the spec file:

this is still unclear but I guess

- we should look for the %{java_home} macro
- if found it should be passed as the --with-java-home value when running
- keep
  Requires: java [ >= 1.5 ]
  Requires: jpackage-utils
  BuildRequires: java-devel [ >= 1.5 ]
  BuildRequires: jpackage-utils
  as the Java RPM dependancies

- Indicates that when rebuilding manually, overriding %{java_home} on the
  rpmbuild command line allows to pick a different JDK

Can you confirm those instructions ? 

If yes can this be written directly somewhere in 
in a "configure" section along ant/maven



Red Hat Virtualization group http://redhat.com/virtualization/
Daniel Veillard      | virtualization library  http://libvirt.org/
veillard redhat com  | libxml GNOME XML XSLT toolkit  http://xmlsoft.org/
http://veillard.com/ | Rpmfind RPM search engine  http://rpmfind.net/

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