1
0

set install paths and files for the system config but allow root prefix

* if not run_in_place is defined. install daemon files and
   if PREFIX defined as part only manage ir
  see commit b3eae2dd818b2e355ca340923ce72aa49fdf66b0
This commit is contained in:
mckaygerhard 2024-06-03 14:53:19 -04:00
parent b3eae2dd81
commit 62af09908d
2 changed files with 8 additions and 8 deletions

View File

@ -12,9 +12,9 @@ stages:
stage: build
script:
- mkdir cmakebuild
- mkdir -p artifact/multicraft/usr/
- mkdir -p artifact
- cd cmakebuild
- cmake -DCMAKE_INSTALL_PREFIX=../artifact/multicraft/usr/ -DBUILD_SERVER=ON -DBUILD_CLIENT=ON -DENABLE_CURL=ON -DENABLE_SOUND=ON -DENABLE_LUAJIT=ON -DENABLE_GETTEXT=ON -DENABLE_FREETYPE=ON -DENABLE_SYSTEM_GMP=ON -DENABLE_SYSTEM_JSONCPP=ON -DCMAKE_VERBOSE_MAKEFILE=ON -DCMAKE_BUILD_TYPE=RelWithDebInfo -DENABLE_POSTGRESQL=ON \
- cmake -DCMAKE_INSTALL_PREFIX=../artifact/usr -DBUILD_SERVER=ON -DBUILD_CLIENT=ON -DENABLE_CURL=ON -DENABLE_SOUND=ON -DENABLE_LUAJIT=ON -DENABLE_GETTEXT=ON -DENABLE_FREETYPE=ON -DENABLE_SYSTEM_GMP=ON -DENABLE_SYSTEM_JSONCPP=ON -DCMAKE_VERBOSE_MAKEFILE=ON -DCMAKE_BUILD_TYPE=RelWithDebInfo -DENABLE_POSTGRESQL=ON \
-DRUN_IN_PLACE=OFF -DCUSTOM_BINDIR=/usr/games -DCUSTOM_LOCALEDIR=/usr/share/locale -DCUSTOM_SHAREDIR=/usr/share/games/multicraft -DCUSTOM_EXAMPLE_CONF_DIR=/etc/multicraft ..
- make -j$(nproc)
- make install
@ -22,7 +22,7 @@ stages:
when: on_success
expire_in: 1y
paths:
- artifact/*
- "artifact/**"
##
## Alpine the limited distro for nonsocial geeks

View File

@ -235,11 +235,11 @@ if(UNIX AND NOT APPLE)
install(FILES "doc/multicraftserver.confd" DESTINATION "${EXAMPLE_CONF_DIR}/conf.d" RENAME "${PROJECT_NAME}server")
install(FILES "doc/multicraftserver.defaults" DESTINATION "${EXAMPLE_CONF_DIR}/defaults" RENAME "${PROJECT_NAME}server")
if(NOT RUN_IN_PLACE)
install(FILES "doc/multicraftserver.init" DESTINATION "${CMAKE_INSTALL_PREFIX}/etc/init.d" RENAME "${PROJECT_NAME}server")
install(FILES "doc/multicraftserver.initd" DESTINATION "${CMAKE_INSTALL_PREFIX}/etc/init.d" RENAME "${PROJECT_NAME}server")
install(FILES "doc/multicraftserver.service" DESTINATION "${CMAKE_INSTALL_PREFIX}/usr/lib/systemd/system")
install(FILES "doc/multicraftserver@.service" DESTINATION "${CMAKE_INSTALL_PREFIX}/usr/lib/systemd/system")
install(FILES "doc/multicraftserver.logrotate" DESTINATION "${CMAKE_INSTALL_PREFIX}/etc/logrotate.d/" RENAME "${PROJECT_NAME}server")
install(FILES "doc/multicraftserver.init" DESTINATION "${CMAKE_INSTALL_PREFIX}/../etc/init.d" RENAME "${PROJECT_NAME}server")
# install(FILES "doc/multicraftserver.initd" DESTINATION "${CMAKE_INSTALL_PREFIX}/etc/init.d" RENAME "${PROJECT_NAME}server")
install(FILES "doc/multicraftserver.service" DESTINATION "${CMAKE_INSTALL_PREFIX}/lib/systemd/system")
install(FILES "doc/multicraftserver@.service" DESTINATION "${CMAKE_INSTALL_PREFIX}/lib/systemd/system")
install(FILES "doc/multicraftserver.logrotate" DESTINATION "${CMAKE_INSTALL_PREFIX}/../etc/logrotate.d/" RENAME "${PROJECT_NAME}server")
endif()
endif()