From 7478c1266b47fde439c2882d835dc56f513ad64e Mon Sep 17 00:00:00 2001 From: Kevin Kofler Date: Fri, 14 Nov 2014 12:30:56 +0100 Subject: [PATCH] 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.) --- src/libcalamares/CMakeLists.txt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/libcalamares/CMakeLists.txt b/src/libcalamares/CMakeLists.txt index 85a4c4e48..966ca9c7d 100644 --- a/src/libcalamares/CMakeLists.txt +++ b/src/libcalamares/CMakeLists.txt @@ -85,11 +85,11 @@ install( TARGETS calamares ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} ) -# Make symlink lib/calamares/libcalamares.so to lib/libcalamares.so so lib/calamares -# can be used as module path for the Python interpreter. +# Make symlink lib/calamares/libcalamares.so to lib/libcalamares.so.VERSION so +# lib/calamares can be used as module path for the Python interpreter. install( CODE " 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