To me, it sounds like you’re ruled by rpmlint too much.
libcairo.so libimlib2.so seems to be the libraries conky wants instead of conky-devel.
And .so format is suggested to be placed in a -devel sub-package, as rpmlint says.
So you were running into difficulty to make it happen, if place them into conky, rpmlint warns; if place them into conky-devel, conky segfaults because it can’t find the runtime libraries.
Here’s my solutions(a few):
-
Just place them into conky and ignore the warnings. (easiest)
-
place them into conky-devel, and add “Requires: %{name}-devel = %{version}” to conky package(awkward but works for personal use, but will be certainly rejected if you submit to Factory)
-
patch conky source code. make a conky-shlib.patch. (hardest)
find something like “$(CC) -shared” and replace the line with something like this:
$(CC) -shared -Wl,-soname,libcairo.so.1.0.0
it requires you to have some basic knowledge about gcc.
it you’are right, it will generate a library as you named. then you can link it to .so and .so.1 in %install section, like this:
ln -sf %{_libdir}/conky/libcairo.so.1.0.0 %{buildroot}%{_libdir}/conky/libcairo.so
Just Remember: the %{buildroot} has to be placed at the second parameter, or it will fail to link.
or you can do the same thing in soure code, link them and install them in configure.ac (then run autoreconf -fi at the top of %build section) or CMakeLists.txt
and in %files section
%files << conky
%defattr(-,root,root)
%{_libdir}/conky/libcairo.so.1
%{_libdir}/conky/libcairo.so.1.0.0
%file devel << conky-devel
%defattr(-,root,root)
%{_libdir}/conky/libcairo.so
- less hard solution
in %install section:
mv %{buildroot}%{_libdir}/conky/libcairo.so %{buildroot}%{_libdir}/conky/libcairo.so.1.0.0
ln -sf %{_libdir}/conky/libcairo.so.1.0.0 %{buildroot}%{_libdir}/conky/libcairo.so.1
ln -sf %{_libdir}/conky/libcairo.so.1.0.0 %{buildroot}%{_libdir}/conky/libcairo.so
and the same goes to %files section.
but I’m not sure if this simple rename method works.
Greetings,
Marguerite