Point the lib/calamares/libcalamares.so symlink to the versioned so.

Point the lib/calamares/libcalamares.so symlink for the Python modules
directly to the versioned lib/libcalamares.so.VERSION library rather
than to the lib/libcalamares.so symlink. This allows distributions to
install the lib/libcalamares.so symlink to a development package and
only ship lib/libcalamares.so.VERSION and lib/calamares/libcalamares.so
in the runtime package. It is also marginally faster (because only one
level of symlinks has to be resolved instead of two).

(I know this works because I have been manually fixing up this symlink
in the Fedora specfile so far.)
This commit is contained in:
Kevin Kofler 2014-11-14 12:30:56 +01:00
parent d5b1b23415
commit 7478c1266b

View File

@ -85,11 +85,11 @@ install( TARGETS calamares
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
) )
# Make symlink lib/calamares/libcalamares.so to lib/libcalamares.so so lib/calamares # Make symlink lib/calamares/libcalamares.so to lib/libcalamares.so.VERSION so
# can be used as module path for the Python interpreter. # lib/calamares can be used as module path for the Python interpreter.
install( CODE " install( CODE "
file( MAKE_DIRECTORY \"\$ENV{DESTDIR}/${CMAKE_INSTALL_FULL_LIBDIR}/calamares\" ) file( MAKE_DIRECTORY \"\$ENV{DESTDIR}/${CMAKE_INSTALL_FULL_LIBDIR}/calamares\" )
execute_process( COMMAND \"${CMAKE_COMMAND}\" -E create_symlink ../libcalamares.so libcalamares.so WORKING_DIRECTORY \"\$ENV{DESTDIR}/${CMAKE_INSTALL_FULL_LIBDIR}/calamares\" ) execute_process( COMMAND \"${CMAKE_COMMAND}\" -E create_symlink ../libcalamares.so.${CALAMARES_VERSION_SHORT} libcalamares.so WORKING_DIRECTORY \"\$ENV{DESTDIR}/${CMAKE_INSTALL_FULL_LIBDIR}/calamares\" )
") ")
# Install header files # Install header files