CPack post (un)install
add post (un)install scripts to musrfit cpack. Currently for rpm only. Furthermore a minimal required root version is added. Will need to see if this is sufficient or if more detailed work needs to be added.
This commit is contained in:
parent
98057629e6
commit
faffd5bcd6
@ -24,13 +24,16 @@ set (CPACK_SET_DESTDIR "OFF")
|
||||
set (CPACK_PACKAGE_RELOCATABLE "true")
|
||||
|
||||
if (${CPACK_GENERATOR} STREQUAL "RPM")
|
||||
set(CPACK_INSTALL_PREFIX "@CMAKE_INSTALL_PREFIX@")
|
||||
set(CPACK_PACKAGING_INSTALL_PREFIX "@CMAKE_INSTALL_PREFIX@")
|
||||
set (CPACK_RPM_PACKAGE_REQUIRES "root >= 6.14.08")
|
||||
set (CPACK_INSTALL_PREFIX "@CMAKE_INSTALL_PREFIX@")
|
||||
set (CPACK_PACKAGING_INSTALL_PREFIX "@CMAKE_INSTALL_PREFIX@")
|
||||
set (CPACK_RPM_FILE_NAME "RPM-DEFAULT")
|
||||
set (CPACK_RPM_PACKAGE_RELEASE "1")
|
||||
set (CPACK_RPM_PACKAGE_LICENSE "GPLv2")
|
||||
set (CPACK_RPM_PACKAGE_VENDOR "Paul Scherrer Institute - LMU - LEM")
|
||||
set (CPACK_RPM_CHANGELOG_FILE "@PROJECT_SOURCE_DIR@/cmake/ChangeLogRPM")
|
||||
set (CPACK_RPM_POST_INSTALL_SCRIPT_FILE "@PROJECT_SOURCE_DIR@/cmake/post_install.sh")
|
||||
set (CPACK_RPM_POST_UNINSTALL_SCRIPT_FILE "@PROJECT_SOURCE_DIR@/cmake/post_uninstall.sh")
|
||||
endif ()
|
||||
|
||||
if (${CPACK_GENERATOR} STREQUAL "DEB")
|
||||
|
14
cmake/post_install.sh
Normal file
14
cmake/post_install.sh
Normal file
@ -0,0 +1,14 @@
|
||||
#!/bin/bash
|
||||
|
||||
echo ">> musrfit post install script started ..."
|
||||
|
||||
# test if nemu-x86_64.conf does not exist
|
||||
if [ ! -f "/etc/ld.so.conf.d/nemu-x86_64.conf" ]
|
||||
then
|
||||
echo "/usr/local/lib" >> /etc/ld.so.conf.d/nemu-x86_64.conf
|
||||
echo "/usr/local/lib64" >> /etc/ld.so.conf.d/nemu-x86_64.conf
|
||||
fi
|
||||
/sbin/ldconfig
|
||||
|
||||
echo ">> musrfit post install script done."
|
||||
|
13
cmake/post_uninstall.sh
Normal file
13
cmake/post_uninstall.sh
Normal file
@ -0,0 +1,13 @@
|
||||
#!/bin/bash
|
||||
|
||||
echo ">> musrfit post uninstall script started ..."
|
||||
|
||||
# test if nemu-x86_64.conf does not exist
|
||||
if [ -f "/etc/ld.so.conf.d/nemu-x86_64.conf" ]
|
||||
then
|
||||
rm -f /etc/ld.so.conf.d/nemu-x86_64.conf
|
||||
fi
|
||||
/sbin/ldconfig
|
||||
|
||||
echo ">> musrfit post uninstall script done."
|
||||
|
Loading…
x
Reference in New Issue
Block a user