blob: 4ac7bc3a2ae70ea9c2e559fd1e4dab52082d23c3 (
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: xiretza <xiretza+aur@xiretza.xyz>
pkgname=zabbix-agent2-plugin-postgresql
pkgver=7.2.1
pkgrel=1
epoch=1
pkgdesc="Loadable plugin for PostreSQL integration in Zabbix agent2"
arch=(x86_64)
url="https://cdn.zabbix.com/zabbix-agent2-plugins/sources/postgresql"
license=('Apache-2.0')
depends=('glibc' "zabbix-agent2=$pkgver")
makedepends=('go')
source=(
"$url/$pkgname-$pkgver.tar.gz"
"postgresql.conf"
)
sha256sums=('7c8f92ebb3e3bd2c0dc91ca4b0382ceb0ff007da808e43b97fc351ca10677eb1'
'0d6c00e85997b125513c1786cfa6755c8bbcbf9c671a083285e68ef77b5fd801')
build() {
cd "$pkgname-$pkgver"
export CGO_CPPFLAGS="${CPPFLAGS}"
export CGO_CFLAGS="${CFLAGS}"
export CGO_CXXFLAGS="${CXXFLAGS}"
export CGO_LDFLAGS="${LDFLAGS}"
export GOFLAGS="-buildmode=pie -trimpath -ldflags=-linkmode=external -mod=readonly -modcacherw"
go build -o "$pkgname" .
}
package() {
install -Dm755 "$pkgname-$pkgver/$pkgname" "$pkgdir/usr/bin/$pkgname"
install -Dm644 "postgresql.conf" "$pkgdir/etc/zabbix/zabbix_agent2.d/plugins.d/postgresql.conf"
}
|