Skip to content
Snippets Groups Projects
Commit c5400619 authored by Steven Murray's avatar Steven Murray
Browse files

CASTOR/xrootd/CMakeLists.txt now builds all of its directory, but it still

fails to install.
parent b38902ae
Branches
Tags
No related merge requests found
......@@ -67,13 +67,32 @@ execute_process (
string(REGEX REPLACE "\n" "" CASTOR_DEST_PYTHON_LIBDIR ${CASTOR_DEST_PYTHON_LIBDIR})
message(STATUS "CASTOR_DEST_PYTHON_LIBDIR = '${CASTOR_DEST_PYTHON_LIBDIR}'")
set (CASTOR_BIN_SCRIPT_PERMS
OWNER_READ OWNER_WRITE OWNER_EXECUTE
GROUP_READ OWNER_EXECUTE
WORLD_READ WORLD_EXECUTE)
set (CASTOR_ETC_PERMS
OWNER_READ OWNER_WRITE
GROUP_READ
WORLD_READ )
set (CASTOR_ETC_CRON_D_PERMS
OWNER_READ OWNER_WRITE
GROUP_READ
WORLD_READ )
set (CASTOR_HEADER_PERMS
OWNER_READ OWNER_WRITE
GROUP_READ
WORLD_READ)
set (CASTOR_MAN_PAGE_PERMS
OWNER_READ OWNER_WRITE
GROUP_READ
WORLD_READ)
set (CASTOR_HEADER_PERMS
set (CASTOR_SYSCONFIG_PERMS
OWNER_READ OWNER_WRITE
GROUP_READ
WORLD_READ)
......@@ -108,6 +127,29 @@ function (CastorAddProC _name)
PROPERTY COMPILE_FLAGS "${ORACLE_CPPFLAGS} -Wno-error")
endfunction ()
function (CastorInstallDir _name)
install (CODE
"FILE(MAKE_DIRECTORY \$ENV{DESTDIR}\${CMAKE_INSTALL_PREFIX}\${_name})")
endfunction ()
function (CastorInstallEtc _name)
install (FILES ${_name}
DESTINATION /etc
PERMISSIONS ${CASTOR_ETC_PERMS})
endfunction ()
function (CastorInstallEtcCronD _name)
install (FILES ${_name}
DESTINATION /etc/cron.d
PERMISSIONS ${CASTOR_ETC_CRON_D_PERMS})
endfunction ()
function (CastorInstallScript _name)
install (FILES ${_name}
DESTINATION ${CASTOR_DEST_BIN_DIR}
PERMISSIONS ${CASTOR_BIN_SCRIPT_PERMS})
endfunction ()
function (CastorInstallManPage _name _section)
install (FILES ${_name}.man
DESTINATION ${CASTOR_DEST_MAN_DIR}/man${_section}
......@@ -147,11 +189,6 @@ function (CastorInstallLogrotate _name)
RENAME ${_name})
endfunction ()
set (CASTOR_SYSCONFIG_PERMS
OWNER_READ OWNER_WRITE
GROUP_READ
WORLD_READ)
function (CastorInstallSysconfig _name)
install (FILES ${_name}.sysconfig
DESTINATION /etc/sysconfig
......@@ -234,6 +271,12 @@ if(NOT DEFINED COMPILE_PACKAGING)
set(COMPILE_PACKAGING 1)
endif(NOT DEFINED COMPILE_PACKAGING)
################################################################################
# Create shared directories at install time
################################################################################
CastorInstallDir (/var/log/castor)
CastorInstallDir (/var/spool/castor)
################################################################################
# Include the subdirectories of the project
################################################################################
......
......@@ -267,9 +267,3 @@ set_target_properties (castorclient
PROPERTIES SOVERSION ${MAJOR_CASTOR_VERSION})
target_link_libraries (castorclient castordlf)
install (TARGETS castorclient DESTINATION ${CASTOR_DEST_LIB_DIR})
################################################################################
# Create shared directory strcutures at install time
################################################################################
INSTALL(CODE "FILE(MAKE_DIRECTORY \$ENV{DESTDIR}/var/log/castor)")
INSTALL(CODE "FILE(MAKE_DIRECTORY \$ENV{DESTDIR}/var/spool/castor)")
......@@ -52,6 +52,14 @@ find_library (XROOTD_XRDCLIENT_LIB XrdClient)
find_library (XROOTD_XRDOFS_LIB XrdOfs)
find_library (XROOTD_XRDUTILS_LIB XrdUtils)
message (STATUS "XROOTD_FOUND = ${XROOTD_FOUND}")
message (STATUS "XROOTD_INCLUDE_DIR = ${XROOTD_INCLUDE_DIR}")
message (STATUS "XROOTD_PRIVATE_INCLUDE_DIR = ${XROOTD_PRIVATE_INCLUDE_DIR}")
message (STATUS "XROOTD_XRDCL_LIB = ${XROOTD_XRDCL_LIB}")
message (STATUS "XROOTD_XRDCLIENT_LIB = ${XROOTD_XRDCLIENT_LIB}")
message (STATUS "XROOTD_XRDOFS_LIB = ${XROOTD_XRDOFS_LIB}")
message (STATUS "XROOTD_XRDUTILS_LIB = ${XROOTD_XRDUTILS_LIB}")
include (FindPackageHandleStandardArgs)
find_package_handle_standard_args (xrootd DEFAULT_MSG
XROOTD_INCLUDE_DIR
......
......@@ -84,3 +84,35 @@ add_executable (XrdTransfer XrdTransfer.cpp)
target_link_libraries (XrdTransfer crypto ${XROOTD_XRDCLIENT_LIB}
${XROOTD_XRDUTILS_LIB})
install (TARGETS XrdTransfer DESTINATION ${CASTOR_DEST_BIN_DIR})
################################################################################
# Rules to install the x2cp and x2proc scripts
################################################################################
CastorInstallScript (x2cp)
CastorInstallScript (x2proc)
################################################################################
# Rules to install xrd cron job
################################################################################
CastorInstallEtcCronD (xrd-logs)
################################################################################
# Rules to install example configuration files
################################################################################
CastorInstallEtc (xrd.cf.server.example)
CastorInstallEtc (xrd.cf.manager.example)
CastorInstallSysconfig (xrootd.server.example)
CastorInstallSysconfig (xrootd.manager.example)
################################################################################
# Rules to install the log, spool and run directories of xrootd
################################################################################
CastorInstallDir (/var/log/xrootd/manager)
CastorInstallDir (/var/log/xrootd/server)
CastorInstallDir (/var/log/xrootd/manager/proc)
CastorInstallDir (/var/log/xrootd/server/proc)
CastorInstallDir (/var/spool/xrootd/admin)
CastorInstallDir (/var/spool/xrootd/core)
CastorInstallDir (/var/spool/xrootd/manager)
CastorInstallDir (/var/spool/xrootd/server)
CastorInstallDir (/var/run/xrootd)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment