Ticket #31032: Portfile

File Portfile, 3.2 KB (added by kwcheong@…, 13 years ago)

Update Portfile for 1.8.6

Line 
1# $Id: Portfile 71305 2010-09-08 01:38:10Z markd@macports.org $
2
3PortSystem      1.0
4
5name                    zabbix_agentd
6version                 1.8.6
7categories              net
8maintainers             markd openmaintainer
9platforms               darwin
10
11description             An open source application and network monitor (Agent)
12
13long_description        ${description}
14
15homepage                http://www.zabbix.com/
16master_sites            sourceforge:zabbix
17checksums               md5 4642fd263167211a73a02fe7f3bcd998
18
19configure.args          --enable-agent \
20                        --bindir=${prefix}/bin/zabbix \
21                        --sbindir=${prefix}/sbin/zabbix \
22                        --libexecdir=${prefix}/libexec/zabbix \
23                        --datadir=${prefix}/share/zabbix \
24                        --sysconfdir=${prefix}/etc/zabbix \
25                        --localstatedir=${prefix}/var/zabbix
26
27distname                zabbix-1.8.6
28
29configure.ldflags-append        -lresolv
30
31startupitem.create      yes
32startupitem.name        zabbix_agentd
33startupitem.start       "${prefix}/share/zabbix/zabbix_agentd.init start"
34startupitem.stop        "${prefix}/share/zabbix/zabbix_agentd.init stop"
35
36
37post-patch {
38        reinplace "s|# PidFile=/tmp/zabbix_agentd.pid|PidFile=/var/tmp/zabbix_agentd.pid|g" \
39                ${worksrcpath}/misc/conf/zabbix_agentd.conf
40}
41
42
43pre-destroot {
44        adduser zabbix
45        addgroup zabbix
46}
47
48post-destroot {
49
50# Copy sample agent .conf files
51        xinstall -d -m 755 -d ${destroot}${prefix}/etc/zabbix
52        xinstall -m 755  ${worksrcpath}/misc/conf/zabbix_agent.conf \
53                ${destroot}${prefix}/etc/zabbix/zabbix_agent.conf.sample
54        xinstall -m 755  ${worksrcpath}/misc/conf/zabbix_agentd.conf \
55                ${destroot}${prefix}/etc/zabbix/zabbix_agentd.conf.sample
56
57# Copy a startup script for the agent
58        xinstall -d -m 755 -d ${destroot}${prefix}/share/zabbix
59        xinstall -m 755 ${portpath}/${filesdir}/zabbix_agentd.init \
60                ${destroot}${prefix}/share/zabbix
61        reinplace "s|__PREFIX__|${prefix}|g" \
62        ${destroot}${prefix}/share/zabbix/zabbix_agentd.init
63
64# Copy Win32 agent for normal and agent_only installs
65                xinstall -d -m 755 -d ${destroot}${prefix}/share/zabbix/zabbix_agent_win32
66                xinstall -m 755 ${worksrcpath}/bin/win32/zabbix_agentd.exe \
67                        ${destroot}${prefix}/share/zabbix/zabbix_agent_win32
68}
69
70
71notes \
72"#### ZABBIX agent installation section (steps 1 - 3 only) ####
73
741) Edit the sample .conf file ${prefix}/etc/zabbix/zabbix_agentd.conf (rename & omit .sample)
75
76   Set the following variable to the ip address of your ZABBIX server to
77   allow it access to the agent.
78
79        Server=x.x.x.x
80
81
822) Set zabbix_agentd to run at system boot
83
84        sudo launchctl load -w /Library/LaunchDaemons/org.macports.zabbix_agentd.plist
85
86   To start Zabbix manually, use: ${prefix}/share/zabbix/zabbix_agentd.init start (stop|status)
87
88
893) A Win32 agent is in ${prefix}/share/zabbix/zabbix_agent_win32 for
90   installation on Windows NT 4.0, Windows 2000, and Windows XP.
91
92
93#### End ZABBIX agent installation section ####
94####                                       ####"