[Fedora-packaging] *.h files in a directory under %{_libdir}?

Daniel P. Berrange berrange at redhat.com
Thu Nov 13 12:30:02 UTC 2008


On Thu, Nov 13, 2008 at 11:38:36AM +0000, Richard W.M. Jones wrote:
> On Wed, Nov 12, 2008 at 01:36:52PM +0100, Mary Ellen Foster wrote:
> > What is the best way to respond to this? I assume it's not encouraged
> > to put *.h files into %{_libdir}, but on the other hand, breaking
> > upstream assumptions like this isn't great either. PLBASE is
> > documented as "the home directory of SWI-Prolog", but I'm not sure if
> > it's actually guaranteed anywhere that .h files will be in this
> > directory.
> 
> It's funny this should come up because I noticed that some glib & gtk
> packages do this (when packaging for MinGW).  eg:
> 
>   $ find /usr/i686-pc-mingw32/sys-root/mingw/lib/ -name '*.h'
>   /usr/i686-pc-mingw32/sys-root/mingw/lib/sigc++-2.0/include/sigc++config.h
>   /usr/i686-pc-mingw32/sys-root/mingw/lib/glib-2.0/include/glibconfig.h
>   /usr/i686-pc-mingw32/sys-root/mingw/lib/gdkmm-2.4/include/gdkmmconfig.h
>   /usr/i686-pc-mingw32/sys-root/mingw/lib/glibmm-2.4/include/glibmmconfig.h
>   /usr/i686-pc-mingw32/sys-root/mingw/lib/gtkmm-2.4/include/gtkmmconfig.h
>   /usr/i686-pc-mingw32/sys-root/mingw/lib/gtk-2.0/include/gdkconfig.h
>   /usr/i686-pc-mingw32/sys-root/mingw/lib/giomm-2.4/include/giommconfig.h
> 
> I left it as the upstream package was for now, but I'm sure this will
> come up during review.  No idea what the right thing to do is or why
> those packages put header files in such a weird place ...

That's not a problem - that's standard practice even on the native 
builds of those packages. The config.h files here contain various
macros / defines that are variable according to the build host. By
putting them in the lib directory, you can have -devel packages for
both 32-bit and 64-bit versions installed in parallel & get the correct
definitions. Now this isn't important to MinGW since we only target
Win32, but there's no need to move them.

Daniel
-- 
|: Red Hat, Engineering, London   -o-   http://people.redhat.com/berrange/ :|
|: http://libvirt.org  -o-  http://virt-manager.org  -o-  http://ovirt.org :|
|: http://autobuild.org       -o-         http://search.cpan.org/~danberr/ :|
|: GnuPG: 7D3B9505  -o-  F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505 :|




More information about the Fedora-packaging mailing list