[Fedora-packaging] Includedir question

Michael Schwendt mschwendt at gmail.com
Sun Jun 16 19:47:40 UTC 2013

On Sun, 16 Jun 2013 17:50:07 +0200, Remi Collet wrote:

> I mostly encourage to use a sub-folder of /usr/include instead of simply
> drop the headers in the main /usr/include dir

That's a good recommendation when header filenames bear a risk of
causing conflicts. It can also be beneficial when planning to package
multiple parallel-installable versions of a library API. That doesn't
mean we install all headers into versioned subdirs.

And libserf uses a "serf" prefix for its header names, so storing these
headers in standard search path isn't too bad.

$ rpmls -p libserf-devel-1.2.1-2.fc19.x86_64.rpm|grep inc
-rw-r--r--  /usr/include/serf.h
-rw-r--r--  /usr/include/serf_bucket_types.h
-rw-r--r--  /usr/include/serf_bucket_util.h

> And in that case "serf-1" (used in other distro seems a good choice)

And may be troublesome for projects, which expect libserf headers to be
found in standard search path. It would become necessary to patch them and
e.g. make them use pkgconfig.
On the contrary, the project developer who doesn't use pkgconfig might
'#include <serf-1/serf.h>', and that wouldn't be compatible with the
pristine upstream release defaults.

> But looking outside fedora is always interesting.

Where to start? Where to stop?

> Lot of us use path from debian or other distro.
> Other distro also take patches from our repo.

Upstream, upstream, upstream. 
> > This depends on where dependencies expect these headers to be found.
> > Do they evaluate the serf-1.pc pkgconfig --cflags to retrieve a custom
> > search path for headers? Do external sources include the headers via
> > standard search path, i.e.
> Definitively, pkg-config output is the right way.

Please talk to upstream about this customised header location.
Try getting upstream to use /usr/include/serf-1 by default, too.

Michael Schwendt
Fedora release 19 (Schrödinger’s Cat) - Linux 3.9.5-301.fc19.x86_64
loadavg: 0.50 0.23 0.12

More information about the packaging mailing list