aboutsummaryrefslogtreecommitdiffstats
path: root/testing/zabbix-agent2-alpine/APKBUILD
blob: 018665d578469180a526a48d5fe82a0ab97e2255 (plain) (blame)
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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
# Contributor: Kevin Daudt <kdaudt@alpinelinux.org>
# Maintainer: Kevin Daudt <kdaudt@alpinelinux.org>
pkgname=zabbix-agent2-alpine
pkgver=5.0.1
pkgrel=2
_plugins_version=0.2
pkgdesc="Zabbix Agent2 with additional plugins"
url="https://gitlab.alpinelinux.org/alpine/infra/infra-packages/-/tree/master/infra/zabbix-agent2-alpine"
arch="all !mips !mips64" # missing go
license="GPL-2.0-or-later"
makedepends="go autoconf automake pcre-dev zlib-dev openssl-dev openssl-libs-static"
options="!check" # no test suite
subpackages="$pkgname-openrc"
source="$pkgname-$pkgver.tar.gz::https://github.com/zabbix/zabbix/archive/$pkgver.tar.gz
	https://gitlab.alpinelinux.org/alpine/infra/zabbix-agent2-plugins/-/archive/v$_plugins_version/zabbix-agent2-plugins-v$_plugins_version.tar.gz
	zabbix-agent2.initd
	zabbix_agent2.conf
	enable-plugins.patch
	"
install="$pkgname.pre-install"
builddir="$srcdir/zabbix-$pkgver"

prepare() {
	default_prepare
	./bootstrap.sh

	cp -r "$srcdir"/zabbix-agent2-plugins-v$_plugins_version/plugins/* \
		"$builddir"/src/go/plugins/
}

build() {
	./configure \
		--sysconfdir=/etc/zabbix \
		--mandir=/usr/share/man \
		--with-openssl \
		--enable-agent2 \
		--enable-static
	make
}

package() {
	install -Dm0755 src/go/bin/zabbix_agent2 $pkgdir/usr/sbin/zabbix_agent2
	install -Dm0755 $srcdir/zabbix-agent2.initd $pkgdir/etc/init.d/zabbix-agent2
	install -dm0755 $pkgdir/etc/zabbix/agent2.conf.d/

	install -Dm0644 $srcdir/zabbix_agent2.conf $pkgdir/etc/zabbix/zabbix_agent2.conf
}

sha512sums="831920f49c9d8f6d1e0da7be82a2cca2007558ea73e35584939e77a1a9f517c4e5154676afff53f31d13f887d6369add960192bbdbdb40b7b56218a907528d66  zabbix-agent2-alpine-5.0.1.tar.gz
1270b0d4166aba0e199ea66ed870eafc1fb65ed2c49317e35567504ad651ea294849656ea0b98172b896a91eeb5c87c692217a986e6bc6ed896498e7c7776197  zabbix-agent2-plugins-v0.2.tar.gz
177fafc9534a1107f91b428ddf2655e0ef617c417189afa40e3bb34b1e8492dafd53db5845fd97096b90b846da2cc27775d1bea942b0f6f8275de49778b8c154  zabbix-agent2.initd
a5668a01ef840f63516b86976f27906f1e4689fb7c1fd0864ce82028d2405fc6a5ba3b9d1bfa2828343935cbeb5fd9c6c7aba4bf1a00e3e301b12199ea61bd13  zabbix_agent2.conf
fb5b237edd229c6300867084810c9bb051e9c7ee09fc4499837d8be9f99678549de757cf2c5dbecf513322e4705e7ea2be8e4f4965fded3d09a10a69ec17b37e  enable-plugins.patch"