summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 63df333a73094889d4beb85befca60b0229b6a56 (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
# Maintainer: freijon <freijon@gmail.com>
# Contributor: Lone_Wolf <lonewolf@xs4all.nl>, ZekeSulastin <zekesulastin@gmail.com>

pkgname=fs2_open-git
pkgver=3.7.3
pkgrel=20151208
pkgdesc="An enhancement of the original Freespace 2 engine - GIT version"
url="http://scp.indiegames.us"
arch=('i686' 'x86_64')
license=('custom:fs2_open')
depends=('libjpeg' 'libpng' 'libtheora' 'libvorbis' 'lua51' 'mesa' 'openal' 'sdl')
makedepends=('git')
conflicts=('fs2_open')
provides=('fs2_open')
install=fs2_open-git.install

_gitrep='https://github.com/scp-fs2open/fs2open.github.com.git'
_pkg=fs2_open

build()
{
	cd "$srcdir"
	msg "Cloning git repository...."

	git clone $_gitrep

	msg "git clone done or server timeout"
	msg "Starting build..."

	rm -rf "$srcdir/$_pkg-build"
	cd "$srcdir/fs2open.github.com"

	# Add --enable-debug to make a debug build.  These are NOT meant for general play;
	#  only make a debug build if generating logs/bugreports.  This is true even for
	#  these GIT builds, if you're using a mod that requires them.
	LDFLAGS="-l:liblua.so.5.1 $LDFLAGS" CXXFLAGS="-I/usr/include/lua5.1 $CXXFLAGS" ./autogen.sh --enable-speech
	make
}

package () {
	cd "$srcdir/fs2open.github.com"

	_commit_hash=`git rev-parse HEAD`
	install -D -m644 COPYING "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
	if [[ -x code/fs2_open_3.7.3 ]]; then
		install -D -m755 code/fs2_open_3.7.3 "$pkgdir/opt/fs2_open/fs2_open_3.7.3_$_commit_hash"
	else
		install -D -m755 code/fs2_open_3.7.3_DEBUG "$pkgdir/opt/fs2_open/fs2_open_3.7.3_DEBUG_$_commit_hash"
	fi
}