summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 3e2832f2ad7a6a982b66754218d3200934cf2f44 (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
# Maintainer: Ainola
# Contributor: Pio

pkgname=mrrescue
pkgver=1.02c
pkgrel=2
pkgdesc="An arcade styled 2d action game centered around evacuating civilians from burning buildings."
arch=('any')
url="http://tangramgames.dk/games/mrrescue/"
license=('CCPL:by-sa' 'zlib')
depends=('love')
makedepends=('gendesk')
source=("https://github.com/SimonLarsen/mrrescue/releases/download/v${pkgver}/${pkgname}-${pkgver}.love")
md5sums=('85897f04f2e9c3aaded74bf178aeab4c')

build() {
	# Generate desktop file
	cd "${srcdir}"
	gendesk -n

	# Generate run script
	echo -e "#!/bin/sh\nlove /usr/share/mrrescue/mrrescue-${pkgver}.love" > "${pkgname}.sh"
}

package() {
	# Copy game and license
	cd "${srcdir}" #/${pkgname}-${pkgver}-love"
	install -Dm644 LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
	install -Dm644 "${pkgname}-${pkgver}.love" "${pkgdir}/usr/share/${pkgname}/${pkgname}-${pkgver}.love"
	# Extract an image to be used as icon
	unzip -p "${pkgname}-${pkgver}.love" data/splash.png > mrrescue.png
	# Copy desktop file, icon and run script
	install -Dm644 "${pkgname}.desktop" "${pkgdir}/usr/share/applications/${pkgname}.desktop"
	install -Dm644 "${pkgname}.png" "${pkgdir}/usr/share/pixmaps/${pkgname}.png"
	install -D "${pkgname}.sh" "${pkgdir}/usr/bin/${pkgname}"
}