summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: de84b328f0ee71d6d5a7a8b5c915c85ef12a456a (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
# Maintainer: Gaetan Bisson <bisson@archlinux.org>
# Contributor: Konsta Kokkinen <kray@tsundere.fi>

pkgname=minetest-git
_pkgname=minetest
pkgver=20190312.e22a69d61
pkgrel=1
pkgdesc='Voxel game engine and Infiniminer/Minecraft-inspired game'
url='http://www.minetest.net/'
license=('LGPL2.1' 'CCPL:by-sa')
arch=('i686' 'x86_64')
makedepends=('git' 'cmake')
depends=('bzip2' 'freetype2' 'irrlicht' 'jsoncpp' 'leveldb' 'libjpeg'
         'libpng' 'libvorbis' 'luajit' 'mesa' 'openal' 'sqlite' 'hiredis')
source=('git://github.com/minetest/minetest.git'
        'git://github.com/minetest/minetest_game.git')
sha256sums=('SKIP'
            'SKIP')

conflicts=("${_pkgname}"{,-common,-server})
provides=("${_pkgname}"{,-common,-server})
install=install

pkgver() {
	cd "${srcdir}/${_pkgname}"
	git log -1 --format='%cd.%h' --date=short | tr -d -
}

prepare() {
	cd "${srcdir}"
	rm -fr minetest/games/minetest_game
	cp -a minetest_game minetest/games/
}

build() {
	cd "${srcdir}/${_pkgname}"
	cmake . \
		-DCMAKE_BUILD_TYPE=Release \
		-DCMAKE_INSTALL_PREFIX=/usr \
		-DENABLE_GETTEXT=TRUE \
		-DRUN_IN_PLACE=FALSE \
		-DBUILD_SERVER=TRUE \

	make
}

package() {
	cd "${srcdir}/${_pkgname}"
	make DESTDIR="${pkgdir}" install
}