forked from ports/contrib
39 lines
1.1 KiB
Plaintext
39 lines
1.1 KiB
Plaintext
# Description: Applications, network and servers monitoring software
|
|
# URL: http://www.zabbix.com
|
|
# Maintainer: Mikhail Kolesnik, mike at openbunker dot org
|
|
# Depends on: net-snmp fping mysql
|
|
|
|
name=zabbix_server
|
|
version=1.6.8
|
|
release=1
|
|
source=(http://download.sourceforge.net/zabbix/ZABBIX%20Latest%20Stable/$version/zabbix-$version.tar.gz \
|
|
$name.conf $name)
|
|
|
|
build() {
|
|
cd zabbix-$version
|
|
./configure --prefix=/usr \
|
|
--enable-server \
|
|
--with-net-snmp \
|
|
--with-libcurl \
|
|
--with-mysql
|
|
# replace '--with-mysql' with '--with-pgsql' to build with postgresql support
|
|
|
|
make
|
|
make DESTDIR=$PKG install
|
|
|
|
mkdir -p $PKG/{var/log/$name,var/run/$name}
|
|
|
|
touch $PKG/var/log/$name/$name.log
|
|
chown -R daemon:daemon $PKG/var/log/$name
|
|
find $PKG/var/log/$name -type f | xargs chmod 600
|
|
find $PKG/var/log/$name -type d | xargs chmod 700
|
|
|
|
touch $PKG/var/run/$name/$name.pid
|
|
chown -R daemon:daemon $PKG/var/run/$name
|
|
find $PKG/var/run/$name -type f | xargs chmod 600
|
|
find $PKG/var/run/$name -type d | xargs chmod 700
|
|
|
|
install -D -m 640 -o daemon -g daemon $SRC/$name.conf $PKG/etc/zabbix/$name.conf
|
|
install -D -m 755 $SRC/$name $PKG/etc/rc.d/$name
|
|
}
|