summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 8a8ff44fe73f9b1f10589628346df33ff6d75fab (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
# Maintainer: MF Akane <aur at sorairo dot pictures>
pkgname=mackerel-check-plugins-git
pkgver=0.47.0
pkgrel=1
pkgdesc="Check Plugins for monitoring written in golang"
arch=('i686' 'x86_64' 'armv7h')
url="https://github.com/mackerelio/go-check-plugins"
license=('Apache')
depends=()
makedepends=('git' 'go')
provides=("${pkgname%-git}")
conflicts=("${pkgname%-git}")
source=("$pkgname"::'git+https://github.com/mackerelio/go-check-plugins.git')
sha1sums=('SKIP')

pkgver() {
  cd "$srcdir/$pkgname"
  git describe --tags --abbrev=0 | sed 's/^v//' | sed 's/\+.*$$//'
}

build() {
  cd "$srcdir/$pkgname"
  make build/mackerel-check
}

package() {
  install -Dm755 "$srcdir/$pkgname/build/mackerel-check" "$pkgdir/usr/bin/mackerel-check"

  for i in `cat "$srcdir/$pkgname/packaging/deb/debian/source/include-binaries"`; do
    filename=$(basename $i)
    ln -s ./mackerel-check "$pkgdir/usr/bin/$filename"
  done
}