Sorry I haven't been building from svn lately but here's some feedback on
my attempt to build for Fedora Linux

1. The install paths should have sane defaults like they do but it would be
nice to be able to override the path, specifcially in my case because
Fedora is multi-lib so 64bit libraries go in /usr/lib64 not /usr/lib.

My CMake is getting a little rusty but I think one option would be to make
them CACHE variables. Currently even if I specify something different on
the command line using definition it still doesn't change.

What I did for a project I developed the cmake build system was to use the
GNUInstallDirs module[1]:

include(GNUInstallDirs)
mark_as_advanced(CLEAR
    CMAKE_INSTALL_BINDIR
    CMAKE_INSTALL_INCLUDEDIR
    CMAKE_INSTALL_LIBDIR
)

And used mark_as_advanced(CLEAR... on the variables I use in the project so
they are not hidden.

Then of course later during the install command:

install(TARGETS codec2 EXPORT codec2-config
    LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
    ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
    RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
    PUBLIC_HEADER DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/codec2
)

This project is built for linux, mac, and windows.

The GNUInstallDirs module will detect the correct (default) directories for
most systems and then you can use your conditionals to alter any you need
while still allowing the end user to override them.

2. Where files should be packaged?

New files not captured by my current RPM spec file:

RPM build errors:
    Installed (but unpackaged) file(s) found:
   /usr/include/wsjtx/MessageServer.hpp
   /usr/include/wsjtx/Radio.hpp
   /usr/include/wsjtx/udp_export.h
   /usr/lib/cmake/wsjtx/udp-release.cmake
   /usr/lib/cmake/wsjtx/udp-static-release.cmake
   /usr/lib/cmake/wsjtx/udp-static.cmake
   /usr/lib/cmake/wsjtx/udp.cmake
   /usr/lib/libwsjtx_udp.a
   /usr/lib/libwsjtx_udp.so
   /usr/share/applications/message_aggregator.desktop

I'm assuming I need to setup a wsjtx-devel package for the headers and
cmake modules?

Also, fedora requires that libraries that go into the default libdir should
have soname/soversions set. NOTE: This does not (and probably shouldn't be)
the version of the software. Typically you'd start a 0 or 1 and increment
only when an API/ABI incompatible change is made.

Of course the desktop file is easy, but should it go into the main package?
Or into a separate subpackage?

Thanks,
Richard
------------------------------------------------------------------------------
_______________________________________________
wsjt-devel mailing list
wsjt-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wsjt-devel

Reply via email to