summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 5464da9df49f7a44e1069d9e5ac9fa745739f3c3 (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
61
62
# Maintainer: Nikos Fytilis <n-fit@hotmail.com>
# Contributor: Pavel Lymarev <x-user at bk dot ru>
# Contributor: Jameson Pugh <imntreal@gmail.com>
# Contributor: Rene Schoebel (wesley) <schoebel.r at gmail dot com>

pkgname=openjk-bin
pkgver='2017.03.20.855bf349'
_pkgver=$(echo $pkgver | tr . -)
pkgrel=1
pkgdesc="Open Source Jedi Knight II + III Engine - pre built"
arch=('x86_64')
url="https://github.com/JACoders/OpenJK"
license=('GPL')
depends=('libgl' 'openal' 'zlib' 'sdl2' 'libjpeg' 'glu')
makedepends=('tr')
optdepends=('libpng')
provides=(openjk)
conflicts=(openjk-git)
source=("https://builds.openjk.org/openjk-$_pkgver-linux-64.tar.gz"
	'openjkmp.png'
	'openjksp.png'
	'openjkmp.desktop'
	'openjksp.desktop')
sha256sums=('9a209cd0d96f5237e0e1c9b5c8ef74bba8956d431d5381f22fb74137bf981f68'
            '0e82e720777eeb2043c2c25cdbce702c6d4ca077543aedfe51e5c4e96cf03969'
            'afb2c1a757720c70798e7f7218f823297a43bc61e0cb192e9443df67c2963903'
            'd3ad7dd270e57d36a22caef21bff17f2eb4acb0ad9087f6a17ca4a0bf9c566fc'
            'd03554bd926954218c243a1a97d39ea9700d064a2374f671249a533ebd970375')
package() {
	cd "${srcdir}"
	install -d "${pkgdir}"/opt/JediAcademy
	cp -r install/JediAcademy/* "${pkgdir}"/opt/JediAcademy


	mkdir -p "${pkgdir}/usr/bin"
	_jkarch=$arch
	cat > ${pkgdir}/usr/bin/openjk << EOF
#!/bin/bash
cd /opt/JediAcademy
exec ./openjk.${_jkarch} \$@
EOF
	cat > ${pkgdir}/usr/bin/openjk_sp << EOF
#!/bin/bash
cd /opt/JediAcademy
exec ./openjk_sp.${_jkarch} \$@
EOF
	cat > ${pkgdir}/usr/bin/openjkded << EOF
#!/bin/bash
cd /opt/JediAcademy
exec ./openjkded.${_jkarch} \$@
EOF
	chmod +x ${pkgdir}/usr/bin/openjk
	chmod +x ${pkgdir}/usr/bin/openjk_sp
	chmod +x ${pkgdir}/usr/bin/openjkded

	chmod 755 -R ${pkgdir}/opt/JediAcademy

	install -Dm755 "${srcdir}/openjkmp.png" "${pkgdir}/usr/share/pixmaps/openjkmp.png"
	install -Dm755 "${srcdir}/openjksp.png" "${pkgdir}/usr/share/pixmaps/openjksp.png"
	install -Dm755 "${srcdir}/openjkmp.desktop" "${pkgdir}/usr/share/applications/openjkmp.desktop"
	install -Dm755 "${srcdir}/openjksp.desktop" "${pkgdir}/usr/share/applications/openjksp.desktop"
}