mirror of
https://github.com/rd235/cado
synced 2024-12-27 06:24:11 +01:00
[Cmake] Install cleanup
Now a variable is used for the spool file and the installation process is less verbose.
This commit is contained in:
parent
1350a0964c
commit
f74176b388
@ -32,4 +32,7 @@ add_subdirectory(man)
|
|||||||
add_subdirectory(src)
|
add_subdirectory(src)
|
||||||
|
|
||||||
add_custom_target(uninstall
|
add_custom_target(uninstall
|
||||||
"${CMAKE_COMMAND}" -P "${PROJECT_SOURCE_DIR}/Uninstall.cmake")
|
"${CMAKE_COMMAND}"
|
||||||
|
-DCADO_SPOOL_DIR=${CADO_SPOOL_DIR}
|
||||||
|
-P "${PROJECT_SOURCE_DIR}/Uninstall.cmake"
|
||||||
|
)
|
||||||
|
@ -14,12 +14,12 @@ execute_process(COMMAND bash -c "\
|
|||||||
-g _cado \
|
-g _cado \
|
||||||
_cado;
|
_cado;
|
||||||
fi")
|
fi")
|
||||||
execute_process(COMMAND mkdir -p /usr/local/var/spool/cado)
|
execute_process(COMMAND mkdir -p ${CADO_SPOOL_DIR})
|
||||||
execute_process(COMMAND chown root:_cado /usr/local/var/spool/cado)
|
execute_process(COMMAND chown root:_cado ${CADO_SPOOL_DIR})
|
||||||
execute_process(COMMAND chmod 4770 /usr/local/var/spool/cado)
|
execute_process(COMMAND chmod 4770 ${CADO_SPOOL_DIR})
|
||||||
execute_process(COMMAND chown :_cado ${BINDIR}/scado)
|
execute_process(COMMAND chown :_cado ${BINDIR}/scado)
|
||||||
execute_process(COMMAND chmod g+s ${BINDIR}/scado)
|
execute_process(COMMAND chmod g+s ${BINDIR}/scado)
|
||||||
execute_process(COMMAND chown _cado: ${BINDIR}/cado)
|
execute_process(COMMAND chown _cado: ${BINDIR}/cado)
|
||||||
execute_process(COMMAND chmod u+s ${BINDIR}/cado)
|
execute_process(COMMAND chmod u+s ${BINDIR}/cado)
|
||||||
execute_process(COMMAND ldconfig ${LIBDIR})
|
execute_process(COMMAND ldconfig ${LIBDIR})
|
||||||
execute_process(COMMAND ${BINDIR}/cado --setcap)
|
execute_process(COMMAND bash -c "${BINDIR}/cado --setcap >/dev/null 2>&1")
|
||||||
|
@ -31,11 +31,11 @@ if(${remove_user})
|
|||||||
message(FATAL_ERROR "Failed to remove user: '_cado'.")
|
message(FATAL_ERROR "Failed to remove user: '_cado'.")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
message(STATUS "Removing folder: '/usr/local/var/spool/cado'")
|
message(STATUS "Removing folder: '${CADO_SPOOL_DIR}'")
|
||||||
execute_process(
|
execute_process(
|
||||||
COMMAND bash "-c" "rm -r /usr/local/var/spool/cado"
|
COMMAND bash "-c" "rm -r ${CADO_SPOOL_DIR}"
|
||||||
OUTPUT_VARIABLE remove_spool_folder
|
OUTPUT_VARIABLE remove_spool_folder
|
||||||
)
|
)
|
||||||
if("${remove_spool_folder}")
|
if("${remove_spool_folder}")
|
||||||
message(FATAL_ERROR "Failed to remove folder: '/usr/local/var/spool/cado'.")
|
message(FATAL_ERROR "Failed to remove folder: '${CADO_SPOOL_DIR}'.")
|
||||||
endif()
|
endif()
|
||||||
|
@ -2,8 +2,10 @@
|
|||||||
#ifndef _CADO_PATHS_H
|
#ifndef _CADO_PATHS_H
|
||||||
#define _CADO_PATHS_H
|
#define _CADO_PATHS_H
|
||||||
|
|
||||||
|
#include <config.h>
|
||||||
|
|
||||||
/* Spool directory path */
|
/* Spool directory path */
|
||||||
#define SPOOL_DIR "/usr/local/var/spool/cado"
|
#define SPOOL_DIR CADO_SPOOL_DIR
|
||||||
|
|
||||||
/* Cado temporary exe directory path */
|
/* Cado temporary exe directory path */
|
||||||
#define CADO_EXE_DIR "/tmp"
|
#define CADO_EXE_DIR "/tmp"
|
||||||
|
@ -1,84 +1,5 @@
|
|||||||
/* default editor */
|
/* default editor */
|
||||||
#cmakedefine EDITOR "/usr/bin/vi"
|
#cmakedefine EDITOR "/usr/bin/vi"
|
||||||
|
|
||||||
/* Define to 1 if you have the <execs.h> header file. */
|
/* SPOOL Directory for scado */
|
||||||
#cmakedefine HAVE_EXECS_H 1
|
#cmakedefine CADO_SPOOL_DIR "@CADO_SPOOL_DIR@"
|
||||||
|
|
||||||
/* Define to 1 if you have the <fcntl.h> header file. */
|
|
||||||
#cmakedefine HAVE_FCNTL_H 1
|
|
||||||
|
|
||||||
/* Define to 1 if you have the `execs' library (-lexecs). */
|
|
||||||
#cmakedefine HAVE_LIBEXECS 1
|
|
||||||
|
|
||||||
/* Define to 1 if you have the `mhash' library (-lmhash). */
|
|
||||||
#cmakedefine HAVE_LIBMHASH 1
|
|
||||||
|
|
||||||
/* Define to 1 if you have the <mhash.h> header file. */
|
|
||||||
#cmakedefine HAVE_MHASH_H 1
|
|
||||||
|
|
||||||
/* Define to 1 if you have the <security/pam_appl.h> header file. */
|
|
||||||
#cmakedefine HAVE_SECURITY_PAM_APPL_H 1
|
|
||||||
|
|
||||||
/* Define to 1 if you have the <security/pam_misc.h> header file. */
|
|
||||||
#cmakedefine HAVE_SECURITY_PAM_MISC_H 1
|
|
||||||
|
|
||||||
/* Define to 1 if you have the <stdint.h> header file. */
|
|
||||||
#cmakedefine HAVE_STDINT_H 1
|
|
||||||
|
|
||||||
/* Define to 1 if you have the <stdlib.h> header file. */
|
|
||||||
#cmakedefine HAVE_STDLIB_H 1
|
|
||||||
|
|
||||||
/* Define to 1 if you have the `strdup' function. */
|
|
||||||
#cmakedefine HAVE_STRDUP 1
|
|
||||||
|
|
||||||
/* Define to 1 if you have the <string.h> header file. */
|
|
||||||
#cmakedefine HAVE_STRING_H 1
|
|
||||||
|
|
||||||
/* Define to 1 if you have the `strtoull' function. */
|
|
||||||
#cmakedefine HAVE_STRTOULL 1
|
|
||||||
|
|
||||||
/* Define to 1 if you have the <sys/capability.h> header file. */
|
|
||||||
#cmakedefine HAVE_SYS_CAPABILITY_H 1
|
|
||||||
|
|
||||||
/* Define to 1 if you have the <sys/types.h> header file. */
|
|
||||||
#cmakedefine HAVE_SYS_TYPES_H 1
|
|
||||||
|
|
||||||
/* Define to 1 if you have the <unistd.h> header file. */
|
|
||||||
#cmakedefine HAVE_UNISTD_H 1
|
|
||||||
|
|
||||||
/* Name of package */
|
|
||||||
#cmakedefine PACKAGE "cado"
|
|
||||||
|
|
||||||
/* Define to the address where bug reports for this package should be sent. */
|
|
||||||
#cmakedefine PACKAGE_BUGREPORT "info@v2.cs.unibo.it"
|
|
||||||
|
|
||||||
/* Define to the full name of this package. */
|
|
||||||
#cmakedefine PACKAGE_NAME "cado"
|
|
||||||
|
|
||||||
/* Define to the full name and version of this package. */
|
|
||||||
#cmakedefine PACKAGE_STRING "cado 0.9.2"
|
|
||||||
|
|
||||||
/* Define to the one symbol short name of this package. */
|
|
||||||
#cmakedefine PACKAGE_TARNAME "cado"
|
|
||||||
|
|
||||||
/* Define to the version of this package. */
|
|
||||||
#cmakedefine PACKAGE_VERSION "0.9.2"
|
|
||||||
|
|
||||||
/* Version number of package */
|
|
||||||
#cmakedefine VERSION "0.9.2"
|
|
||||||
|
|
||||||
/* Define to `int' if <sys/types.h> doesn't define. */
|
|
||||||
#cmakedefine gid_t
|
|
||||||
|
|
||||||
/* Define to `int' if <sys/types.h> does not define. */
|
|
||||||
#cmakedefine pid_t
|
|
||||||
|
|
||||||
/* Define to `int' if <sys/types.h> does not define. */
|
|
||||||
#cmakedefine ssize_t
|
|
||||||
|
|
||||||
/* Define to `int' if <sys/types.h> doesn't define. */
|
|
||||||
#cmakedefine uid_t
|
|
||||||
|
|
||||||
/* Define to the type of an unsigned integer type of width exactly 64 bits if
|
|
||||||
such a type exists and the standard includes do not define it. */
|
|
||||||
#cmakedefine uint64_t
|
|
||||||
|
@ -40,6 +40,7 @@ if(NOT DEBUILD)
|
|||||||
COMMAND ${CMAKE_COMMAND}
|
COMMAND ${CMAKE_COMMAND}
|
||||||
-DBINDIR=${CMAKE_INSTALL_FULL_BINDIR}
|
-DBINDIR=${CMAKE_INSTALL_FULL_BINDIR}
|
||||||
-DLIBDIR=${CMAKE_INSTALL_FULL_LIBDIR}
|
-DLIBDIR=${CMAKE_INSTALL_FULL_LIBDIR}
|
||||||
|
-DCADO_SPOOL_DIR=${CADO_SPOOL_DIR}
|
||||||
-P ${PROJECT_SOURCE_DIR}/PostInstall.cmake
|
-P ${PROJECT_SOURCE_DIR}/PostInstall.cmake
|
||||||
)"
|
)"
|
||||||
)
|
)
|
||||||
|
Loading…
Reference in New Issue
Block a user