summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 220540c0bb899889c87be42e6bfd53fb24d44686 (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
# Maintainer: Jordan Christiansen <xordspar0@gmail.com>

# To do:
# * If upstream adds a way to specify the location of the data files, move the
#   package contents to /usr/bin/ and /usr/share/.

pkgname=gearhead
_reponame=gearhead-1
pkgver=1.302
pkgrel=3
pkgdesc="A rougelike mecha role playing game"
arch=(i686 x86_64)
url="http://www.gearheadrpg.com/"
license=('LGPL')
depends=(sdl sdl_image sdl_ttf)
makedepends=(fpc)
source=("https://github.com/jwvhewitt/${_reponame}/archive/v${pkgver}.tar.gz"
		${pkgname}.sh
		${pkgname}.desktop
		${pkgname}.png)
md5sums=('6699f67d4f28bc81cb23181bbba58b58'
         'cd699f36df6275bdb6b345cb5ac8f8f1'
         '93f2e09a403ed309a69569b827350e2d'
         '19f59e008bbe3fdcf39363818d3a5cf1')

build() {
	cd "${_reponame}-${pkgver}"

	fpc -dSDLMODE gharena
}

package() {
	# Install the game itself.
	cd "${_reponame}-${pkgver}"
	install -d "${pkgdir}/opt/${pkgname}"
	cp -ar -t "${pkgdir}/opt/${pkgname}" Image Design GameData Series doc
	install -Dm755 gharena "${pkgdir}/opt/${pkgname}"

	# Install the command line and desktop runners.
	cd "${srcdir}"
	install -Dm755 ${pkgname}.sh "${pkgdir}/usr/bin/${pkgname}"
	# The .desktop file was adapted from Debian's gearhead package.
	install -Dm644 ${pkgname}.desktop "${pkgdir}/usr/share/applications/${pkgname}.desktop"
	install -Dm644 ${pkgname}.png "${pkgdir}/usr/share/pixmaps/${pkgname}.png"

	# Install the documentation
	install -d "${pkgdir}/usr/share/doc/${pkgname}"
	ln -s "/opt/${pkgname}/doc/man_chara.txt" "${pkgdir}/usr/share/doc/${pkgname}/man_chara.txt"
	ln -s "/opt/${pkgname}/doc/man_mecha.txt" "${pkgdir}/usr/share/doc/${pkgname}/man_mecha.txt"
	ln -s "/opt/${pkgname}/doc/man_umek.txt" "${pkgdir}/usr/share/doc/${pkgname}/man_umek.txt"
}