summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 5b8fb37153c669187a89f191c4eb162a1cac456c (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-agent-plugins-git
pkgver=0.64.1
pkgrel=1
pkgdesc="Plugins for mackerel-agent"
arch=('i686' 'x86_64' 'armv7h')
url="https://github.com/mackerelio/mackerel-agent-plugins"
license=('Apache')
depends=()
makedepends=('git' 'go' 'perl')
provides=("${pkgname%-git}")
conflicts=("${pkgname%-git}")
source=("$pkgname"::'git+https://github.com/mackerelio/mackerel-agent-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-plugin
}

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

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