Compare commits
6 Commits
acbd75d2bc
...
68492e3b63
Author | SHA1 | Date | |
---|---|---|---|
68492e3b63 | |||
2211904cf8 | |||
8d0c798ade | |||
8d390b3b10 | |||
62af09908d | |||
b3eae2dd81 |
@ -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
|
||||
|
@ -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)
|
||||
|
@ -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"
|
||||
|
Loading…
x
Reference in New Issue
Block a user