summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 2869f8377764583f267e58d81678aa17b55243fb (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
# Maintainer: Hildigerr Vergaray <Maintainer@YmirSystems.com>
# Contributor: freijon <freijon@gmail.com>
# Contributor: Lone_Wolf <lonewolf@xs4all.nl>, ZekeSulastin <zekesulastin@gmail.com>, Martin Merget <mergetmartin@gmail.com>

pkgname=fs2_open-git
pkgver=23.0.0.RC8.20230502.02a40ae90.0
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' 'cmake' 'freetype2' 'doxygen' 'ffmpeg')
conflicts=('fs2_open')
provides=('fs2_open')
install=fs2_open-git.install
source=("${pkgname}::git+https://github.com/scp-fs2open/fs2open.github.com.git")

sha256sums=('SKIP')

prepare() {
	cd "$srcdir/$pkgname"
	git submodule update --init --recursive
}

pkgver () {
	cd "$srcdir/$pkgname"
	version=`git tag --list | grep "release_.._" | sort -n | tail -n 1 | sed 's/release_//g;s/_/./g'`
	tag=`git describe --tags $(git rev-list --tags --max-count=1) | sed 's/nightly_//g;s/_/./g'`
    commits_since_tag=`git rev-list --count $(git describe --tags $(git rev-list --tags --max-count=1))..HEAD`
	echo ${version}.${tag}.${commits_since_tag}
}

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

	mkdir build
	cd build
	cmake ../
	make
}

package () {
	cd "$srcdir/$pkgname/build/bin"
	binary=`find fs2_open*`
	cd ../..

	install -D -m644 Copying.md "$pkgdir/usr/share/licenses/$pkgname/LICENSE"

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