Hi,
I am creating an RPM package, which on a standard installation should
install the file into /opt/ssp-suite directory. But I want to give the
user the opportunity, to install the package into another directory.
I am doing this with these lines:
> set(INSTALL_DIR ${CMAKE_INSTALL_PREFIX}/ssp-suite)
> install(DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/ssp/" DESTINATION
> ${INSTALL_DIR})
and by running cmake with
> cmake -DCMAKE_INSTALL_PREFIX=/opt -V --debug .
But I also need to execute a post script, which runs after installation. I added
> set(CPACK_RPM_POST_INSTALL_SCRIPT_FILE
> "${CMAKE_CURRENT_SOURCE_DIR}/postinstall")
to my CMakeLists.txt and in that script, I am using the RPM variable
$RPM_INSTALL_PREFIX. But during installation, I get this error message
> chmod: cannot access '/usr/usr/bin/startssp': No such file or directory
> warning: %post(ssp-suite-7.1-1.x86_64) scriptlet failed, exit status 1
> Non-fatal POSTIN scriptlet failure in rpm package ssp-suite-7.1-1.x86_64
Can someone give me some hints, how to change / add lines to
CMakeListst.txt and my postinstall script, so that script can be fully
relocatable?
--
Powered by www.kitware.com
Please keep messages on-topic and check the CMake FAQ at:
http://www.cmake.org/Wiki/CMake_FAQ
Kitware offers various services to support the CMake community. For more
information on each offering, please visit:
CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html
Visit other Kitware open-source projects at
http://www.kitware.com/opensource/opensource.html
Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake