linux distro pacakging, added unit files and initscript
* added sisvinit unit service script * added systemshit unit service script * added debian packaging script and fiels in root dir * added spec file for shit rpm distros * added first intent of alpine packaging
This commit is contained in:
parent
516a40f565
commit
b4b66740dc
122
alpine/APKBUILD
Normal file
122
alpine/APKBUILD
Normal file
@ -0,0 +1,122 @@
|
||||
# Maintainer: PICCORO Lenz McKAY <mckaygerhard@gmail.com>
|
||||
pkgname=multicraft
|
||||
pkgver=2.0.3
|
||||
pkgrel=0
|
||||
pkgdesc="Minetest fork infinite-world block sandbox game and a game engine"
|
||||
url="https://www.multicraft.world/"
|
||||
# riscv64 blocked by luajit
|
||||
arch="all !riscv64"
|
||||
license="LGPL-3-or-later AND CC-BY-SA-3.0"
|
||||
pkgusers="multicraft"
|
||||
pkggroups="multicraft"
|
||||
install="$pkgname-server.pre-install"
|
||||
depends="$pkgname-common"
|
||||
makedepends="
|
||||
bzip2-dev
|
||||
cmake
|
||||
curl-dev
|
||||
freetype-dev
|
||||
gettext-dev
|
||||
hiredis-dev
|
||||
libjpeg-turbo-dev
|
||||
libogg-dev
|
||||
libpng-dev
|
||||
libvorbis-dev
|
||||
libxi-dev
|
||||
luajit-dev
|
||||
mesa-dev
|
||||
openal-soft-dev
|
||||
openssl-dev>3
|
||||
samurai
|
||||
sqlite-dev
|
||||
zstd-dev
|
||||
"
|
||||
subpackages="$pkgname-doc
|
||||
$pkgname-common::noarch
|
||||
$pkgname-server
|
||||
$pkgname-server-openrc:openrc
|
||||
"
|
||||
_irrlichtver="1.9.0mt8"
|
||||
source="https://github.com/multicraft/multicraft/archive/refs/tags/$pkgver/multicraft-$pkgver.tar.gz
|
||||
https://github.com/minetest/irrlicht/archive/refs/tags/$_irrlichtver/irrlichtmt-$_irrlichtver.tar.gz
|
||||
multicraft-server.confd
|
||||
multicraft-server.initd
|
||||
0001-CMake-link-with-Intl-when-necessary.patch
|
||||
"
|
||||
|
||||
prepare() {
|
||||
default_prepare
|
||||
|
||||
mv "$srcdir"/irrlicht-$_irrlichtver "$srcdir"/multicraft-$pkgver/lib/irrlichtmt
|
||||
}
|
||||
|
||||
build() {
|
||||
cmake -G Ninja -B build_client \
|
||||
-DCMAKE_BUILD_TYPE=Release \
|
||||
-DCUSTOM_BINDIR=/usr/bin \
|
||||
-DCMAKE_INSTALL_PREFIX=/usr \
|
||||
-DCUSTOM_DOCDIR="/usr/share/doc/$pkgname" \
|
||||
-DCUSTOM_SHAREDIR="/usr/share/$pkgname" \
|
||||
-DBUILD_CLIENT=1 \
|
||||
-DBUILD_SERVER=0 \
|
||||
-DENABLE_REDIS=0 \
|
||||
-DENABLE_CURL=1 \
|
||||
-DRUN_IN_PLACE=0
|
||||
cmake --build build_client
|
||||
|
||||
cmake -G Ninja -B build_server \
|
||||
-DCMAKE_BUILD_TYPE=Release \
|
||||
-DCUSTOM_BINDIR=/usr/bin \
|
||||
-DCMAKE_INSTALL_PREFIX=/usr \
|
||||
-DCUSTOM_DOCDIR="/usr/share/doc/multicraft" \
|
||||
-DCUSTOM_SHAREDIR="/usr/share/multicraft" \
|
||||
-DBUILD_CLIENT=0 \
|
||||
-DBUILD_SERVER=1 \
|
||||
-DENABLE_REDIS=1 \
|
||||
-DENABLE_CURL=1 \
|
||||
-DRUN_IN_PLACE=0
|
||||
cmake --build build_server
|
||||
}
|
||||
|
||||
package() {
|
||||
DESTDIR="$pkgdir" cmake --install build_client
|
||||
}
|
||||
|
||||
common() {
|
||||
pkgdesc="Multicraft files used by both client & server"
|
||||
depends=""
|
||||
|
||||
install -o multicraft -g multicraft -d "$subpkgdir"/var/lib/multicraft
|
||||
amove \
|
||||
usr/share/multicraft/builtin \
|
||||
usr/share/multicraft/games
|
||||
}
|
||||
|
||||
server() {
|
||||
pkgdesc="Multicraft server"
|
||||
depends="$pkgname-common"
|
||||
|
||||
cd "$builddir"
|
||||
install -Dm644 multicraft.conf.example \
|
||||
"$subpkgdir"/etc/multicraft/multicraft.conf
|
||||
install -Dm755 bin/multicraftserver \
|
||||
-t "$subpkgdir"/usr/bin
|
||||
}
|
||||
|
||||
openrc() {
|
||||
pkgdesc="Multicraft server (OpenRC init scripts)"
|
||||
install_if="$pkgname-server openrc"
|
||||
|
||||
install -Dm755 "$srcdir"/multicraft-server.initd \
|
||||
"$subpkgdir"/etc/init.d/multicraft-server
|
||||
install -Dm644 "$srcdir"/multicraft-server.confd \
|
||||
"$subpkgdir"/etc/conf.d/multicraft-server
|
||||
}
|
||||
|
||||
sha512sums="
|
||||
15d2ce3b1150f077ff933a04f0ba8e02c71ee60a0edb636d1511d4e90244a34a14d7e5c4b47bee4de96cd179249a5a6963d7a092084f46c0fa54c9ff431a5265 multicraft-5.6.1.tar.gz
|
||||
3a5cbcd8d13730e08f24a72b4ceb2a6d3ba1cfa4292475915da6413ab8084d0b7f0b5dc34edc152d5bf516730faf43d983433619b0a1fb15540adb5cab00ca10 irrlichtmt-1.9.0mt8.tar.gz
|
||||
7bca17dc0bd59db9c07c160677498aa09297026104e922bf93b7629c274d0aebd226af60c5e82f49ffe3cc5c1e4448e3798b6c2a44144fc6eca4d3aaed3384bb multicraft-server.confd
|
||||
c27aea87468538b48b5e0a66fa5cdde4fc67f3c00a0e57f359a2f044a31c5617d1b5f3dec72e015537ee3bf126bd1073878c0f4447de67db9be2c4cf21416dd7 multicraft-server.initd
|
||||
c815e6c9c5433e4fda9b8559b662086e18b14461e4fd8626b4d5178554a2423c9b243450845d49710825b627dede91de8411655adff7a960672c639735499533 0001-CMake-link-with-Intl-when-necessary.patch
|
||||
"
|
6
alpine/multicraft-server.confd
Normal file
6
alpine/multicraft-server.confd
Normal file
@ -0,0 +1,6 @@
|
||||
#USER="multicraft"
|
||||
#GROUP="games"
|
||||
#LOG="/var/lib/multicraft/multicraftd.log"
|
||||
#CONFIG="/etc/multicraft/multicraft.conf"
|
||||
#ARGS=""
|
||||
GAMEID="minimal"
|
35
alpine/multicraft-server.initd
Normal file
35
alpine/multicraft-server.initd
Normal file
@ -0,0 +1,35 @@
|
||||
#!/sbin/openrc-run
|
||||
|
||||
description="Multicraft server"
|
||||
|
||||
pidfile="/var/run/$SVCNAME.pid"
|
||||
command="/usr/bin/multicraftserver"
|
||||
|
||||
start_stop_daemon_args="--user ${USER:-multicraft} --group ${GROUP:-games}
|
||||
--make-pidfile --pidfile $pidfile --background --quiet --wait 300"
|
||||
command_args="$ARGS"
|
||||
|
||||
|
||||
depend() {
|
||||
need net
|
||||
after firewall
|
||||
}
|
||||
|
||||
optional_command_arg() {
|
||||
if [ -n "$2" ]; then
|
||||
command_args="$command_args $1 $2"
|
||||
fi
|
||||
}
|
||||
|
||||
start_pre() {
|
||||
optional_command_arg --log $LOG
|
||||
optional_command_arg --config $CONFIG
|
||||
optional_command_arg --gameid $GAMEID
|
||||
}
|
||||
|
||||
reload() {
|
||||
ebegin "Reloading $SVCNAME"
|
||||
start-stop-daemon --signal HUP \
|
||||
--exec "$EXEC" --pidfile "$pidfile"
|
||||
eend $?
|
||||
}
|
5
alpine/multicraft-server.pre-install
Normal file
5
alpine/multicraft-server.pre-install
Normal file
@ -0,0 +1,5 @@
|
||||
#!/bin/sh
|
||||
|
||||
adduser -S -D -h /var/lib/multicraft -s /sbin/nologin -G games -g multicraft multicraft 2>/dev/null
|
||||
|
||||
exit 0
|
6
debian/README.Debian
vendored
Normal file
6
debian/README.Debian
vendored
Normal file
@ -0,0 +1,6 @@
|
||||
multicraft for Debian
|
||||
--------------------
|
||||
|
||||
<possible notes regarding this package - if none, delete this file>
|
||||
|
||||
-- unknown <general@unknown> Thu, 29 Dec 2022 17:59:13 -0400
|
10
debian/README.source
vendored
Normal file
10
debian/README.source
vendored
Normal file
@ -0,0 +1,10 @@
|
||||
multicraft for Debian
|
||||
--------------------
|
||||
|
||||
<this file describes information about the source package, see Debian policy
|
||||
manual section 4.14. You WILL either need to modify or delete this file>
|
||||
|
||||
|
||||
|
||||
-- unknown <general@unknown> Thu, 29 Dec 2022 17:59:13 -0400
|
||||
|
13
debian/changelog
vendored
Normal file
13
debian/changelog
vendored
Normal file
@ -0,0 +1,13 @@
|
||||
multicraft (2.0.3-1) unstable; urgency=medium
|
||||
|
||||
* Initial release
|
||||
* added -fpermissive to allow the optimizations on the new release
|
||||
* added libxxf86vm to build depends due non recursive in older debians
|
||||
* added missing libnl-genl-3-dev with alternative on wheezy or squeeze
|
||||
* in control added a large line due OBS service is crap on depends (using rpm as real)
|
||||
* added spatialindex support
|
||||
* Drop luajit-2.1.patch. Fixed upstream.
|
||||
* alternate between python-imaging to python-pil for backporting (Closes: #866441)
|
||||
|
||||
-- PICCORO Lenz McKAY <mckaygerhard@gmail.com> Thu, 29 Dec 2022 17:59:13 -0400
|
||||
|
1
debian/compat
vendored
Normal file
1
debian/compat
vendored
Normal file
@ -0,0 +1 @@
|
||||
7
|
75
debian/control
vendored
Normal file
75
debian/control
vendored
Normal file
@ -0,0 +1,75 @@
|
||||
Source: multicraft
|
||||
Section: games
|
||||
Priority: optional
|
||||
Maintainer: PICCORO Lenz McKAY <mckaygerhard@gmail.com>
|
||||
Build-Depends: cmake, pkg-config,
|
||||
debhelper (>= 10) | dh-systemd | dh-autoreconf, lsb-release,
|
||||
cron,
|
||||
gettext, doxygen,
|
||||
libbz2-dev,
|
||||
libcurl4-gnutls-dev, libnl-genl-3-dev | libnl-dev | libnl-3-dev, librtmp-dev, libidn11-dev, libncurses-dev | libncurses5-dev,
|
||||
libfreetype6-dev,
|
||||
libglu1-mesa-dev,
|
||||
libgmp3-dev | libgmp-dev,
|
||||
libirrlicht-dev (>= 1.7.0),
|
||||
libjpeg-dev,
|
||||
libjsoncpp-dev,
|
||||
libleveldb-dev,
|
||||
libluajit-5.1-dev [i386 amd64 kfreebsd-i386 armel armhf powerpc powerpcspe mips],
|
||||
liblua5.1-dev,
|
||||
libogg-dev,
|
||||
libopenal-dev,
|
||||
libpng-dev,
|
||||
libpq-dev,
|
||||
libspatialindex-dev,
|
||||
libsqlite3-dev,
|
||||
libvorbis-dev,
|
||||
libx11-dev,
|
||||
libxxf86vm-dev,
|
||||
postgresql-server-dev-all | libpq-dev,
|
||||
zlib1g-dev
|
||||
Standards-Version: 4.1.4
|
||||
Homepage: https://www.multicraft.world/
|
||||
Rules-Requires-Root: no
|
||||
|
||||
Package: multicraft
|
||||
Architecture: any
|
||||
Depends: multicraft-data (= ${source:Version}), ${misc:Depends}, ${shlibs:Depends}
|
||||
Recommends: multicraft-game | multicraft-game-game
|
||||
Description: Multiplayer infinite-world block sandbox (client with embebed server)
|
||||
Multicraft is a minecraft-inspired game written from scratch and licensed
|
||||
under the LGPL (version 2.1 or later). It supports both survival and creative
|
||||
modes along with multiplayer support, dynamic lighting, and an "infinite" map
|
||||
generator.
|
||||
.
|
||||
This is a improved upgrade over 5.2 series due 5.X one superset and changed
|
||||
the protocol of network.
|
||||
|
||||
Package: multicraft-server
|
||||
Architecture: any
|
||||
Depends: multicraft-data (= ${source:Version}), adduser, lsb-base (>= 3.0-6), ${misc:Depends}, ${shlibs:Depends}
|
||||
Recommends: multicraft-game | multicraft-game-game
|
||||
Description: Multiplayer infinite-world block sandbox (server only)
|
||||
Multicraft is a minecraft-inspired game written from scratch and licensed
|
||||
under the LGPL (version 2.1 or later). It supports both survival and creative
|
||||
modes along with multiplayer support, dynamic lighting, and an "infinite" map
|
||||
generator.
|
||||
.
|
||||
This is the multicraft server package.
|
||||
This is a improved upgrade over 5.2 series due 5.X one superset and changed
|
||||
the protocol of network.
|
||||
|
||||
Package: multicraft-data
|
||||
Architecture: all
|
||||
Depends: adduser,${misc:Depends}
|
||||
Provides: multicraft-game, multicraft-game-minenux
|
||||
Description: Multiplayer infinite-world block sandbox (data files)
|
||||
Multicraft is a minecraft-inspired game written from scratch and licensed
|
||||
under the LGPL (version 2.1 or later). It supports both survival and creative
|
||||
modes along with multiplayer support, dynamic lighting, and an "infinite" map
|
||||
generator.
|
||||
.
|
||||
These are the files used by both client and server packages, such as
|
||||
the textures and other graphical files and the standard mods.
|
||||
This is a improved upgrade over 5.2 series due 5.X one superset and changed
|
||||
the protocol of network.
|
1626
debian/copyright
vendored
Normal file
1626
debian/copyright
vendored
Normal file
File diff suppressed because it is too large
Load Diff
9
debian/multicraft-data.install
vendored
Normal file
9
debian/multicraft-data.install
vendored
Normal file
@ -0,0 +1,9 @@
|
||||
usr/share/doc/multicraft
|
||||
usr/share/games/multicraft/builtin
|
||||
usr/share/games/multicraft/client
|
||||
usr/share/games/multicraft/games
|
||||
usr/share/games/multicraft/textures
|
||||
usr/share/games/multicraft/fonts
|
||||
usr/share/locale
|
||||
usr/share/metainfo/net.minetest.multicraft.appdata.xml usr/share/metainfo/
|
||||
usr/share/icons/hicolor/128x128/apps/multicraft.png
|
49
debian/multicraft-server.README.Debian
vendored
Normal file
49
debian/multicraft-server.README.Debian
vendored
Normal file
@ -0,0 +1,49 @@
|
||||
multicraft-server for Debian
|
||||
==========================
|
||||
|
||||
Since version 0.4.10+repack-3 Debian supports running multiple Minetest servers.
|
||||
An unprivileged system-wide user, Debian-minetest, controls the server.
|
||||
|
||||
* The home directory of this user is /var/games/multicraft.
|
||||
* All log files are written to /var/log/multicraft.
|
||||
* The default server configuration is located at /etc/multicraft/multicraft.conf.
|
||||
|
||||
systemd (default init system)
|
||||
=============================
|
||||
|
||||
Debian's Minetest server supports template units. You can start multiple
|
||||
servers by specifying the name of your configuration files on the command-line.
|
||||
|
||||
# This command will start the server with the default configuration,
|
||||
# /etc/multicraft/multicraft.conf
|
||||
|
||||
systemctl start multicraftserver@multicraft.service
|
||||
|
||||
# For running a second PvP server, you can create another configuration
|
||||
# file /etc/multicraft/pvp.conf and then start the server with
|
||||
|
||||
systemctl start multicraftserver@pvp.service
|
||||
|
||||
The new log file will then be written to /var/log/multicraft/multicraft-pvp.log.
|
||||
|
||||
SysV
|
||||
====
|
||||
|
||||
You can start the server with default multicraft.conf configuration by using the
|
||||
service command.
|
||||
|
||||
service multicraftserver start
|
||||
|
||||
and stop it with
|
||||
|
||||
service multicraftserver stop
|
||||
|
||||
To disable the init script use the facilities provided by your init system. For
|
||||
instance, under sysvinit, use
|
||||
|
||||
update-rc.d multicraftserver disable
|
||||
|
||||
or under systemd, use
|
||||
|
||||
systemctl disable multicraftserver@multicraft.service
|
||||
|
81
debian/multicraft-server.init
vendored
Normal file
81
debian/multicraft-server.init
vendored
Normal file
@ -0,0 +1,81 @@
|
||||
#! /bin/sh
|
||||
### BEGIN INIT INFO
|
||||
# Provides: minetest4-server
|
||||
# Required-Start: $remote_fs $network
|
||||
# Required-Stop: $remote_fs $network
|
||||
# Default-Start: 2 3 4 5
|
||||
# Default-Stop: 0 1 6
|
||||
# Short-Description: Start multicraft network game server
|
||||
# Description: dedicated game server for multicraft
|
||||
### END INIT INFO
|
||||
|
||||
PATH="/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin"
|
||||
NAME="multicraftserver"
|
||||
DAEMON="/usr/games/multicraftserver"
|
||||
DESC="multicraft VenenuX server"
|
||||
PIDFILE="/var/run/$NAME.pid"
|
||||
BINARY="/usr/games/multicraftserver"
|
||||
USER="multicraft"
|
||||
DAEMON_OPTS="--config /etc/multicraft/multicraft.conf --logfile /var/log/multicraft/multicraft.log"
|
||||
|
||||
test -x $DAEMON || exit 0
|
||||
|
||||
. /lib/lsb/init-functions
|
||||
|
||||
# Include defaults if available
|
||||
if [ -f /etc/default/$NAME ] ; then
|
||||
. /etc/default/$NAME
|
||||
fi
|
||||
|
||||
multicraft_start() {
|
||||
start-stop-daemon \
|
||||
--start \
|
||||
--quiet \
|
||||
--pidfile $PIDFILE \
|
||||
--oknodo \
|
||||
--background \
|
||||
--exec $BINARY \
|
||||
--startas $DAEMON \
|
||||
--make-pidfile --chuid $USER \
|
||||
-- $DAEMON_OPTS > /dev/null 2>&1 || return 1
|
||||
return 0
|
||||
}
|
||||
|
||||
multicraft_stop() {
|
||||
start-stop-daemon \
|
||||
--stop \
|
||||
--quiet \
|
||||
--pidfile $PIDFILE \
|
||||
--oknodo \
|
||||
--exec $BINARY || return 1
|
||||
rm -f $PIDFILE
|
||||
return 0
|
||||
}
|
||||
|
||||
case "$1" in
|
||||
start)
|
||||
log_begin_msg "Starting $DESC: $NAME"
|
||||
multicraft_start
|
||||
log_end_msg $?
|
||||
;;
|
||||
stop)
|
||||
log_begin_msg "Stopping $DESC: $NAME"
|
||||
multicraft_stop
|
||||
log_end_msg $?
|
||||
;;
|
||||
restart|force-reload)
|
||||
log_begin_msg "Restarting $DESC: $NAME"
|
||||
multicraft_stop && sleep 1 && multicraft_start
|
||||
log_end_msg $?
|
||||
;;
|
||||
status)
|
||||
status_of_proc -p "$PIDFILE" "$DAEMON" "$NAME" && exit 0 || exit $?
|
||||
;;
|
||||
*)
|
||||
# echo "Usage: $0 {start|stop|restart|reload|force-reload}" >&2
|
||||
echo "Usage: $0 {start|stop|restart|force-reload|status}" >&2
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
||||
exit 0
|
2
debian/multicraft-server.install
vendored
Normal file
2
debian/multicraft-server.install
vendored
Normal file
@ -0,0 +1,2 @@
|
||||
usr/bin/multicraftserver usr/games
|
||||
usr/share/man/man6/multicraftserver.6
|
32
debian/multicraft-server.postinst
vendored
Normal file
32
debian/multicraft-server.postinst
vendored
Normal file
@ -0,0 +1,32 @@
|
||||
#!/bin/sh
|
||||
|
||||
set -e
|
||||
|
||||
case "$1" in
|
||||
configure)
|
||||
if ! getent passwd multicraft >/dev/null; then
|
||||
adduser \
|
||||
--disabled-password \
|
||||
--quiet \
|
||||
--system \
|
||||
--home /var/games/multicraft \
|
||||
--no-create-home \
|
||||
--gecos "multicraftserver" \
|
||||
--ingroup games \
|
||||
--force-badname multicraft
|
||||
fi
|
||||
install -d /var/games
|
||||
install -d /var/games/multicraft
|
||||
install -d /var/log/multicraft
|
||||
chown multicraft:games /var/games/multicraft
|
||||
chown multicraft:games /var/log/multicraft
|
||||
;;
|
||||
abort-upgrade|abort-remove|abort-deconfigure)
|
||||
;;
|
||||
*)
|
||||
echo "postinst called with unknown argument \`$1'" >&2
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
||||
#DEBHELPER#
|
15
debian/multicraft-server.postrm
vendored
Normal file
15
debian/multicraft-server.postrm
vendored
Normal file
@ -0,0 +1,15 @@
|
||||
#!/bin/sh
|
||||
|
||||
set -e
|
||||
|
||||
|
||||
if [ "$1" = "purge" ] ; then
|
||||
if getent passwd multicraft >/dev/null; then
|
||||
deluser --remove-home multicraft >/dev/null
|
||||
fi
|
||||
rm -r /var/games/multicraft
|
||||
rm -r /var/log/multicraft
|
||||
rmdir --ignore-fail-on-non-empty /var/games
|
||||
fi
|
||||
|
||||
#DEBHELPER#
|
3
debian/multicraft.install
vendored
Normal file
3
debian/multicraft.install
vendored
Normal file
@ -0,0 +1,3 @@
|
||||
usr/bin/multicraft /usr/games
|
||||
usr/share/applications/net.minetest.multicraft.desktop /usr/share/applications
|
||||
usr/share/man/man6/multicraft.6
|
25
debian/patches/01-kfreebsd-debian-gettex-glibc.patch
vendored
Normal file
25
debian/patches/01-kfreebsd-debian-gettex-glibc.patch
vendored
Normal file
@ -0,0 +1,25 @@
|
||||
From: Matthew Bekkema <mat8913ftw@gmail.com>
|
||||
Date: Sun, 4 Jan 2015 20:49:22 +0100
|
||||
Subject: kfreebsd-gettext
|
||||
|
||||
Fix the build on kFreeBSD as it uses glibc
|
||||
---
|
||||
cmake/Modules/FindGettextLib.cmake | 7 ++++---
|
||||
1 file changed, 4 insertions(+), 3 deletions(-)
|
||||
|
||||
--- a/cmake/Modules/FindGettextLib.cmake
|
||||
+++ b/cmake/Modules/FindGettextLib.cmake
|
||||
@@ -60,9 +60,10 @@ find_package_handle_standard_args(Gettex
|
||||
|
||||
if(GETTEXTLIB_FOUND)
|
||||
# BSD variants require special linkage as they don't use glibc
|
||||
- if(${CMAKE_SYSTEM_NAME} MATCHES "BSD|DragonFly")
|
||||
- set(GETTEXT_LIBRARY "intl")
|
||||
- endif()
|
||||
+ # DEBIAN CHANGE: kFreeBSD still uses glibc
|
||||
+# if(${CMAKE_SYSTEM_NAME} MATCHES "BSD|DragonFly")
|
||||
+# set(GETTEXT_LIBRARY "intl")
|
||||
+# endif()
|
||||
|
||||
set(GETTEXT_PO_PATH ${CMAKE_SOURCE_DIR}/po)
|
||||
set(GETTEXT_MO_BUILD_PATH ${CMAKE_BINARY_DIR}/locale/<locale>/LC_MESSAGES)
|
20
debian/patches/03-rawlua.patch
vendored
Normal file
20
debian/patches/03-rawlua.patch
vendored
Normal file
@ -0,0 +1,20 @@
|
||||
From: Markus Koschany <apo@debian.org>
|
||||
Date: Sun, 4 Jun 2017 21:50:23 +0200
|
||||
Subject: rawlua
|
||||
|
||||
Forwarded: no
|
||||
|
||||
--- minetest4-4.0.18.orig/cmake/Modules/FindLua.cmake
|
||||
+++ minetest4-4.0.18/cmake/Modules/FindLua.cmake
|
||||
@@ -21,8 +21,7 @@ else()
|
||||
endif()
|
||||
|
||||
if(NOT USE_LUAJIT)
|
||||
- message(STATUS "LuaJIT not found, using bundled Lua.")
|
||||
- set(LUA_LIBRARY lua)
|
||||
- set(LUA_INCLUDE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/lib/lua/src)
|
||||
- add_subdirectory(lib/lua)
|
||||
+ message(STATUS "LuaJIT not found, using the version of Lua provided by the system.")
|
||||
+ set(LUA_INCLUDE_DIR "/usr/include/lua5.1/")
|
||||
+ set(LUA_LIBRARY "lua5.1")
|
||||
endif()
|
19
debian/patches/04-postgresql.patch
vendored
Normal file
19
debian/patches/04-postgresql.patch
vendored
Normal file
@ -0,0 +1,19 @@
|
||||
From: Markus Koschany <apo@debian.org>
|
||||
Date: Sat, 1 Feb 2020 23:36:10 +0100
|
||||
Subject: postgresql
|
||||
|
||||
Fix for not finding PostgreSQL.
|
||||
---
|
||||
src/CMakeLists.txt | 1 +
|
||||
1 file changed, 1 insertion(+)
|
||||
|
||||
--- a/src/CMakeLists.txt
|
||||
+++ b/src/CMakeLists.txt
|
||||
@@ -170,6 +170,7 @@ option(ENABLE_POSTGRESQL "Enable Postgre
|
||||
set(USE_POSTGRESQL FALSE)
|
||||
|
||||
if(ENABLE_POSTGRESQL)
|
||||
+ set(PostgreSQL_TYPE_INCLUDE_DIR /usr/include/postgresql/)
|
||||
find_package("PostgreSQL")
|
||||
|
||||
if(PostgreSQL_FOUND)
|
3
debian/patches/series
vendored
Normal file
3
debian/patches/series
vendored
Normal file
@ -0,0 +1,3 @@
|
||||
#01-kfreebsd-debian-gettex-glibc.patch
|
||||
#03-rawlua.patch
|
||||
#04-postgresql.patch
|
75
debian/rules
vendored
Executable file
75
debian/rules
vendored
Executable file
@ -0,0 +1,75 @@
|
||||
#!/usr/bin/make -f
|
||||
|
||||
export DH_VERBOSE = 1
|
||||
DH_VERBOSE = 1
|
||||
export VERBOSE = 1
|
||||
VERBOSE = 1
|
||||
|
||||
DEB_HOST_MULTIARCH ?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH)
|
||||
DEB_HOST_ARCH := $(shell dpkg-architecture -qDEB_HOST_ARCH)
|
||||
DEB_BUILD_ARCH ?= $(shell dpkg-architecture -qDEB_BUILD_ARCH)
|
||||
|
||||
ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
|
||||
CUFLAGS = -O0
|
||||
else
|
||||
CUFLAGS = -O2 -fomit-frame-pointer -fexpensive-optimizations -fpermissive -Wall
|
||||
ifneq (,$(findstring i386,$(DEB_BUILD_ARCH)))
|
||||
CUFLAGS = -m32 -O3 -fomit-frame-pointer -fexpensive-optimizations -march=pentium3 -mtune=nocona -mmmx -msse -mno-sse2 -mno-sse3 -fpermissive -mfpmath=sse -Wall
|
||||
endif
|
||||
ifneq (,$(findstring i486,$(DEB_BUILD_ARCH)))
|
||||
CUFLAGS = -m32 -O3 -fomit-frame-pointer -fexpensive-optimizations -march=pentium3 -mtune=nocona -mmmx -msse -mno-sse2 -mno-sse3 -fpermissive -mfpmath=sse -Wall
|
||||
endif
|
||||
ifneq (,$(findstring amd64,$(DEB_BUILD_ARCH)))
|
||||
CUFLAGS = -O3 -fomit-frame-pointer -fexpensive-optimizations -mtune=nocona -mmmx -msse -msse2 -fpermissive -mfpmath=sse -Wall
|
||||
endif
|
||||
endif
|
||||
export CFLAGS=$(CUFLAGS)
|
||||
export CXXFLAGS=$(CUFLAGS)
|
||||
export DEB_CFLAGS_MAINT_APPEND = $(CUFLAGS)
|
||||
export DEB_CXXFLAGS_MAINT_APPEND = $(CUFLAGS)
|
||||
|
||||
export DEB_BUILD_MAINT_OPTIONS = hardening=+fortify,+stackprotector,+relro,+bindnow,-pie
|
||||
# older bz comprension
|
||||
export DEB_DH_BUILDDEB_ARGS = -- -Zbzip2
|
||||
# avoid useless dependencies
|
||||
export DEB_LDFLAGS_MAINT_APPEND = -Wl,--as-needed
|
||||
|
||||
override_dh_auto_configure:
|
||||
dh_auto_configure -- \
|
||||
-DRUN_IN_PLACE=0 \
|
||||
-DCMAKE_VERBOSE_MAKEFILE=ON \
|
||||
-DENABLE_SPATIAL=ON \
|
||||
-DENABLE_SYSTEM_JSONCPP=1 \
|
||||
-DENABLE_SYSTEM_GMP=1 \
|
||||
-DJSON_INCLUDE_DIR=/usr/include/jsoncpp \
|
||||
-DENABLE_GETTEXT=1 \
|
||||
-DENABLE_FREETYPE=1 \
|
||||
-DFREETYPE_INCLUDE_DIR_freetype2=/usr/include/freetype2 \
|
||||
-DFREETYPE_INCLUDE_DIR_ft2build=/usr/include \
|
||||
-DENABLE_LEVELDB=1 \
|
||||
-DENABLE_LUAJIT=ON \
|
||||
-DENABLE_POSTGRESQL=1 \
|
||||
-DLEVELDB_INCLUDE_DIR=/usr/include/leveldb \
|
||||
-DCUSTOM_LOCALEDIR=/usr/share/locale \
|
||||
-DCUSTOM_SHAREDIR=/usr/share/games/multicraft \
|
||||
-DCMAKE_INSTALL_PREFIX=/usr \
|
||||
-DBUILD_SERVER=1 -DCMAKE_BUILD_TYPE=Release
|
||||
|
||||
|
||||
override_dh_installchangelogs:
|
||||
# dh_installchangelogs debian/changelog.upstream
|
||||
|
||||
override_dh_install:
|
||||
find . -iname "license.txt" -delete
|
||||
dh_install --list-missing
|
||||
|
||||
override_dh_clean:
|
||||
dh_clean
|
||||
$(RM) -r bin
|
||||
$(RM) -r lib/jsoncpp lib/gmp
|
||||
|
||||
override_dh_builddeb:
|
||||
dh_builddeb -- -Zgzip
|
||||
|
||||
%:
|
||||
dh ${@}
|
1
debian/source/format
vendored
Normal file
1
debian/source/format
vendored
Normal file
@ -0,0 +1 @@
|
||||
3.0 (quilt)
|
38
debian/watch.ex
vendored
Normal file
38
debian/watch.ex
vendored
Normal file
@ -0,0 +1,38 @@
|
||||
# Example watch control file for uscan
|
||||
# Rename this file to "watch" and then you can run the "uscan" command
|
||||
# to check for upstream updates and more.
|
||||
# See uscan(1) for format
|
||||
|
||||
# Compulsory line, this is a version 4 file
|
||||
version=4
|
||||
|
||||
# PGP signature mangle, so foo.tar.gz has foo.tar.gz.sig
|
||||
#opts="pgpsigurlmangle=s%$%.sig%"
|
||||
|
||||
# HTTP site (basic)
|
||||
#http://example.com/downloads.html \
|
||||
# files/multicraft-([\d\.]+)\.tar\.gz debian uupdate
|
||||
|
||||
# Uncomment to examine an FTP server
|
||||
#ftp://ftp.example.com/pub/multicraft-(.*)\.tar\.gz debian uupdate
|
||||
|
||||
# SourceForge hosted projects
|
||||
# http://sf.net/multicraft/ multicraft-(.*)\.tar\.gz debian uupdate
|
||||
|
||||
# GitHub hosted projects
|
||||
#opts="filenamemangle=s%(?:.*?)?v?(\d[\d.]*)\.tar\.gz%<project>-$1.tar.gz%" \
|
||||
# https://github.com/<user>/multicraft/tags \
|
||||
# (?:.*?/)?v?(\d[\d.]*)\.tar\.gz debian uupdate
|
||||
|
||||
# PyPI
|
||||
# https://pypi.debian.net/multicraft/multicraft-(.+)\.(?:zip|tgz|tbz|txz|(?:tar\.(?:gz|bz2|xz)))
|
||||
|
||||
# Direct Git
|
||||
# opts="mode=git" http://git.example.com/multicraft.git \
|
||||
# refs/tags/v([\d\.]+) debian uupdate
|
||||
|
||||
|
||||
|
||||
|
||||
# Uncomment to find new files on GooglePages
|
||||
# http://example.googlepages.com/foo.html multicraft-(.*)\.tar\.gz
|
232
misc/multicraf.spec
Normal file
232
misc/multicraf.spec
Normal file
@ -0,0 +1,232 @@
|
||||
Name: multicraft
|
||||
Version: 2.0.3
|
||||
Release: 1%{?dist}
|
||||
Summary: Minenux Multicraft Minetest fork for sandbox infinite block world
|
||||
|
||||
License: LGPLv2+ and CC-BY-SA
|
||||
URL: https://codeberg.org/minenux/minetest-engine-multicraft
|
||||
|
||||
Source0: %{name}_%{version}.orig.tar.gz
|
||||
|
||||
#Patch0001: 0001-mapper.patch
|
||||
|
||||
%if 0%{?rhel}
|
||||
ExclusiveArch: %{ix86} x86_64
|
||||
%else
|
||||
# LuaJIT arches
|
||||
ExclusiveArch: %{arm} %{ix86} x86_64 %{mips} aarch64 ppc64le
|
||||
%endif
|
||||
|
||||
BuildRequires: gcc
|
||||
BuildRequires: gcc-c++
|
||||
BuildRequires: cmake >= 3.0
|
||||
BuildRequires: irrlicht-devel
|
||||
BuildRequires: jsoncpp-devel
|
||||
BuildRequires: luajit-devel
|
||||
BuildRequires: bzip2-devel gettext-devel sqlite-devel zlib-devel
|
||||
BuildRequires: libpng-devel libjpeg-turbo-devel libXxf86vm mesa-libGL-devel
|
||||
BuildRequires: desktop-file-utils
|
||||
BuildRequires: systemd
|
||||
BuildRequires: openal-soft-devel
|
||||
BuildRequires: libvorbis-devel
|
||||
BuildRequires: libcurl-devel libidn-devel
|
||||
BuildRequires: leveldb-devel
|
||||
BuildRequires: gmp-devel
|
||||
BuildRequires: libappstream-glib
|
||||
BuildRequires: freetype-devel
|
||||
|
||||
Requires: %{name}-server = %{version}-%{release}
|
||||
Requires: %{name}-data = %{version}-%{release}
|
||||
Requires: hicolor-icon-theme
|
||||
|
||||
%description
|
||||
Game of mining, crafting and building in the infinite world of cubic blocks with
|
||||
optional hostile creatures, features both single and the network multiplayer
|
||||
mode, mods. Public multiplayer servers are available.
|
||||
|
||||
%package server
|
||||
Summary: multicraft multiplayer server only for LAN and network remote play
|
||||
|
||||
Requires(pre): shadow-utils
|
||||
Requires(post): systemd
|
||||
Requires(preun): systemd
|
||||
Requires(postun): systemd
|
||||
Requires: %{name}-data = %{version}-%{release}
|
||||
|
||||
%description server
|
||||
Game of mining, crafting and building in the infinite world of cubic
|
||||
blocks with optional hostile creatures, features both single and the
|
||||
network multiplayer mode. This is Multicraft multiplayer server only serve the game to connect to
|
||||
|
||||
%package data
|
||||
Summary: multicraft common data between client and server
|
||||
|
||||
%description data
|
||||
Multicraft common data. This package is shared between multicraft server and client.
|
||||
|
||||
%if 0%{?fedora_version} > 32
|
||||
%global debug_package %{nil}
|
||||
%endif
|
||||
|
||||
%prep
|
||||
%autosetup -p1
|
||||
|
||||
#game datapackage are included
|
||||
#cp %{SOURCE4} /doc
|
||||
|
||||
# purge bundled jsoncpp and lua, and gmp :P
|
||||
rm -vrf lib/jsoncpp lib/lua lib/gmp
|
||||
|
||||
find . -name .gitignore -print -delete
|
||||
find . -name .travis.yml -print -delete
|
||||
find . -name .luacheckrc -print -delete
|
||||
|
||||
%build
|
||||
%undefine _hardened_build
|
||||
%undefine _annotated_build
|
||||
%undefine _strict_symbol_defs_build
|
||||
CFLAGS="-O3 -fomit-frame-pointer -Wall -ffp-contract=off"
|
||||
CXXFLAGS="-O3 -fomit-frame-pointer -Wall -ffp-contract=off -fpermissive"
|
||||
LDFLAGS="-Wl,-z,relro -Wl,--as-needed -Wl,-z,now"
|
||||
%ifarch x86_64
|
||||
CFLAGS="-O3 -fomit-frame-pointer -mtune=nocona -mmmx -msse -msse2 -Wall -ffp-contract=off"
|
||||
CXXFLAGS="-O3 -fomit-frame-pointer -mtune=nocona -mmmx -msse -msse2 -Wall -ffp-contract=off -fpermissive"
|
||||
%endif
|
||||
%ifarch %{ix86}
|
||||
CFLAGS="-O3 -march=pentium3 -mtune=nocona -mfpmath=sse -fomit-frame-pointer -mmmx -msse -msse2 -mno-sse4 -mno-sse3 -fpermissive -Wall -fexpensive-optimizations"
|
||||
CXXFLAGS="-O3 -march=pentium3 -mtune=nocona -mfpmath=sse -fomit-frame-pointer -mmmx -msse -msse2 -mno-sse4 -mno-sse3 -fpermissive -Wall -fexpensive-optimizations -fpermissive"
|
||||
%endif
|
||||
%ifarch aarch64
|
||||
%define _lto_cflags %{nil}
|
||||
%endif
|
||||
# -DFREETYPE_INCLUDE_DIR_freetype2=/usr/include/freetype2 \
|
||||
# -DFREETYPE_INCLUDE_DIR_ft2build=/usr/include \
|
||||
# -DLEVELDB_INCLUDE_DIR=/usr/include/leveldb \
|
||||
%cmake -DENABLE_CURL=TRUE \
|
||||
-DENABLE_LEVELDB=TRUE \
|
||||
-DENABLE_LUAJIT=TRUE \
|
||||
-DENABLE_GETTEXT=TRUE \
|
||||
-DENABLE_SOUND=TRUE \
|
||||
-DENABLE_SYSTEM_JSONCPP=TRUE \
|
||||
-DENABLE_SYSTEM_GMP=TRUE \
|
||||
-DENABLE_FREETYPE=TRUE \
|
||||
-DBUILD_SERVER=TRUE \
|
||||
-DBUILD_CLIENT=TRUE \
|
||||
-DRUN_IN_PLACE=0 \
|
||||
-DCMAKE_VERBOSE_MAKEFILE=ON \
|
||||
-DCMAKE_INSTALL_PREFIX=/usr \
|
||||
-DCUSTOM_LOCALEDIR=%{_datadir}/locale \
|
||||
-DCUSTOM_SHAREDIR=%{_datadir}/games/%{name} \
|
||||
-DENABLE_POSTGRESQL=1 \
|
||||
-DJSON_INCLUDE_DIR=/usr/include/json \
|
||||
%{nil}
|
||||
%if 0%{?fedora_version} > 32
|
||||
%cmake_build
|
||||
%else
|
||||
make %{?_smp_mflags} VERBOSE=1
|
||||
%endif
|
||||
|
||||
|
||||
%install
|
||||
%if 0%{?fedora_version} > 32
|
||||
%cmake_install
|
||||
%else
|
||||
%make_install
|
||||
%endif
|
||||
|
||||
# Add desktop file is done by install
|
||||
#desktop-file-install --dir=%{buildroot}%{_datadir}/applications %{SOURCE1}
|
||||
|
||||
# Systemd unit file
|
||||
# mkdir -p %{buildroot}%{_unitdir}/
|
||||
# install -m 0644 %{SOURCE3} %{buildroot}%{_unitdir}
|
||||
|
||||
# /etc/rsyslog.d/multicraft.conf
|
||||
# mkdir -p %{buildroot}%{_sysconfdir}/rsyslog.d/
|
||||
# install -m 0644 %{SOURCE1} %{buildroot}%{_sysconfdir}/rsyslog.d/%{name}.conf
|
||||
|
||||
# /etc/logrotate.d/multicraft
|
||||
# mkdir -p %{buildroot}%{_sysconfdir}/logrotate.d/
|
||||
# install -m 0644 %{SOURCE2} %{buildroot}%{_sysconfdir}/logrotate.d/%{name}
|
||||
|
||||
# /var/lib/multicraft directory for server data files
|
||||
install -d -m 0775 %{buildroot}%{_sharedstatedir}/%{name}/
|
||||
|
||||
# /etc/multicraft/multicraft.conf
|
||||
install -d -m 0775 %{buildroot}%{_sysconfdir}/%{name}/
|
||||
install -d -m 0775 %{buildroot}%{_sysconfdir}/sysconfig/%{name}/
|
||||
|
||||
# /etc/sysconfig/multicraft.conf
|
||||
# install -d -m 0775 %{buildroot}%{_sysconfdir}/sysconfig/%{name}/
|
||||
# install -m 0664 %{SOURCE8} %{buildroot}%{_sysconfdir}/sysconfig/%{name}
|
||||
|
||||
# Move doc directory back to the sources
|
||||
mkdir __doc
|
||||
mv %{buildroot}%{_datadir}/doc/%{name}/* __doc
|
||||
rm -rf %{buildroot}%{_datadir}/doc/%{name}
|
||||
|
||||
%find_lang %{name}
|
||||
|
||||
%post
|
||||
/bin/touch --no-create %{_datadir}/icons/hicolor &>/dev/null || :
|
||||
|
||||
%postun
|
||||
if [ $1 -eq 0 ] ; then
|
||||
/bin/touch --no-create %{_datadir}/icons/hicolor &>/dev/null
|
||||
/usr/bin/gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
|
||||
fi
|
||||
|
||||
%posttrans
|
||||
/usr/bin/gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
|
||||
|
||||
%pre server
|
||||
getent group %{name} >/dev/null || groupadd -r %{name}
|
||||
getent passwd %{name} >/dev/null || \
|
||||
useradd -r -g %{name} -d %{_sharedstatedir}/%{name} -s /sbin/nologin \
|
||||
-c "multicraft-server" %{name}
|
||||
exit 0
|
||||
|
||||
%post server
|
||||
%systemd_post %{name}@%{name}.service
|
||||
|
||||
%preun server
|
||||
%systemd_preun %{name}@%{name}.service
|
||||
|
||||
%postun server
|
||||
%systemd_postun_with_restart %{name}@%{name}.service
|
||||
|
||||
%%files -f %%{name}.lang
|
||||
%files
|
||||
%{_bindir}/%{name}
|
||||
%{_datadir}/applications/*.desktop
|
||||
%{_mandir}/man6/%{name}.*
|
||||
|
||||
%files server
|
||||
%doc README.* doc/*.txt
|
||||
%{_bindir}/%{name}server
|
||||
%{_unitdir}/%{name}@.service
|
||||
%config(noreplace) %{_sysconfdir}/logrotate.d/%{name}
|
||||
%config(noreplace) %{_sysconfdir}/rsyslog.d/%{name}.conf
|
||||
%attr(-,multicraft,multicraft)%{_sharedstatedir}/%{name}/
|
||||
%attr(-,multicraft,multicraft)%{_sysconfdir}/%{name}/
|
||||
%attr(-,multicraft,multicraft)%{_sysconfdir}/sysconfig/%{name}/
|
||||
%{_mandir}/man6/%{name}server.*
|
||||
|
||||
%files data
|
||||
%{_datadir}/games/%{name}/games
|
||||
%{_datadir}/games/%{name}/builtin
|
||||
%{_datadir}/games/%{name}/client
|
||||
%{_datadir}/games/%{name}/clientmods
|
||||
%{_datadir}/games/%{name}/fonts
|
||||
%{_datadir}/games/%{name}/textures
|
||||
%{_datadir}/icons/hicolor/*/apps/%{name}.png
|
||||
%{_datadir}/icons/hicolor/scalable/apps/%{name}.svg
|
||||
%{_datadir}/metainfo/*.appdata.xml
|
||||
%{_datadir}/locale/*/*/%{name}.mo
|
||||
|
||||
%changelog
|
||||
* Mon Dic 26 2022 PICCORO Lenz McKAY <mckaygerhard@gmail.com> - 2.0.3-1
|
||||
- Basic build of the current stable version
|
||||
- change all patchs to multicraft path
|
||||
- set all to multicraft as project sufix
|
||||
|
5
misc/multicraft.logrotate
Normal file
5
misc/multicraft.logrotate
Normal file
@ -0,0 +1,5 @@
|
||||
/var/log/minetest*.log {
|
||||
copytruncate
|
||||
notifempty
|
||||
missingok
|
||||
}
|
5
misc/multicraftserver
Executable file
5
misc/multicraftserver
Executable file
@ -0,0 +1,5 @@
|
||||
#!/bin/sh
|
||||
set -e
|
||||
|
||||
exec @INSTALLPLACE@/multicraftserver \
|
||||
"$@"
|
16
misc/multicraftserver.service
Normal file
16
misc/multicraftserver.service
Normal file
@ -0,0 +1,16 @@
|
||||
[Unit]
|
||||
Description=Multicraft multiplayer server multicraft.conf server config
|
||||
Documentation=man:multicraftserver(6)
|
||||
After=network.target
|
||||
RequiresMountsFor=/var/games/multicraftserver
|
||||
|
||||
[Service]
|
||||
Restart=on-failure
|
||||
User=multicraft
|
||||
Group=games
|
||||
ExecStart=/usr/lib/multicraft/multicraftserver --config /etc/multicraft/multicraft.conf --logfile /var/log/multicraft/multicraft.log
|
||||
StandardOutput=null
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
|
16
misc/multicraftserver@.service
Normal file
16
misc/multicraftserver@.service
Normal file
@ -0,0 +1,16 @@
|
||||
[Unit]
|
||||
Description=Multicraft multiplayer server %i.conf server config
|
||||
Documentation=man:multicraftserver(6)
|
||||
After=network.target
|
||||
RequiresMountsFor=/var/games/multicraft-server
|
||||
|
||||
[Service]
|
||||
Restart=on-failure
|
||||
User=multicraft
|
||||
Group=games
|
||||
ExecStart=/usr/lib/multicraft/multicraftserver --config /etc/multicraft/%i.conf --logfile /var/log/multicraft/%i.log
|
||||
StandardOutput=null
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
|
Loading…
x
Reference in New Issue
Block a user