summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 674f4475b93817a2dc137a05d440e08031b5b870 (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
# Maintainer: Gustavo Ramos Rehermann <rehermann6046@gmail.com>

pkgname=bspc-warsow-git
_srcname=bspc
pkgver=1664573766.111.d0673fd
pkgrel=1
pkgdesc="Quake 3 BSP-to-AAS compiler, to create bot navigation meshes. Warsow version"
arch=("x86_64")
url="https://github.com/Warsow/bspc"
license=('GPL')
groups=()
depends=()
makedepends=('git' 'make')
optdepends=()
provides=("bspc" "bspc-warsow")
conflicts=("bspc" "bspc-warsow")
replaces=()
backup=()
options=()
install=
source=(
	'git+https://github.com/Warsow/bspc.git'
	'bspc-ttimo::git+https://github.com/TTimo/bspc.git'
	'bspc-makefile.patch')
noextract=()
md5sums=('SKIP'
         'SKIP'
         'e3dfc816409a85aa5a62f4b9dd7da258')

pkgver() {
	cd "$srcdir/$_srcname"

	# Use timestamp, because there are no tags or other sorts of version information,
	# to inform AUR helpers' update processes.
	printf "%s.%s.%s" "$(git show -s --format=%ct HEAD)" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
}

prepare() {
	cd "$srcdir/$_srcname"

	patch --forward --strip=1 --input="${srcdir}/bspc-makefile.patch"
	git add Makefile
	git commit -m autopatch-makefile

	git remote add ttimo "${srcdir}/bspc-ttimo" || true
	git fetch ttimo
	git merge ttimo/master -m automerge -s ort -X theirs
}

build() {
	cd "$srcdir/$_srcname"
	
	make -j"$(nproc)"
}
package() {
	cd "$srcdir/$_srcname"

	mkdir -p "$pkgdir/usr/bin"
	cp bspc "$pkgdir/usr/bin/bspc"
}