how to package libraries correctly


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:

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.



[1] openSUSE:Shared library packaging policy - openSUSE

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;

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

readelf -a /path/to/ | 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


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!