summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 911a2686b2dece83cd0757b6e40874c4c2cd5e8f (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
# Contributor: dorkster <jajdorkster@gmail.com>

pkgname=flare-engine-git
pkgver=20141113
pkgrel=1
pkgdesc="Free/Libre Action Roleplaying Engine - Git version"
url="http://www.flarerpg.org/"
license=('GPL3' 'CC-BY-SA-3.0')
arch=('i686' 'x86_64')
makedepends=('git>=1.7.10-1' 'cmake')
depends=('sdl2_image' 'sdl2_mixer' 'sdl2_ttf' 'hicolor-icon-theme' 'python')
conflicts=('flare-engine')
replaces=('flare-engine')
install=flare-engine-git.install
source=('flare-engine-git.install')
sha1sums=('f1399479b57f5948fb07b188c7599c1f04d2989b')

_gitroot="git://github.com/clintbellanger/"
_gitname="flare-engine"
_repo="flare-engine"

build() {
	cd $srcdir
	msg "Connecting to the GIT server..."

	if [[ -d $srcdir/$_repo ]] ; then
		msg "Updating flare-game"
		cd $_repo
		msg "Removing build files..."
		git clean -dfx
		msg "Updating..."
		git pull --no-tags
		msg "Updating flare"
	else
		msg "Cloning..."
		git clone $_gitroot$_repo --depth 1 --single-branch

		msg "Clone done."
	fi

	cd $srcdir/$_repo
	msg "Starting compile..."
	msg "Creating and moving to build directory..."
	mkdir build
	cd build
	msg "Running cmake..."
	cmake .. -DCMAKE_INSTALL_PREFIX=/usr -DBINDIR=bin -DDATADIR=share/flare
	msg "Compiling..."
	make
}

package() {
	cd $srcdir/$_repo
	msg "Installing..."
	cd build
	make install DESTDIR=$pkgdir

    # HACK: this file is essentially empty and conflicts with the same file in flare-game
    rm -vf $pkgdir/usr/share/flare/mods/mods.txt
}