summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: c8e4c663f4ade027b419a05b94ef30978dae11e3 (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
# Maintainer: kleintux <reg-archlinux AT klein DOT tuxli DOT ch> 
# Contributor: Julien Savard <juju2143@gmail.com>

pkgname=supersonicball-git
pkgver=0.9.3.beta1.1.r0.gdd34415
pkgrel=1
pkgdesc="The crazy ball tunnel game"
arch=('any')
url="https://github.com/juju2143/supersonicball"
license=('GPL')
depends=('love>=0.9.0')
makedepends=('git' 'zip')
conflicts=('supersonicball')
provides=('supersonicball')
source=(${pkgname%-git}.desktop
        ${pkgname%-git}.sh
        "$pkgname"::"git+${url}.git")
sha1sums=('58f6d0a0058d81c8419a0cb65212a63515b95885'
        '4515bad415633fce6174e54a871454c26af1848b'
        'SKIP')

pkgver() {
	cd "${srcdir}/${pkgname}"
	git describe --long --tags | sed -E 's/([^-]*-g)/r\1/;s/-/./g'
}

build() {
	cd "${srcdir}/${pkgname}"
	zip -r ${pkgname%-git}.love *
}

package() {
	sed "s/Version=git/Version=${pkgver}/" "${srcdir}/${pkgname%-git}.desktop" > "${srcdir}/${pkgname}.desktop"

	# Install Data
	install -D -m755 "${srcdir}/${pkgname}/${pkgname%-git}.love" "${pkgdir}/usr/share/${pkgname%-git}/${pkgname%-git}.love"
	install -D -m644 "${srcdir}/${pkgname}/README.md" "$pkgdir/usr/share/${pkgname%-git}/README"

	# Install Launcher
	install -D -m755 "${srcdir}/${pkgname%-git}.sh" "${pkgdir}/usr/bin/${pkgname%-git}"

	# Install Desktop
	install -D -m644 "${srcdir}/${pkgname}.desktop" "${pkgdir}/usr/share/applications/${pkgname%-git}.desktop"
}