[fedora-java] Failed eclipse-findbugs noarch build due to use of %{_libdir}

Krzysztof Daniel kdaniel at redhat.com
Thu Dec 12 08:37:35 UTC 2013


Hey Richard,

Thanks for bringing this issue.

This issue was causing a lot of problems in the Eclipse stack,
as majority of eclipse noarch plugins required arch-specific Eclipse
during the build.

We solved this by moving the eclipse-pdebuild script to /bin/, setting
the path at *Eclipse* buildtime to Eclipse, and symlinking some jars
to /usr/share/java.

You can find the correct location of Eclipse by calling
more /bin/eclipse-pdebuild | grep "datadir="
This is quick, dirty and hackish, but will work.

Another solution is described in https://fedorahosted.org/fpc/ticket/203
comment 18:
"noarch packages may use %configure (which uses %{_libdir} to set the
--libdir value)".

I have never seen this in use, but I expect that once you have a
configure script in your package, it should be able to find the value of
libdir. What could for is following configure script:

--
echo ${libdir} > .libdir
--
And then a macro for accessing the libdir
%define __eclipse_libdir `echo .libdir`/eclipse

Hope that helps.
-- 
Krzysztof Daniel <kdaniel at redhat.com>
Red Hat



More information about the java-devel mailing list