Mailinglist Archive: opensuse-packaging (48 mails)

< Previous Next >
Re: [opensuse-packaging] Packaging a (mostly) header only C++ library

W dniu 18.12.2018 o 12:22, Dan Čermák pisze:
Martin Pluskal <martin@xxxxxxxxxxx> writes:

On Tue, 2018-12-18 at 10:41 +0100, Dan Čermák wrote:
Hi list,

I would like to package a (kind-of) header only C++ library
( The problem is, that it actually
ships a cpp file in it's source tree (so I guess it needs to be
to a shared library?).

The issue at hand is, that loguru is designed to be embedded in your
project (there is *a lot* of compile time switches) and even running
test suite from a shared library requires a lot of patching of the
source tree.

What would be the correct procedure for packaging? Create a shared
library nevertheless? Or create multiple libraries with some common
compile time switches? Or just install the sources into the file

I guess you mean something like installing just headers like in i.e [1]
- if so just having -devel subpackage is absolutely ok.

Yes, kind of. The difference is however that loguru ships a cpp file and
not just headers.

I would personally prefer to just ship the sources, as upstream clearly
wants it that way.

I see no problem with packaging this as a shared library. Otherwise it
makes not much sense to package it at all, I think.

Since it's a single cpp file, you don't need any build system. Just
write a single gcc command it spec file. Shared library should be named and shipped in package libloguru-2_0_0. See

Adam Mizerski

< Previous Next >
Follow Ups