summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: ce1f8e5da37779c743b5aabf4820a8594fb1a76f (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
# Maintainer: Norbert Preining <norbert@preining.info>
pkgname=descent3
pkgver=1.5.0
pkgrel=1
pkgdesc="Descent 3 Open Source game engine"
arch=('x86_64')
url="https://github.com/intel/$pkgname"
license=('GPL-3.0-or-later')
makedepends=(
	'cmake'
	'ninja'
	'pkgconf'
	'gtest'
)
depends=('sdl2' 'zlib')
source=(
	https://github.com/DescentDevelopers/Descent3/releases/download/v${pkgver}/Descent3-${pkgver}-Source.tar.xz
	descent3.sh
	Descent3.desktop
)
sha256sums=(
	'ba9e33a13c54488bd83c704223759642a27853055b29e71b9aa5db6be92d95a8'
	'cc9732358eaf357bdc82f44c4d89775810dee8b65fee4445cf63e222f70b6751'
	'bc05822b81d68c319a9d4cfc017986f252c81c5b04f7e4c36df8d7420469d12f'
)

prepare() {
	cd "Descent3-${pkgver}-Source"
	cmake --preset linux -DCMAKE_BUILD_TYPE='None'
}

build() {
	cd "Descent3-${pkgver}-Source"
	cmake --build --preset linux --config Debug
}

package() {
	cd "Descent3-${pkgver}-Source"
	install -d -m 755 "${pkgdir}/usr/lib/descent3"
	install -Dm 755 -t "${pkgdir}/usr/lib/descent3" builds/linux/Descent3/Debug/Descent3 
	install -Dm 755 -t "${pkgdir}/usr/lib/descent3" builds/linux/Descent3/Debug/d3-linux.hog
	install -Dm 644 -t "${pkgdir}/usr/share/applications" "${srcdir}/Descent3.desktop"
	install -Dm 755 "${srcdir}/descent3.sh" "${pkgdir}/usr/bin/descent3"
	# install documentation
	install -Dm 644 -t "${pkgdir}/usr/share/doc/${pkgname}" USAGE.md
}