reorganize distro files for packaging: deb/rpm/apk
* move debian directory to misc/debian * move rmp shit distro directory the spec file and changelog * move the alpine directory in misc with a minimal started files * still there's an error on spec file for name of the tarball * all of those files it depends of the previous commit that gives init/shistemd
This commit is contained in:
parent
c811a30507
commit
b420f18423
9
debian/multicraft-data.install
vendored
9
debian/multicraft-data.install
vendored
@ -1,9 +0,0 @@
|
||||
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
|
81
debian/multicraft-server.init
vendored
81
debian/multicraft-server.init
vendored
@ -1,81 +0,0 @@
|
||||
#! /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
|
19
debian/patches/04-postgresql.patch
vendored
19
debian/patches/04-postgresql.patch
vendored
@ -1,19 +0,0 @@
|
||||
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)
|
@ -8,7 +8,7 @@ url="https://www.multicraft.world/"
|
||||
arch="all !riscv64"
|
||||
license="LGPL-3-or-later AND CC-BY-SA-3.0"
|
||||
pkgusers="multicraft"
|
||||
pkggroups="multicraft"
|
||||
pkggroups="games"
|
||||
install="$pkgname-server.pre-install"
|
||||
depends="$pkgname-common"
|
||||
makedepends="
|
@ -2,12 +2,17 @@ Source: multicraft
|
||||
Section: games
|
||||
Priority: optional
|
||||
Maintainer: PICCORO Lenz McKAY <mckaygerhard@gmail.com>
|
||||
Build-Depends: cmake, pkg-config,
|
||||
Build-Depends: cmake,
|
||||
pkg-config,
|
||||
debhelper (>= 10) | dh-systemd | dh-autoreconf, lsb-release,
|
||||
cron,
|
||||
gettext, doxygen,
|
||||
gettext,
|
||||
libbz2-dev,
|
||||
libcurl4-gnutls-dev, libnl-genl-3-dev | libnl-dev | libnl-3-dev, librtmp-dev, libidn11-dev, libncurses-dev | libncurses5-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,
|
||||
@ -27,7 +32,12 @@ Build-Depends: cmake, pkg-config,
|
||||
libx11-dev,
|
||||
libxxf86vm-dev,
|
||||
postgresql-server-dev-all | libpq-dev,
|
||||
zlib1g-dev
|
||||
zlib1g-dev,
|
||||
doxygen,
|
||||
libxrandr-dev,
|
||||
mesa-common-dev,
|
||||
x11proto-xf86vidmode-dev,
|
||||
libzstd-dev
|
||||
Standards-Version: 4.1.4
|
||||
Homepage: https://www.multicraft.world/
|
||||
Rules-Requires-Root: no
|
||||
@ -35,7 +45,7 @@ Rules-Requires-Root: no
|
||||
Package: multicraft
|
||||
Architecture: any
|
||||
Depends: multicraft-data (= ${source:Version}), ${misc:Depends}, ${shlibs:Depends}
|
||||
Recommends: multicraft-game | multicraft-game-game
|
||||
Recommends: minetest-game | multicraft-game | minetest-game-minenux
|
||||
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
|
||||
@ -48,7 +58,7 @@ Description: Multiplayer infinite-world block sandbox (client with embebed serve
|
||||
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
|
||||
Recommends: minetest-game | multicraft-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
|
||||
@ -62,7 +72,7 @@ Description: Multiplayer infinite-world block sandbox (server only)
|
||||
Package: multicraft-data
|
||||
Architecture: all
|
||||
Depends: adduser,${misc:Depends}
|
||||
Provides: multicraft-game, multicraft-game-minenux
|
||||
Provides: minetest-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
|
4
misc/debian/multicraft-data.install
Normal file
4
misc/debian/multicraft-data.install
Normal file
@ -0,0 +1,4 @@
|
||||
usr/share/games/multicraft
|
||||
#usr/share/locale
|
||||
usr/share/metainfo
|
||||
usr/share/icons/hicolor
|
@ -7,8 +7,8 @@ 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
|
||||
rm -fr /var/games/multicraft
|
||||
rm -fr /var/log/multicraft
|
||||
rmdir --ignore-fail-on-non-empty /var/games
|
||||
fi
|
||||
|
@ -1,3 +1,2 @@
|
||||
#01-kfreebsd-debian-gettex-glibc.patch
|
||||
#03-rawlua.patch
|
||||
#04-postgresql.patch
|
@ -36,25 +36,32 @@ 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_DOCDIR=/usr/share/doc/multicraft-data \
|
||||
-DCUSTOM_LOCALEDIR=/usr/share/locale \
|
||||
-DCUSTOM_SHAREDIR=/usr/share/games/multicraft \
|
||||
-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 \
|
||||
-DENABLE_SPATIAL=ON \
|
||||
-DENABLE_LEVELDB=ON \
|
||||
-DENABLE_REDIS=ON \
|
||||
-DENABLE_POSTGRESQL=ON \
|
||||
-DJSON_INCLUDE_DIR=/usr/include/jsoncpp \
|
||||
-DFREETYPE_INCLUDE_DIR_freetype2=/usr/include/freetype2 \
|
||||
-DFREETYPE_INCLUDE_DIR_ft2build=/usr/include \
|
||||
-DLEVELDB_INCLUDE_DIR=/usr/include/leveldb \
|
||||
-DCMAKE_INSTALL_PREFIX=/usr \
|
||||
-DBUILD_SERVER=1 -DCMAKE_BUILD_TYPE=Release
|
||||
-DCMAKE_BUILD_TYPE=RelWithDebInfo
|
||||
|
||||
# -DPNG_PNG_INCLUDE_DIR=$(pkg-config libpng --variable=includedir) \
|
||||
|
||||
override_dh_installchangelogs:
|
||||
# dh_installchangelogs debian/changelog.upstream
|
14
misc/fedora/multicraft.changes
Normal file
14
misc/fedora/multicraft.changes
Normal file
@ -0,0 +1,14 @@
|
||||
-------------------------------------------------------------------
|
||||
Fri Dec 30 12:18:15 UTC 2022 - PICCORO Lenz McKAY <mckaygerhard@gmail.com>
|
||||
|
||||
- Packages for this stupid shit distro
|
||||
- Only apply minetest-fix-luajit-include-path.patch on openSUSE Leap as TW versions do not require it any more.
|
||||
- Switch to from system irrlicht to IrrlichtMt library version 1.9.0mt5
|
||||
- Don't purge the bundled bitop library
|
||||
- Add new libzstd build dependency
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed Aug 17 00:00:00 UTC 2022 - PICCORO Lenz McKAY <mckaygerhard@gmail.com>
|
||||
|
||||
- packaged minetest version 0.2.20110731_3
|
||||
|
257
misc/fedora/multicraft.spec
Normal file
257
misc/fedora/multicraft.spec
Normal file
@ -0,0 +1,257 @@
|
||||
#
|
||||
# spec file for package multicraft
|
||||
#
|
||||
# Copyright (c) 2022 PICCORO Lenz McKAY
|
||||
#
|
||||
|
||||
%define minetestuser %{name}
|
||||
%define minetestgroup %{name}
|
||||
Name: multicraft
|
||||
Version: 2.0.3
|
||||
Release: 0%{?dist}
|
||||
Summary: A Minetest/Minecraft based game
|
||||
License: CC-BY-SA-3.0 AND LGPL-3-or-later
|
||||
Group: Amusements/Games/3D/Simulation
|
||||
URL: https://codeberg.org/minenux/minetest-engine-multicraft
|
||||
Source0: %{name}_%{version}.orig.tar.gz
|
||||
#Source1: https://github.com/multicraft/irrlicht/archive/%{irrlichtmt_version}/irrlicht-%{irrlichtmt_version}.tar.gz
|
||||
#Patch0: minetest-fix-luajit-include-path.patch
|
||||
|
||||
%if 0%{?rhel}
|
||||
ExclusiveArch: %{ix86} x86_64
|
||||
# LuaJIT arches
|
||||
ExclusiveArch: %{arm} %{ix86} x86_64 %{mips} aarch64 ppc64le
|
||||
%endif
|
||||
|
||||
BuildRequires: cmake
|
||||
BuildRequires: doxygen
|
||||
BuildRequires: fdupes
|
||||
BuildRequires: gcc-c++
|
||||
BuildRequires: gmp-devel
|
||||
BuildRequires: hicolor-icon-theme
|
||||
BuildRequires: irrlicht-devel luajit-devel
|
||||
BuildRequires: libXxf86vm-devel
|
||||
BuildRequires: libpng-devel
|
||||
%if 0%{?rhel}
|
||||
BuildRequires: bzip2-devel gettext-devel sqlite-devel libzstd-devel
|
||||
BuildRequires: libjpeg-turbo-devel mesa-libGL-devel
|
||||
%else
|
||||
BuildRequires: libjpeg-devel
|
||||
%endif
|
||||
BuildRequires: ncurses-devel
|
||||
BuildRequires: pkgconfig systemd
|
||||
BuildRequires: spatialindex-devel
|
||||
BuildRequires: systemd-rpm-macros
|
||||
%if 0%{?suse_version} > 1400
|
||||
BuildRequires: update-desktop-files
|
||||
BuildRequires: gettext-tools
|
||||
%else
|
||||
BuildRequires: desktop-file-utils
|
||||
%endif
|
||||
BuildRequires: pkgconfig(bzip2)
|
||||
BuildRequires: pkgconfig(freetype2)
|
||||
BuildRequires: pkgconfig(gl)
|
||||
BuildRequires: pkgconfig(jsoncpp)
|
||||
BuildRequires: pkgconfig(libcurl)
|
||||
BuildRequires: pkgconfig(libpng)
|
||||
BuildRequires: pkgconfig(luajit)
|
||||
BuildRequires: pkgconfig(openal)
|
||||
BuildRequires: pkgconfig(sqlite3)
|
||||
BuildRequires: pkgconfig(vorbis)
|
||||
BuildRequires: pkgconfig(x11)
|
||||
BuildRequires: pkgconfig(xi)
|
||||
BuildRequires: pkgconfig(zlib)
|
||||
BuildRequires: leveldb-devel
|
||||
BuildRequires: pkgconfig
|
||||
BuildRequires: pkgconfig(hiredis)
|
||||
BuildRequires: postgresql-devel
|
||||
%if 0%{?suse_version} > 1400
|
||||
BuildRequires: postgresql-server-devel
|
||||
%endif
|
||||
BuildRequires: libcurl-devel libidn-devel
|
||||
Requires: %{name}-data = %{version}
|
||||
Recommends: minetest-game
|
||||
Provides: minetest-runtime = %{version}
|
||||
|
||||
%description
|
||||
An infinite-world block sandbox game and a game engine, inspired by
|
||||
InfiniMiner, Minecraft and the like BUT FORKED FROM MINETEST
|
||||
|
||||
%package %{name}server
|
||||
Summary: Multicraft server for LAN and network only
|
||||
License: LGPL-2.1-or-later
|
||||
Group: Amusements/Games/3D/Simulation
|
||||
Requires: %{name}-data = %{version}
|
||||
%if 0%{?suse_version} > 1400
|
||||
Requires(pre): shadow
|
||||
%endif
|
||||
%if 0%{?fedora_version} > 34
|
||||
Requires(pre): shadow
|
||||
%endif
|
||||
Recommends: multicraft-game
|
||||
Provides: minetest-runtime = %{version}
|
||||
%{?systemd_requires}
|
||||
|
||||
%description %{name}server
|
||||
An infinite-world block sandbox game and a game engine, inspired by
|
||||
InfiniMiner, Minecraft and the like BUT FORKED FROM MINETEST
|
||||
|
||||
This package contains a multicraft server.
|
||||
|
||||
%package data
|
||||
Summary: Multicraft shared data
|
||||
License: CC-BY-SA-3.0 AND LGPL-2.1-or-later
|
||||
Group: Amusements/Games/3D/Simulation
|
||||
Requires: google-arimo-fonts
|
||||
Requires: google-cousine-fonts
|
||||
Requires: google-droid-fonts
|
||||
BuildArch: noarch
|
||||
|
||||
%description data
|
||||
An infinite-world block sandbox game and a game engine, inspired by
|
||||
InfiniMiner, Minecraft and the like.
|
||||
|
||||
This package contains data for multicraft and multicraftserver.
|
||||
|
||||
%if 0%{?fedora_version} > 32
|
||||
%global debug_package %{nil}
|
||||
%endif
|
||||
|
||||
%prep
|
||||
%autosetup -p1
|
||||
# way to patch only in some version of rmp shit distros
|
||||
# %if 0%{?sle_version} > 0 && 0%{?sle_version} <= 150400
|
||||
# %patch0 -p1
|
||||
# %patch1 -p1
|
||||
# %endif
|
||||
|
||||
# cd lib
|
||||
# tar -xzf %{SOURCE3}
|
||||
# mv irrlicht-%{irrlichtmt_version} irrlichtmt
|
||||
# cd ..
|
||||
|
||||
# Purge bundled jsoncpp, lua and gmp libraries.
|
||||
rm -rf 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-optimization
|
||||
s"
|
||||
CXXFLAGS="-O3 -march=pentium3 -mtune=nocona -mfpmath=sse -fomit-frame-pointer -mmmx -msse -msse2 -mno-sse4 -mno-sse3 -fpermissive -Wall -fexpensive-optimizati
|
||||
ons -fpermissive"
|
||||
%endif
|
||||
%ifarch aarch64
|
||||
%define _lto_cflags %{nil}
|
||||
%endif
|
||||
|
||||
%cmake \
|
||||
%ifarch aarch64
|
||||
%if 0%{?suse_version} > 1550
|
||||
-DCMAKE_CXX_FLAGS="%{optflags} -mbranch-protection=none" \
|
||||
%endif
|
||||
%endif
|
||||
-DCUSTOM_DOCDIR="%{_docdir}/%{name}" \
|
||||
-DCUSTOM_LOCALEDIR="%{_datadir}/locale" \
|
||||
-DCUSTOM_SHAREDIR="%{_datadir}/games/%{name}" \
|
||||
-DBUILD_SERVER=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 \
|
||||
-DPNG_PNG_INCLUDE_DIR=$(pkg-config libpng --variable=includedir) \
|
||||
-DENABLE_SPATIAL=ON \
|
||||
-DENABLE_LEVELDB=ON \
|
||||
-DENABLE_REDIS=ON \
|
||||
-DENABLE_POSTGRESQL=ON \
|
||||
%{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
|
||||
|
||||
# Clean up.
|
||||
%fdupes %{buildroot}%{_datadir}/
|
||||
|
||||
install -Dpm 0644 multicraft.conf.example %{buildroot}%{_sysconfdir}/%{name}/multicraft.conf.example
|
||||
|
||||
mkdir -p %{buildroot}%{_localstatedir}/lib/%{name}/
|
||||
|
||||
# %find_lang %{name}
|
||||
|
||||
%post
|
||||
/bin/touch --no-create %{_datadir}/icons/hicolor &>/dev/null || :
|
||||
desktop-file-validate %{_datadir}/applications/net.minetest.multicraft.desktop
|
||||
|
||||
%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
|
||||
|
||||
%pre %{name}server
|
||||
getent group %{name} > /dev/null || %{_sbindir}/groupadd -r %{multicraftgroup}
|
||||
getent passwd %{name} > /dev/null || %{_sbindir}/useradd -r -g %{multicraftgroup} -d %{_localstatedir}/lib/%{name} -s /sbin/nologin -c "user for %{name}server" %{multicraftuser}
|
||||
%service_add_pre %{name}@.service
|
||||
|
||||
%post %{name}server
|
||||
%service_add_post %{name}@.service
|
||||
|
||||
%preun %{name}server
|
||||
%service_del_preun %{name}@.service
|
||||
|
||||
%postun %{name}server
|
||||
%service_del_postun %{name}@.service
|
||||
|
||||
%files
|
||||
%{_bindir}/%{name}
|
||||
%{_datadir}/applications/net.minetest.multicraft.desktop
|
||||
%{_mandir}/man6/%{name}.6%{?ext_man}
|
||||
|
||||
%files %{name}server
|
||||
%{_bindir}/%{name}server
|
||||
%attr(0755,%{multicraftuser},%{multicraftgroup}) %{_localstatedir}/lib/%{name}/
|
||||
%{_mandir}/man6/%{name}server.6%{?ext_man}
|
||||
%dir %{_sysconfdir}/%{name}
|
||||
%config %{_sysconfdir}/%{name}/multicraft.conf.example
|
||||
# %{_unitdir}/%{name}@.service
|
||||
# %config(noreplace) %{_sysconfdir}/logrotate.d/%{name}
|
||||
# %config(noreplace) %{_sysconfdir}/rsyslog.d/%{name}.conf
|
||||
|
||||
%files data
|
||||
%license LICENSE.txt
|
||||
%doc README.*
|
||||
%doc %{_docdir}/%{name}/
|
||||
%{_datadir}/games/%{name}/
|
||||
%dir %{_datadir}/icons/hicolor/
|
||||
%{_datadir}/icons/hicolor/*/apps/%{name}.*
|
||||
%dir %{_datadir}/metainfo/
|
||||
%{_datadir}/metainfo/*%{name}.appdata.xml
|
||||
|
||||
%changelog
|
@ -1,232 +0,0 @@
|
||||
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
|
||||
|
Loading…
x
Reference in New Issue
Block a user