1
0

Compare commits

...

6 Commits

Author SHA1 Message Date
68492e3b63 update ci - try to trick with paths of CI build fix makefile and install ci 2024-06-03 17:02:27 -04:00
2211904cf8 update ci - try to trick with paths of CI build using destdir 2024-06-03 16:32:03 -04:00
8d0c798ade update ci - try to trick with paths of CI build in sync with cmake prefix
* see commit b3eae2dd
2024-06-03 15:50:59 -04:00
8d390b3b10 update ci - try to trick with paths of CI build in sync with cmake custom paths
* see commit b3eae2dd818b2e355ca340923ce72aa49fdf66b0
2024-06-03 14:57:07 -04:00
62af09908d 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
2024-06-03 14:53:19 -04:00
b3eae2dd81 set install paths and files for the system config
* if not run_in_place is defined. install daemon files and
  assume the path of PREFIX/usr/games for binary lauchers,
  not PREFIX/usr/bin
* use FHS as https://www.pathname.com/fhs/2.2/fhs-4.11.html
  that defines the right place for game data files as in the
  path of PREFIX/usr/share/games
* install all the daemons files for openrc, sysvinit and shitstemd
* install defaults and config files as default for daemon scripts
2024-06-03 13:51:09 -04:00
3 changed files with 30 additions and 13 deletions

View File

@ -12,19 +12,17 @@ stages:
stage: build
script:
- mkdir cmakebuild
- mkdir -p artifact/multicraft/usr/
# - mkdir -p games
# - cd games
# - git clone -b stable-5.2 --single-branch https://codeberg.org/minenux/minetest-game-minetest minetest
- mkdir -p artifact
- cd cmakebuild
- cmake -DCMAKE_INSTALL_PREFIX=../artifact/multicraft/usr/ -DBUILD_SERVER=ON -DBUILD_CLIENT=ON -DRUN_IN_PLACE=OFF -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=/usr/ -DBUILD_SERVER=ON -DBUILD_CLIENT=ON -DRUN_IN_PLACE=OFF -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
- make install DESTDIR=../artifact
artifacts:
when: on_success
expire_in: 1y
paths:
- artifact/*
- artifact
##
## Alpine the limited distro for nonsocial geeks

View File

@ -130,11 +130,12 @@ elseif(UNIX) # Linux, BSD etc
set(ICONDIR "unix/icons")
set(LOCALEDIR "locale")
else()
set(SHAREDIR "${CMAKE_INSTALL_PREFIX}/share/${PROJECT_NAME}")
set(BINDIR "${CMAKE_INSTALL_PREFIX}/bin")
set(SHAREDIR "${CMAKE_INSTALL_PREFIX}/share")
set(BINDIR "${CMAKE_INSTALL_PREFIX}/games")
set(DOCDIR "${CMAKE_INSTALL_PREFIX}/share/doc/${PROJECT_NAME}")
set(MANDIR "${CMAKE_INSTALL_PREFIX}/share/man")
set(EXAMPLE_CONF_DIR ${DOCDIR})
set(ETCDIR "${CMAKE_INSTALL_PREFIX}/../etc")
set(EXAMPLE_CONF_DIR "${CMAKE_INSTALL_PREFIX}/../etc/${PROJECT_NAME}")
set(XDG_APPS_DIR "${CMAKE_INSTALL_PREFIX}/share/applications")
set(APPDATADIR "${CMAKE_INSTALL_PREFIX}/share/metainfo")
set(ICONDIR "${CMAKE_INSTALL_PREFIX}/share/icons")
@ -142,6 +143,14 @@ elseif(UNIX) # Linux, BSD etc
endif()
endif()
if(NOT RUN_IN_PLACE)
set(CUSTOM_ETCDIR "" CACHE STRING "Directory to install data files into")
if(NOT CUSTOM_ETCDIR STREQUAL "")
set(ETCDIR "${CUSTOM_ETCDIR}")
message(STATUS "Using ETCDIR=${ETCDIR}")
endif()
endif()
set(CUSTOM_SHAREDIR "" CACHE STRING "Directory to install data files into")
if(NOT CUSTOM_SHAREDIR STREQUAL "")
set(SHAREDIR "${CUSTOM_SHAREDIR}")
@ -157,8 +166,8 @@ endif()
set(CUSTOM_DOCDIR "" CACHE STRING "Directory to install documentation into")
if(NOT CUSTOM_DOCDIR STREQUAL "")
set(DOCDIR "${CUSTOM_DOCDIR}")
if(NOT RUN_IN_PLACE)
set(EXAMPLE_CONF_DIR ${DOCDIR})
if(RUN_IN_PLACE)
set(EXAMPLE_CONF_DIR ".")
endif()
message(STATUS "Using DOCDIR=${DOCDIR}")
endif()
@ -221,7 +230,7 @@ install(FILES "doc/client_lua_api.txt" DESTINATION "${DOCDIR}" COMPONENT "Docs")
install(FILES "doc/menu_lua_api.txt" DESTINATION "${DOCDIR}" COMPONENT "Docs")
install(FILES "doc/texture_packs.txt" DESTINATION "${DOCDIR}" COMPONENT "Docs")
install(FILES "doc/world_format.txt" DESTINATION "${DOCDIR}" COMPONENT "Docs")
install(FILES "multicraft.conf.example" DESTINATION "${EXAMPLE_CONF_DIR}")
install(FILES "multicraft.conf.example" DESTINATION "${EXAMPLE_CONF_DIR}" RENAME "${PROJECT_NAME}.conf")
if(UNIX AND NOT APPLE)
install(FILES "doc/minetest.6" DESTINATION "${MANDIR}/man6" RENAME "${PROJECT_NAME}.6")
@ -232,6 +241,15 @@ if(UNIX AND NOT APPLE)
install(FILES "misc/multicraft-xorg-icon-128.png"
DESTINATION "${ICONDIR}/hicolor/128x128/apps"
RENAME "multicraft.png")
install(FILES "doc/multicraftserver.confd" DESTINATION "${ETCDIR}/conf.d" RENAME "${PROJECT_NAME}server")
install(FILES "doc/multicraftserver.defaults" DESTINATION "${ETCDIR}/defaults" RENAME "${PROJECT_NAME}server")
if(NOT RUN_IN_PLACE)
install(FILES "doc/multicraftserver.init" DESTINATION "${ETCDIR}/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 "${ETCDIR}/logrotate.d/" RENAME "${PROJECT_NAME}server")
endif()
endif()
if(APPLE)

View File

@ -1,4 +1,5 @@
# DEB/RPM based server default distro config file
# for apk place as /etc/conf.d/multicraftserver
# for deb place as /etc/defaults/multicraftserver
# for rpm place as /etc/sysconfig/multicraftserver
USER="multicraft"