summaryrefslogtreecommitdiffstats
path: root/main/zabbix/APKBUILD
diff options
context:
space:
mode:
Diffstat (limited to 'main/zabbix/APKBUILD')
-rw-r--r--main/zabbix/APKBUILD107
1 files changed, 107 insertions, 0 deletions
diff --git a/main/zabbix/APKBUILD b/main/zabbix/APKBUILD
new file mode 100644
index 000000000..2c280992e
--- /dev/null
+++ b/main/zabbix/APKBUILD
@@ -0,0 +1,107 @@
+# Contributor: Jeff Bilyk <jbilyk at gmail>
+# Maintainer: Natanael Copa <natanael.copa@gmail.com>
+pkgname=zabbix
+pkgver=1.8.3
+pkgrel=1
+pkgdesc="Enterprise-class open source distributed monitoring"
+url="www.zabbix.com"
+license="GPL"
+depends="php php-pgsql php-gd php-curl php-bcmath php-sockets php-iconv fping"
+makedepends="postgresql-dev curl-dev libiconv-dev net-snmp-dev"
+install="$pkgname.pre-install"
+pkgusers="zabbix"
+pkggroups="zabbix"
+subpackages="$pkgname-doc $pkgname-agent"
+source="http://downloads.sourceforge.net/$pkgname/$pkgname-$pkgver.tar.gz
+ zabbix_server.conf
+ zabbix_trapper.conf
+ zabbix_proxy.conf
+ zabbix_agentd.conf
+ zabbix-dn_skipname.patch
+ zabbix-getloadavg.patch
+ zabbix-server.initd
+ zabbix-agentd.initd
+ zabbix-proxy.initd
+ "
+
+_builddir="$srcdir"/$pkgname-$pkgver
+
+prepare() {
+ cd "$_builddir"
+ for i in $source; do
+ case $i in
+ *.patch)
+ msg "Applying $i"
+ patch -p1 -i "$srcdir"/$i || return 1
+ ;;
+ esac
+ done
+}
+
+build() {
+ cd "$_builddir"
+ ./configure --prefix=/usr \
+ --sysconfdir=/etc \
+ --mandir=/usr/share/man \
+ --infodir=/usr/share/info \
+ --enable-server \
+ --enable-agent \
+ --enable-proxy \
+ --enable-ipv6 \
+ --with-pgsql \
+ --with-net-snmp \
+ --with-libcurl
+ make || return 1
+}
+
+package() {
+ local _wwwdir="$pkgdir"/usr/share/webapps/zabbix
+ cd "$_builddir"
+ make DESTDIR="$pkgdir" install
+
+ install -d -m0750 -o zabbix -g zabbix \
+ "$pkgdir"/var/run/zabbix "$pkgdir"/var/log/zabbix
+
+ install -d "$pkgdir"/etc/zabbix
+ install -d "$pkgdir"/usr/share/zabbix/dbms/create/data
+ install -d -m0755 "$_wwwdir"
+ install -D -m0644 "$srcdir"/zabbix_server.conf "$pkgdir"/etc/zabbix/zabbix_server.conf
+ install -D -m0644 "$srcdir"/zabbix_trapper.conf "$pkgdir"/etc/zabbix/zabbix_trapper.conf
+ install -D -m0755 "$srcdir"/zabbix-$pkgver/create/data/data.sql "$pkgdir"/usr/share/zabbix/dbms/create/data/data.sql
+ install -D -m0755 "$srcdir"/zabbix-$pkgver/create/data/images_pgsql.sql "$pkgdir"/usr/share/zabbix/dbms/create/data/images_pgsql.sql
+ install -D -m0755 "$srcdir"/zabbix-$pkgver/create/schema/postgresql.sql "$pkgdir"/usr/share/zabbix/dbms/create/postgresql.sql
+ cp -r "$srcdir"/zabbix-$pkgver/frontends/php/* "$_wwwdir"
+
+ for i in server proxy; do
+ install -D -m0755 "$srcdir"/zabbix-$i.initd \
+ "$pkgdir"/etc/init.d/zabbix-$i || return 1
+ done
+
+}
+
+agent() {
+ pkgdesc="Zabbix Network Monitoring Agent"
+ depends=
+ install="$subpkgname.pre-install"
+
+ install -d -m0750 -o zabbix -g zabbix \
+ "$subpkgdir"/var/run/zabbix "$subpkgdir"/var/log/zabbix
+
+ install -d "$subpkgdir"/etc/zabbix
+ install -D -m0644 "$srcdir"/zabbix_agentd.conf "$subpkgdir"/etc/zabbix/zabbix_agentd.conf
+ install -D -m0755 "$srcdir"/zabbix-agentd.initd "$subpkgdir"/etc/init.d/zabbix-agentd
+
+ mkdir -p "$subpkgdir"/usr/sbin
+ mv -f "$pkgdir"/usr/sbin/zabbix_agentd "$subpkgdir"/usr/sbin/
+}
+
+md5sums="575c31880d73f6fe41e730874ebfc633 zabbix-1.8.3.tar.gz
+26b0401a83bdb1dce29338e5b2786620 zabbix_server.conf
+9832a81e134c8e2c11e2a06b7adbf88f zabbix_trapper.conf
+0310b92afb3f35c1075fff53db737212 zabbix_proxy.conf
+0fe55827fe49424a9f59fd43cc905ae1 zabbix_agentd.conf
+d13166483792401be2d25b37b0170b82 zabbix-dn_skipname.patch
+8d1d2e53479173aac0df0c38a4d6afda zabbix-getloadavg.patch
+e42394e798ab98a8ff4babe68e04633a zabbix-server.initd
+88374bba8a8fdfabfcfe9be6dd12095f zabbix-agentd.initd
+32abde1cc00c2eeccddb7e038117d0ab zabbix-proxy.initd"