* Distutils.cmake:
set --prefix=${CMAKE_INSTALL_PREFIX} for python packages installed using
setuptools. it was set to --prefix=/user only when $DESTDIR is set. so
if user installs ceph using -DCMAKE_INSTALL_PREFIX, these python
packages still go to /usr, which is unexpected.
* ceph-disk/CMakeLists.txt:
install script into ${CMAKE_INSTALL_SBINDIR} instead of /usr/sbin
Signed-off-by: Kefu Chai <kchai@redhat.com>
DEPENDS ${py_clone})
cmake_parse_arguments(DU "" INSTALL_SCRIPT "" ${ARGN})
install(CODE "
- set(options)
+ set(options --prefix=${CMAKE_INSTALL_PREFIX})
if(DEFINED ENV{DESTDIR})
if(EXISTS /etc/debian_version)
list(APPEND options --install-layout=deb)
- else()
- list(APPEND options --prefix=/usr)
endif()
list(APPEND options --root=\$ENV{DESTDIR})
if(NOT \"${DU_INSTALL_SCRIPT}\" STREQUAL \"\")
include(Distutils)
distutils_install_module(ceph_disk
- INSTALL_SCRIPT /usr/sbin)
+ INSTALL_SCRIPT ${CMAKE_INSTALL_FULL_SBINDIR})