how to package libraries correctly

Hi

I’m trying to package pythonOCC on the build server. It depends on 3 libraries that I have to package too, so that I can build pythonOCC. I managed to build some of the packages (OCE and geom), but don’t really know how to package libraries. I have read [1], but I don’t know enough about shared libraries to make sense of all the information on that page. Questions I have include:

  • how to correctly name the package
  • do I need to create devel packages. If yes, what to include in those?
  • do I need to package *.a and *.la files or only the *.so files?

The files can be found at:
https://build.opensuse.org/project/packages?project=home%3Aapersaud

It would be great, if someone could have a look at these two packages and could tell me, if these are OK or what I need to change. Any help would be greatly appreciated.

Thanks

Arun

[1] openSUSE:Shared library packaging policy - openSUSE

Hi
Normally you run %configure --disable-static to not build the *.1
files, then in the %install section add;


# Clean up
find %{buildroot}%{_libdir} -name '*.la' -type f -delete -print

Have a look here as an example of the other requirements;
https://build.opensuse.org/package/view_file?file=c%2B%2B-gtk-utils.spec&package=c%2B%2B-gtk-utils&project=GNOME%3AApps&rev=ccc394ce4325635a08b733a6fa3048aa

I build locally via osc so can find the soname to use via;


readelf -a /path/to/lib.so | grep -i soname


Cheers Malcolm °¿° (Linux Counter #276890)
SUSE Linux Enterprise Desktop 11 (x86_64) Kernel 3.0.13-0.27-default
up 2 days 4:56, 2 users, load average: 0.05, 0.03, 0.05
CPU Intel i5 CPU M520@2.40GHz | Intel Arrandale GPU

Hi

it’s been a while, but I didn’t have much time to work on this lately… anyway, yesterday I got my packages to build. Thanks for the tips and links. Very helpful!

Arun