summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 4f57ff713452d9ee34980b47e4039edbfab5e5f8 (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
# Maintainer: Ronny R <ronny-aur[at]adke*org>
pkgname=rfled-server-git
pkgver=r20.68cbf57
pkgrel=1
pkgdesc="Golang binary to emulate a LimitlessLED WiFi Bridge 4.0 unit."
arch=('x86_64' 'i686' 'x86_64')
url="https://github.com/riptidewave93/RFLED-Server"
license=('GPL')
depends=('glibc')
makedepends=('git' 'go')
provides=("${pkgname%-git}")
conflicts=("${pkgname%-git}")
source=('rfled-server::git+https://github.com/riptidewave93/RFLED-Server.git'
	'rfled-server.service')
md5sums=('SKIP'
         'a71bdffc37ea6e4ea8e24a3731793798')

pkgver() {
	cd "$srcdir/${pkgname%-git}"

	printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"

}

prepare() {
	cd "$srcdir/${pkgname%-git}"
}

build() {
	cd "$srcdir/${pkgname%-git}"
	./build.sh
}

package() {
	install -D "rfled-server.service" -t $pkgdir/usr/lib/systemd/system/
	cd "$srcdir/${pkgname%-git}"
	case "$CARCH" in
		armv7h)
			install -D -T -m744 -o root:root "bin/rfled-server-armv7" $pkgdir/usr/bin/rfled-server
			;;
		x86_64)
			install -D -T -m744 -o root -g root "bin/rfled-server-amd64" $pkgdir/usr/bin/rfled-server
			;;
	esac
}