blob: 56a6e61fd4ccc78b6fc01c4330a87b557ae1306a (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
|
# Contributor: <xmingske@gmail.com>
# Maintainer: Sascha Paunovic <azarus@posteo.net>
pkgname=minetest
pkgver=0.4.17.1
pkgrel=0
pkgdesc="An infinite-world block sandbox game and a game engine"
url="https://minetest.net/"
# luajit is not available for disabled arches
arch="all !s390x"
install="$pkgname-server.pre-install"
license="LGPL-2.1 CC-BY-SA-3.0"
depends="$pkgname-common"
pkgusers="minetest"
pkggroups="minetest"
makedepends="sqlite-dev bzip2-dev libressl-dev irrlicht-dev cmake libvorbis-dev
libjpeg-turbo-dev libpng-dev openal-soft-dev libogg-dev mesa-dev
sqlite-dev luajit-dev hiredis-dev curl-dev"
source="$pkgname-$pkgver.tar.gz::https://codeload.github.com/minetest/$pkgname/tar.gz/$pkgver
minetest-server.confd
minetest-server.initd
"
subpackages="$pkgname-doc $pkgname-common::noarch $pkgname-server"
builddir="$srcdir"/$pkgname-$pkgver
build() {
mkdir "$builddir"/.build_client
cd "$builddir"/.build_client
cmake -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 \
..
make
mkdir "$builddir"/.build_server
cd "$builddir"/.build_server
cmake -DCUSTOM_BINDIR=/usr/bin \
-DCMAKE_INSTALL_PREFIX=/usr \
-DCUSTOM_DOCDIR="/usr/share/doc/minetest" \
-DCUSTOM_SHAREDIR="/usr/share/minetest" \
-DBUILD_CLIENT=0 \
-DBUILD_SERVER=1 \
-DENABLE_REDIS=1 \
-DENABLE_CURL=1 \
-DRUN_IN_PLACE=0 \
..
make
}
common() {
install -o minetest -g minetest -d "$subpkgdir"/var/lib/minetest
mkdir -p "$subpkgdir/usr/share/minetest"
mv "$pkgdir/usr/share/minetest/builtin" \
"$subpkgdir/usr/share/minetest"
mv "$pkgdir/usr/share/minetest/games" \
"$subpkgdir/usr/share/minetest"
}
package() {
cd "$builddir"/.build_client
make DESTDIR="$pkgdir" install
}
server(){
mkdir -p "$subpkgdir/usr/bin"
cd "$builddir"
install -m644 -D $pkgname.conf.example \
"$subpkgdir"/etc/$pkgname/$pkgname.conf
install -D -m755 "$srcdir"/minetest-server.initd \
"$subpkgdir"/etc/init.d/minetest-server
install -D -m644 "$srcdir"/minetest-server.confd \
"$subpkgdir"/etc/conf.d/minetest-server
cp bin/minetestserver $subpkgdir/usr/bin
}
sha512sums="9f84ae45ebe181cb1cd2dff6b71b558eb276472efdfcd73bd02a111b2761793d49681bdfbbeaccc28f4a2f49e15b80d04b78db2f2f728c852c188b0c96aae618 minetest-0.4.17.1.tar.gz
7bca17dc0bd59db9c07c160677498aa09297026104e922bf93b7629c274d0aebd226af60c5e82f49ffe3cc5c1e4448e3798b6c2a44144fc6eca4d3aaed3384bb minetest-server.confd
c27aea87468538b48b5e0a66fa5cdde4fc67f3c00a0e57f359a2f044a31c5617d1b5f3dec72e015537ee3bf126bd1073878c0f4447de67db9be2c4cf21416dd7 minetest-server.initd"
|