summaryrefslogtreecommitdiff
path: root/pcr/minetest-git/PKGBUILD
blob: b4a5eb7cebc8973d6f45ffce4bb66762cf0de5ff (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
84
85
86
87
88
89
90
91
# Maintainer: Konsta Kokkinen <kray@tsundere.fi>
# Maintainer (Parabola): Jorge Araya Navarro <jorgean@lavabit.com>
# Contributor (Parabola): André Silva <emulatorman@lavabit.com>
pkgname=minetest-git
pkgver=20130501
pkgrel=1
pkgdesc="An Infiniminer/Minecraft inspired game, git version."
arch=('i686' 'x86_64')
url='http://minetest.net/'
license=('LGPL2.1')
makedepends=('git' 'cmake' 'irrlicht' 'mesa' 'bzip2' 'libjpeg' 'libpng' 'zlib' 'curl')
depends=('sqlite3' 'libgl' 'libxxf86vm' 'openal' 'hicolor-icon-theme' 'libvorbis' 'curl')
conflicts=('minetest' 'minetest-hg')

_srcroot="https://github.com/minetest/minetest.git"
_srcname="minetest"

_gameroot="https://github.com/minetest/minetest_game.git"
_gamename="minetest_game"

_commonroot="https://github.com/minetest/common.git"
_commonname="common"

_buildroot="https://github.com/minetest/build.git"
_buildname="build"

_survivalroot="https://github.com/minetest/survival.git"
_survivalname="survival"

package() {
	cd "$srcdir"

	msg "Pulling sources..."

	if [ -d $_srcname ] ; then
		cd $_srcname && git pull origin
		msg "The local files are updated."
	else
		git clone $_srcroot $_gitname
	fi

	msg "Pulling game..."

	cd "$srcdir/$_srcname/games/"

        if [ -d $_gamename ] ; then
                cd $_gamename && git pull origin   
                msg "The local files are updated."
        else
                git clone $_gameroot $_gamename
        fi

	msg "Pulling common mods..."
	cd "$srcdir"/"$_srcname"/games/

	 if [ -d $_commonname ] ; then
                cd $_commonname && git pull origin   
                msg "The local files are updated."
        else
                git clone $_commonroot $_commonname
        fi

	msg "Pulling build mods..."
	cd "$srcdir"/"$_srcname"/games/

	 if [ -d $_buildname ] ; then
                cd $_buildname && git pull origin   
                msg "The local files are updated."
        else
                git clone $_buildroot $_buildname
        fi

	msg "Pulling survival mods..."
	cd "$srcdir"/"$_srcname"/games/

	 if [ -d $_survivalname ] ; then
                cd $_survivalname && git pull origin   
                msg "The local files are updated."
        else
                git clone $_survivalroot $_survivalname
        fi



	msg "GIT checkout done or server timeout"
	msg "Starting make..."

	cd "$srcdir/$_srcname"
	cmake . -DCMAKE_INSTALL_PREFIX=/usr
	make DESTDIR=${pkgdir} install
}