summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 11e9873d357633766ba6a8aec6774dd3303f0f72 (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
pkgname=btc-cirrus-reporter
pkgver=db2b312
pkgrel=2
pkgdesc='bitcoin core cirrus reporter'
arch=('any')
url="https://github.com/pro-bitcoin/cirrus-ci-reporter"
license=('MIT')
makedepends=('go' 'make')
source=("${pkgname}::git+https://github.com/pro-bitcoin/cirrus-ci-reporter.git" "btc-cirrus-reporter.service" "btc-cirrus-reporter.env" "btc-cirrus-reporter.timer")
sha256sums=('SKIP' 'SKIP' 'SKIP' 'SKIP')
backup=('etc/default/btc-cirrus-reporter')

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

build() {
  cd "$pkgname"
  make build
}

package() {
  cd "$pkgname"
  install -Dm755 $pkgname "$pkgdir"/usr/bin/$pkgname
  install -Dm600 "$srcdir/btc-cirrus-reporter.env"  "$pkgdir/etc/default/btc-cirrus-reporter"
  install -Dm644 "$srcdir/btc-cirrus-reporter.service" -t "$pkgdir/usr/lib/systemd/system"
  install -Dm644 "$srcdir/btc-cirrus-reporter.timer" -t "$pkgdir/usr/lib/systemd/system"
}