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

pkgname=fs2_open-git
pkgver=3.7.5.r2485
pkgrel=1
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
source=("${pkgname}::git+https://github.com/scp-fs2open/fs2open.github.com.git"
"cotire::git+https://github.com/sakra/cotire.git"
"cmake-modules::git+https://github.com/asarium/cmake-modules.git")

sha256sums=('SKIP'
'SKIP'
'SKIP')

version=3.7.5

pkgver () {
	cd "$srcdir/$pkgname"
	rev=`git describe --long | sed 's/\([^-]*-g\)/r\1/;s/-/./g'`
	echo ${version}.${rev:10:5}
}

build()
{
	cd "$srcdir/$pkgname"

	git submodule init
	git config submodule.cotire $srcmodule/cotire
	git submodule update
	git submodule init
	git config submodule.cmake-modules $srcmodule/cmake-modules
	git submodule update

	mkdir build
	cd build
	cmake ../
	make
}

package () {
	cd "$srcdir/$pkgname/build/bin"
	binary=`find fs2_open*`
	cd ../..
	rev=`git describe --long | sed 's/\([^-]*-g\)/r\1/;s/-/./g'`
	install -D -m644 COPYING "$pkgdir/usr/share/licenses/$pkgname/LICENSE"

	install -D -m755 build/bin/${binary} "$pkgdir/opt/fs2_open/${binary}_${rev:10:5}"
	msg "The output binary will be called '${binary}_${rev:10:5}'"
}