mheily / libkqueue

kqueue(2) compatibility library
Other
237 stars 77 forks source link

fix debian packaging to create shlibs file #61

Closed mattrose closed 5 years ago

mattrose commented 5 years ago

This adds the GENERATE_SHLIBS CMake variable. This allows other debian packages to use dpkg-shlibdeps to determine information from the generated .deb file

Big problem. The version of CMake that I'm using does not allow you to use 0 as an SOVERSION number so I also had to bump the SOVERSION to 1. We could set to something like "0.1" but 0 or "0" is apparently right out.

With an SOVERSION of 1 it works great, but with an SOVERSION of 0 you get this error CMake Warning (dev) at /usr/local/share/cmake-3.8/Modules/CPackDeb.cmake:919 (message): Shared library './usr/lib/libkqueue.so.0' is missing soname or soversion. Library will not be added to DEBIAN/shlibs control file. Call Stack (most recent call first): /usr/local/share/cmake-3.8/Modules/CPackDeb.cmake:1049 (cpack_deb_prepare_package_vars) This warning is for project developers. Use -Wno-dev to suppress it.

arr2036 commented 5 years ago

Looks good. I don't think there's any big issues changing SOVERSION. Only minor nit is that you removed the trailing newline, could you add it back?

mattrose commented 5 years ago

Added back

arr2036 commented 5 years ago

I think maybe your editor is doing it? Seems like it's still missing in dc97a1d

mattrose commented 5 years ago

It's actually adding a newline to the end of the file, not removing it.

mattrose commented 5 years ago

I'm not sure how to fix that using vim

arr2036 commented 5 years ago

Ah you're right, sorry, github's diff display is confusing.