aboutsummaryrefslogtreecommitdiffstats
path: root/testing/ruuvi-prometheus/APKBUILD
blob: 3547a9b76d8f9fc4646f23f697924bd17bf19056 (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
# Contributor: Joonas Kuorilehto <oss@derbian.fi>
# Maintainer: Joonas Kuorilehto <oss@derbian.fi>
pkgname=ruuvi-prometheus
pkgver=0.1.1
pkgrel=0
pkgdesc="Ruuvi sensor Prometheus exporter"
url="https://github.com/joneskoo/ruuvi-prometheus"
arch="all"
depends="bluez"
license="BSD-2-Clause"
options="!check"  # No test suite
makedepends="go"
subpackages="$pkgname-openrc"

source="$pkgname-$pkgver.tar.gz::https://github.com/joneskoo/ruuvi-prometheus/archive/v$pkgver.tar.gz
	ruuvi-prometheus.initd
	"

build() {
	go build -ldflags="-s -w -X main.version=$pkgver"
}

package() {
	install -Dm755 ./ruuvi-prometheus "$pkgdir"/usr/bin/ruuvi-prometheus
	install -Dm755 "$srcdir"/ruuvi-prometheus.initd "$pkgdir"/etc/init.d/ruuvi-prometheus
}


sha512sums="006f58bc0da72c0f8cc94c9cbfe3b5bf7e9197d87539588d493075f113d77d8fb6a87619b09fddbf2619eb6b28583f6bdb201949cf871bd00bc725bf7cd2c95a  ruuvi-prometheus-0.1.1.tar.gz
6eb05b76ea6289799f37a0e0d42e663d6bd013b46468126cb2ac3c90bfd3421db7044895d49e059e32e9d3f5e870343b494ab455f2164727b111b647af107d61  ruuvi-prometheus.initd"