diff options
author | Francesco Colista <fcolista@alpinelinux.org> | 2014-12-29 16:13:56 +0000 |
---|---|---|
committer | Francesco Colista <fcolista@alpinelinux.org> | 2014-12-29 16:14:10 +0000 |
commit | 52c3cd0153a87c05d8d6f9631ddeabe1188d3fae (patch) | |
tree | bf91dbdc179be683506c19eadf23e0ba5a8257dd /main/minetest | |
parent | 7f92358cd30647fe2487a7dcaa1f7b2680c1c6c0 (diff) | |
download | aports-52c3cd0153a87c05d8d6f9631ddeabe1188d3fae.tar.bz2 aports-52c3cd0153a87c05d8d6f9631ddeabe1188d3fae.tar.xz |
main/minetest: added initd and conf file
Diffstat (limited to 'main/minetest')
-rw-r--r-- | main/minetest/APKBUILD | 22 | ||||
-rw-r--r-- | main/minetest/minetest.confd | 9 | ||||
-rw-r--r-- | main/minetest/minetest.initd | 37 | ||||
-rw-r--r-- | main/minetest/minetest.pre-install | 3 |
4 files changed, 67 insertions, 4 deletions
diff --git a/main/minetest/APKBUILD b/main/minetest/APKBUILD index cee6c1643a..49dd97a6d2 100644 --- a/main/minetest/APKBUILD +++ b/main/minetest/APKBUILD @@ -2,16 +2,19 @@ # Maintainer: Natanael Copa <ncopa@alpinelinux.org> pkgname=minetest pkgver=0.4.10 -pkgrel=0 +pkgrel=1 pkgdesc="An infinite-world block sandbox game and a game engine" url="http://minetest.net/" arch="all" +install="$pkgname.pre-install" license="LGPL2.1 CCBY-SA3.0" depends="$pkgname-common" makedepends="sqlite-dev bzip2-dev openssl-dev irrlicht-dev cmake libvorbis-dev libjpeg-turbo-dev libpng-dev openal-soft-dev libogg-dev mesa-dev sqlite-dev luajit-dev hiredis-dev" source="$pkgname-$pkgver.tar.gz::https://codeload.github.com/minetest/${pkgname}/tar.gz/${pkgver} + $pkgname.confd + $pkgname.initd " subpackages="$pkgname-doc $pkgname-common $pkgname-server" @@ -69,9 +72,20 @@ package() { server(){ mkdir -p "${subpkgdir}/usr/bin" cd "${_builddir}" + install -m644 -D $pkgname.conf.example "$pkgdir"/etc/$pkgname/$pkgname.conf + install -D -m755 "$srcdir"/$pkgname.initd \ + "$pkgdir"/etc/init.d/$pkgname || return 1 + install -D -m644 "$srcdir"/$pkgname.confd \ + "$pkgdir"/etc/conf.d/$pkgname || return 1 cp bin/minetestserver ${subpkgdir}/usr/bin } -md5sums="61bb35c9d5521f1b072bc3c3e634c863 minetest-0.4.10.tar.gz" -sha256sums="620a2f3c279d337a2ac405ea65a559cc9c87f3d58bb565f9935fe338d003bbf7 minetest-0.4.10.tar.gz" -sha512sums="882723996b4904b4b9e3653476c2b4a988967600fc2b0897f755dd28d5da2ae5cab45a14fcdf8827c3f2838e952399e1e7d7e264cd26070fef2dbcd33cd1c59a minetest-0.4.10.tar.gz" +md5sums="61bb35c9d5521f1b072bc3c3e634c863 minetest-0.4.10.tar.gz +89529d4af9bddc6504979404d609bb96 minetest.confd +3da0c6a91862cdbfe70665a6ed300085 minetest.initd" +sha256sums="620a2f3c279d337a2ac405ea65a559cc9c87f3d58bb565f9935fe338d003bbf7 minetest-0.4.10.tar.gz +f1d54fc223b5330d7b6cf20e2a0b96cfb4f56ee236072d9379c63b0b11452178 minetest.confd +7489226264d91452e6048d8ff99e0c9451f3b9976c22c502722d6b280a489bd5 minetest.initd" +sha512sums="882723996b4904b4b9e3653476c2b4a988967600fc2b0897f755dd28d5da2ae5cab45a14fcdf8827c3f2838e952399e1e7d7e264cd26070fef2dbcd33cd1c59a minetest-0.4.10.tar.gz +98c4cf9b9957f69a0ceae771b7c2173fb4c7e4ad636081b6cb52168cb7a26f7f7f61c885718a2241c6f6d652d8d43bc5989b5fab95e3bf9dce4dd423c6ca3ab0 minetest.confd +5fe9de23f90cecbe74a6d096de3c6bb2bacc376cdcd412ce36586e2bdac31906a97804d3c59a5f1cc9942b4305ac2ba77caad74a78c4ccd03d1fba00244ca6b1 minetest.initd" diff --git a/main/minetest/minetest.confd b/main/minetest/minetest.confd new file mode 100644 index 0000000000..5142f00bcb --- /dev/null +++ b/main/minetest/minetest.confd @@ -0,0 +1,9 @@ +USER="minetest" +GROUP="games" +PID="/var/run/minetest.pid" +EXEC="/usr/bin/minetestserver" +LOG="/var/lib/minetest/minetestd.log" +CONFIG="/etc/minetest/minetest.conf" +# Optional arguments, see man minetest +# HINT: emerge games-mud/minetest-mod and use ARGS="--gameid minetest-mod" to enable pretty textures +ARGS="" diff --git a/main/minetest/minetest.initd b/main/minetest/minetest.initd new file mode 100644 index 0000000000..cf47b81a54 --- /dev/null +++ b/main/minetest/minetest.initd @@ -0,0 +1,37 @@ +#!/sbin/runscript + +description="Minetest server" + +depend() { + need net +} + +start() { + ebegin "Starting $SVCNAME" + start-stop-daemon \ + --start \ + --user $USER \ + --group $GROUP \ + --make-pidfile \ + --pidfile $PID \ + --background \ + --quiet \ + --exec $EXEC -- "--config $CONFIG --logfile $LOG $ARGS" + eend $? +} + +stop() { + ebegin "Stopping $SVCNAME" + start-stop-daemon \ + --stop \ + --quiet \ + --pidfile $PID + eend $? +} + +reload() { + ebegin "Reloading $SVCNAME" + start-stop-daemon --signal HUP \ + --exec "$EXEC" --pidfile "$PID" + eend $? +} diff --git a/main/minetest/minetest.pre-install b/main/minetest/minetest.pre-install new file mode 100644 index 0000000000..72a562bd68 --- /dev/null +++ b/main/minetest/minetest.pre-install @@ -0,0 +1,3 @@ +#!/bin/sh +adduser -s /bin/false -D -h /var/lib/minetest minetest games 2>/dev/null +exit 0 |