summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: d207788d8c9631754a8cedfcd94492ae1de8bb80 (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
# Maintainer: Otreblan <otreblain@gmail.com>

pkgname=spaceclones-git
pkgver=v1.0.r17.gc651b3f
pkgrel=1
epoch=
pkgdesc="Space invaders clone"
arch=('x86_64')
url="https://github.com/L603/SpaceClones"
license=('GPL3')
groups=()
depends=('sfml' 'fontconfig' 'ttf-liberation')
makedepends=('git' 'cmake')
checkdepends=()
optdepends=()
provides=('spaceclones')
conflicts=('spaceclones')
source=("${pkgname}::git+${url}.git")
md5sums=('SKIP')

prepare() {
	mkdir -p "${pkgname}/build"
}

pkgver() {
	cd "$srcdir/$pkgname"
	( set -o pipefail
	git describe --long 2>/dev/null | sed 's/^v-//;s/\([^-]*-g\)/r\1/;s/-/./g' ||
	printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
	)
}

build() {
	cd "${srcdir}/${pkgname}/build" || exit 1
	cmake \
		-DCMAKE_INSTALL_PREFIX=/usr \
		-DCMAKE_UNITY_BUILD=ON \
		..
	make
}

package() {
	cd "${srcdir}/${pkgname}/build" || exit 1
	make DESTDIR="$pkgdir/" install
}