#3 Update to 5.0.0
Closed 5 years ago by ignatenkobrain. Opened 5 years ago by ignatenkobrain.
rpms/ ignatenkobrain/minetest 5  into  master

file modified
+2
@@ -0,0 +1,2 @@ 

+ /minetest-5.0.0.tar.gz

+ /minetest_game-5.0.0.tar.gz

@@ -0,0 +1,62 @@ 

+ From 1b5a6fdbe6a1c9696ec85a9c774a1aea8ccf1672 Mon Sep 17 00:00:00 2001

+ From: Igor Gnatenko <i.gnatenko.brain@gmail.com>

+ Date: Tue, 27 Dec 2016 15:23:09 +0100

+ Subject: [PATCH] use pkg-config to find luajit

+ 

+ Signed-off-by: Igor Gnatenko <i.gnatenko.brain@gmail.com>

+ ---

+  cmake/Modules/FindLuaJIT.cmake | 38 +++++---------------------------------

+  1 file changed, 5 insertions(+), 33 deletions(-)

+ 

+ diff --git a/cmake/Modules/FindLuaJIT.cmake b/cmake/Modules/FindLuaJIT.cmake

+ index e4335d83..f62fe8ac 100644

+ --- a/cmake/Modules/FindLuaJIT.cmake

+ +++ b/cmake/Modules/FindLuaJIT.cmake

+ @@ -6,39 +6,11 @@

+  #

+  # This module is similar to FindLua51.cmake except that it finds LuaJit instead.

+  

+ -FIND_PATH(LUA_INCLUDE_DIR luajit.h

+ -	HINTS

+ -	$ENV{LUA_DIR}

+ -	PATH_SUFFIXES include/luajit-2.0 include/luajit-5_1-2.0 include

+ -	PATHS

+ -	~/Library/Frameworks

+ -	/Library/Frameworks

+ -	/sw # Fink

+ -	/opt/local # DarwinPorts

+ -	/opt/csw # Blastwave

+ -	/opt

+ -)

+ -

+ -FIND_LIBRARY(LUA_LIBRARY

+ -	NAMES luajit-5.1

+ -	HINTS

+ -	$ENV{LUA_DIR}

+ -	PATH_SUFFIXES lib64 lib

+ -	PATHS

+ -	~/Library/Frameworks

+ -	/Library/Frameworks

+ -	/sw

+ -	/opt/local

+ -	/opt/csw

+ -	/opt

+ -)

+ -

+ -IF(LUA_INCLUDE_DIR AND EXISTS "${LUA_INCLUDE_DIR}/luajit.h")

+ -	FILE(STRINGS "${LUA_INCLUDE_DIR}/luajit.h" lua_version_str REGEX "^#define[ \t]+LUA_RELEASE[ \t]+\"LuaJIT .+\"")

+ -

+ -	STRING(REGEX REPLACE "^#define[ \t]+LUA_RELEASE[ \t]+\"LuaJIT ([^\"]+)\".*" "\\1" LUA_VERSION_STRING "${lua_version_str}")

+ -	UNSET(lua_version_str)

+ -ENDIF()

+ +find_package (PkgConfig REQUIRED)

+ +pkg_check_modules (LuaJIT QUIET REQUIRED luajit)

+ +set (LUA_LIBRARY ${LuaJIT_LIBRARIES})

+ +set (LUA_INCLUDE_DIR ${LuaJIT_INCLUDE_DIRS})

+ +set (LUA_VERSION_STRING ${LuaJIT_VERSION})

+  

+  INCLUDE(FindPackageHandleStandardArgs)

+  # handle the QUIETLY and REQUIRED arguments and set LUAJIT_FOUND to TRUE if

+ -- 

+ 2.11.0

+ 

file added
+1
@@ -0,0 +1,1 @@ 

+ PORT=30000

file added
+38
@@ -0,0 +1,38 @@ 

+ == How to start ==

+ 

+ To run the game use the command 'minetest' or choose Minetest from

+ applications menu.

+ 

+ To start simple single-user game leave the Server field blank. The

+ local Minetest server will be created automatically on the specified

+ port. Local server configuration and data will be saved in ~/.minetest

+ folder.

+ 

+ To connect to the existing Minetest server specify the server name (or

+ IP) and port number. Server name might be 'localhost' as well.

+ 

+ Check the Wiki for gameplay details:

+ http://c55.me/minetest/wiki/doku.php?id=crafting

+ 

+ Available public servers:

+ http://c55.me/minetest/wiki/doku.php?id=public_servers

+ 

+ == Minetest server ==

+ 

+ To run the system-wide Minetest server use the command

+ # systemctl start minetest.service

+ 

+ To make Minetest server run on boot use

+ # systemctl enable minetest.service 

+ 

+ Minetest server uses configuration file /etc/minetest.conf. It listens

+ to the port 30000 and stores the data in /var/lib/minetest. This can

+ be changed by editing the systemd unit.

+ 

+ Minetest-server also provides the rsyslog configuration file. You need

+ to restart the rsyslog daemon after minetest installation for this

+ file to take effect. After rsyslog restart minetest logs will be put

+ in /var/log/minetest.log

+ 

+ Check the project Wiki for server commands and privilege system 

+ http://c55.me/minetest/wiki/doku.php?id=server_commands

file added
+10
@@ -0,0 +1,10 @@ 

+ [Desktop Entry]

+ Name=Minetest

+ GenericName=Minetest

+ Comment=Multiplayer infinite-world block sandbox

+ Exec=minetest

+ Icon=minetest

+ Terminal=false

+ Type=Application

+ Categories=Game;

+ StartupNotify=false

file added
+5
@@ -0,0 +1,5 @@ 

+ /var/log/minetest.log {

+     copytruncate

+     notifempty

+     missingok

+ }

file added
+6
@@ -0,0 +1,6 @@ 

+ # Log minetest generated log messages to file

+ :programname, isequal, "minetestserver"	/var/log/minetest.log

+      

+ # comment out the following line to allow minetest messages through.

+ # Doing so means you'll also get minetest messages in /var/log/messages

+ & ~ 

\ No newline at end of file

file added
+180
@@ -0,0 +1,180 @@ 

+ Name:     minetest

+ Version:  5.0.0

+ Release:  1%{?dist}

+ Summary:  Multiplayer infinite-world block sandbox with survival mode

+ 

+ # See LICENSE.txt for more details

+ # * System irrlicht is used → no zlib

+ License:  LGPLv2+ and CC-BY-SA and ASL 2.0 and MIT

+ URL:      http://minetest.net/

+ 

+ Source0:  https://github.com/minetest/minetest/archive/%{version}/%{name}-%{version}.tar.gz

+ Source1:  %{name}.desktop

+ Source2:  %{name}@.service

+ Source3:  %{name}.rsyslog

+ Source4:  %{name}.logrotate

+ Source5:  %{name}.README

+ Source6:  https://github.com/minetest/minetest_game/archive/%{version}/%{name}_game-%{version}.tar.gz

+ Source8:  default.conf

+ 

+ # https://github.com/minetest/minetest/issues/4483

+ #Patch0001:      0001-use-pkg-config-to-find-luajit.patch

+ 

+ # LuaJIT arches

+ ExclusiveArch:  %{arm} %{ix86} x86_64 %{mips} aarch64

+ 

+ BuildRequires:  gcc

+ BuildRequires:  gcc-c++

+ BuildRequires:  cmake >= 2.6.0

+ BuildRequires:  irrlicht-devel

+ BuildRequires:  bzip2-devel gettext-devel sqlite-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:  jsoncpp-devel

+ BuildRequires:  libcurl-devel

+ BuildRequires:  luajit-devel

+ BuildRequires:  leveldb-devel

+ BuildRequires:  gmp-devel

+ BuildRequires:	libappstream-glib

+ BuildRequires:  freetype-devel

+ 

+ Requires:       %{name}-server = %{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. There are no in-game sounds yet

+ 

+ %package server

+ Summary:  Minetest multiplayer server

+ 

+ Requires(pre):    shadow-utils

+ Requires(post):   systemd

+ Requires(preun):  systemd

+ Requires(postun): systemd

+ 

+ %description server

+ Minetest multiplayer server. This package does not require X Window System

+ 

+ %prep

+ %autosetup -p1

+ 

+ pushd games

+ tar xf %{SOURCE6}

+ mv %{name}_game-%{version} %{name}_game

+ popd

+ 

+ # 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

+ # -DENABLE_FREETYPE=ON needed for Unicode in text chat

+ %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           \

+        -DCUSTOM_DOCDIR=%{_pkgdocdir} \

+        .

+ %make_build

+ 

+ %install

+ %make_install

+ 

+ # Add desktop file

+ desktop-file-install --dir=%{buildroot}%{_datadir}/applications %{SOURCE1}

+ 

+ # Systemd unit file

+ mkdir -p %{buildroot}%{_unitdir}/

+ install -m 0644 %{SOURCE2} %{buildroot}%{_unitdir}

+ 

+ # /etc/rsyslog.d/minetest.conf

+ mkdir -p %{buildroot}%{_sysconfdir}/rsyslog.d/

+ install -m 0644 %{SOURCE3} %{buildroot}%{_sysconfdir}/rsyslog.d/%{name}.conf

+ 

+ # /etc/logrotate.d/minetest

+ mkdir -p %{buildroot}%{_sysconfdir}/logrotate.d/

+ install -m 0644 %{SOURCE4} %{buildroot}%{_sysconfdir}/logrotate.d/%{name}-server

+ 

+ # /var/lib/minetest directory for server data files

+ install -d -m 0775 %{buildroot}%{_sharedstatedir}/%{name}/

+ install -d -m 0775 %{buildroot}%{_sharedstatedir}/%{name}/default/

+ 

+ # /etc/minetest/default.conf

+ install -d -m 0775 %{buildroot}%{_sysconfdir}/%{name}/

+ install    -m 0664 minetest.conf.example %{buildroot}%{_sysconfdir}/%{name}/default.conf

+ 

+ # /etc/sysconfig/default.conf

+ install -d -m 0775 %{buildroot}%{_sysconfdir}/sysconfig/%{name}/

+ install    -m 0664 %{SOURCE8} %{buildroot}%{_sysconfdir}/sysconfig/%{name}

+ 

+ cp -p %{SOURCE5} README.fedora

+ 

+ # Move doc directory back to the sources

+ mkdir __doc

+ mv  %{buildroot}%{_datadir}/doc/%{name}/* __doc

+ rm -rf %{buildroot}%{_datadir}/doc/%{name}

+ 

+ %find_lang %{name}

+ 

+ #move appdata file to the proper location, and validate

+ mkdir -p %{buildroot}%{_datadir}/appdata

+ mv %{buildroot}%{_datadir}/metainfo/net.minetest.minetest.appdata.xml %{buildroot}%{_datadir}/appdata/%{name}.appdata.xml

+ appstream-util validate-relax --nonet %{buildroot}%{_datadir}/appdata/%{name}.appdata.xml

+ 

+ %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 "Minetest multiplayer server" %{name}

+ exit 0

+ 

+ %post server

+ %systemd_post %{name}@default.service

+ 

+ %preun server

+ %systemd_preun %{name}@default.service

+ 

+ %postun server

+ %systemd_postun_with_restart %{name}@default.service

+ 

+ %files -f %{name}.lang

+ %license LICENSE.txt

+ %doc README.fedora

+ %{_bindir}/%{name}

+ %{_datadir}/%{name}/

+ %{_datadir}/applications/%{name}.desktop

+ %exclude %{_datadir}/applications/net.%{name}.%{name}.desktop

+ %{_datadir}/icons/hicolor/*/apps/%{name}.png

+ %{_datadir}/icons/hicolor/scalable/apps/%{name}.svg

+ %{_mandir}/man6/%{name}.*

+ %{_datadir}/appdata/%{name}.appdata.xml

+ 

+ %files server

+ %license LICENSE.txt

+ %{_pkgdocdir}

+ %doc README.fedora

+ %{_bindir}/%{name}server

+ %{_unitdir}/%{name}@.service

+ %config(noreplace) %{_sysconfdir}/logrotate.d/%{name}-server

+ %config(noreplace) %{_sysconfdir}/rsyslog.d/%{name}.conf

+ %attr(-,minetest,minetest)%{_sharedstatedir}/%{name}/

+ %attr(-,minetest,minetest)%{_sysconfdir}/%{name}/

+ %attr(-,minetest,minetest)%{_sysconfdir}/sysconfig/%{name}/

+ %{_mandir}/man6/%{name}server.*

+ 

+ %changelog

+ * Fri Mar 08 2019 Igor Gnatenko <ignatenkobrain@fedoraproject.org> - 5.0.0-1

+ - Initial package

file added
+12
@@ -0,0 +1,12 @@ 

+ [Unit]

+ Description=Minetest multiplayer server w/ %i.conf server config

+ After=syslog.target network.target

+ 

+ [Service]

+ EnvironmentFile=/etc/sysconfig/minetest/%i.conf

+ User=minetest

+ Type=simple

+ ExecStart=/usr/bin/minetestserver --config /etc/minetest/%i.conf --port $PORT --map-dir /var/lib/minetest/%i/

+ 

+ [Install]

+ WantedBy=multi-user.target

file modified
+2
@@ -0,0 +1,2 @@ 

+ SHA512 (minetest-5.0.0.tar.gz) = 0346ee5ab9449917c6ca109a30a97d0eca50a237fa9271ed1c51855fe0bc5073c0445aba860245c8263ad26d5a6e66a8bccabd70a1db7466d53dc853806e0f44

+ SHA512 (minetest_game-5.0.0.tar.gz) = 3c420c629868c51c517fca9c73ebd8608e12588c4db5e005a0328804d447a8d27591f318079559d625acb48e51499de4699306a5857905e50eaf9b9fa7703402