diff options
author | MF Akane | 2017-04-21 07:51:51 +0900 |
---|---|---|
committer | MF Akane | 2017-04-21 07:51:51 +0900 |
commit | e758a47087d8acbc3065b885387a884afcff93ef (patch) | |
tree | 56c61fea8ab7189ab466a5164548ac658a7fb308 | |
download | aur-e758a47087d8acbc3065b885387a884afcff93ef.tar.gz |
Initial import
-rw-r--r-- | .SRCINFO | 21 | ||||
-rw-r--r-- | .gitignore | 8 | ||||
-rw-r--r-- | PKGBUILD | 40 |
3 files changed, 69 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..10adc41ca607 --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,21 @@ +# Generated by mksrcinfo v8 +# Thu Apr 20 22:25:20 UTC 2017 +pkgbase = mackerel-check-plugins-git + pkgdesc = Check Plugins for monitoring written in golang + pkgver = 0.10.0 + pkgrel = 1 + url = https://github.com/mackerelio/go-check-plugins + arch = i686 + arch = x86_64 + arch = armv7h + license = Apache + makedepends = git + makedepends = go + makedepends = jq + provides = mackerel-check-plugins + conflicts = mackerel-check-plugins + source = mackerel-check-plugins-git::git+https://github.com/mackerelio/go-check-plugins.git + sha1sums = SKIP + +pkgname = mackerel-check-plugins-git + diff --git a/.gitignore b/.gitignore new file mode 100644 index 000000000000..ebb97e36e1d1 --- /dev/null +++ b/.gitignore @@ -0,0 +1,8 @@ +# Ignore everything +* +!.gitignore + +# Except needed files +!PKGBUILD +!.SRCINFO +!*.install diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..746481c3683c --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,40 @@ +# Maintainer: MF Akane <aur at sorairo dot pictures> +pkgname=mackerel-check-plugins-git +pkgver=0.10.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' 'jq') +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" + + export GOPATH="$srcdir/go" + mkdir -p "$GOPATH" + + make deps + mkdir -p build + + for i in `cat "$srcdir/$pkgname/packaging/config.json" | /usr/bin/jq -r '.plugins[]'`; do + cd "$srcdir/$pkgname/check-$i" + go build -ldflags "-s -w" -o "$srcdir/$pkgname/build/check-$i" + done +} + +package() { + for i in `cat "$srcdir/$pkgname/packaging/config.json" | /usr/bin/jq -r '.plugins[]'`; do + install -Dm755 "$srcdir/$pkgname/build/check-$i" "$pkgdir/usr/bin/check-$i" + done +} |