]> git.pld-linux.org Git - packages/zabbix.git/blame - zabbix.spec
ed691c777df63aa6081dde750f10e733 zabbix-1.0beta8.tar.gz
[packages/zabbix.git] / zabbix.spec
CommitLineData
10a854a6
TO
1#
2# Conditional build:
3# _with_mysql - enable postgresql support (by default use mysql)
4#
5%define _beta beta8
6Summary: zabbix
7Summary(pl): zabbix
8Name: zabbix
9Version: 1.0
10Release: 0.%{_beta}.0.1
11License: GPL v2+
12Group: Networking/Admin
13Source0: http://dl.sourceforge.net/%{name}/%{name}-%{version}%{_beta}.tar.gz
14Source1: %{name}-agent.inetd
15Source2: %{name}-trapper.inetd
16URL: http://zabbix.sourceforge.net/
17%{!?_with_mysql:BuildRequires: mysql-devel}
18%{?_with_mysql:BuildRequires: postgresql-devel}
19BuildRequires: ucd-snmp-devel
20BuildRequires: openssl-devel >= 0.9.6j
21#PreReq: -
22Requires: %{name}-common
23#Requires(pre,post): -
24#Requires(preun): -
25#Requires(postun): -
26#Provides: -
27#Obsoletes: -
28#Conflicts: -
29BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
30
31%define _sysconfdir /etc/%{name}
32
33%description
34none yet
35
36%package common
37Summary: zabbix common
38Group: Networking/Admin
39
40%description common
41blah
42
43%package frontend-php
44Summary: PHP frontend for zabbix
45Group: Networking/Admin
46Requires: apache
47Requires: php
48
49%description frontend-php
50blah
51
52%package agent-inetd
53Summary: inetd agent for zabbix
54Group: Networking/Admin
55Requires: %{name}-common
56Requires: inetdaemon
57Obsoletes: %{name}-agent-standalone
58
59%description agent-inetd
60blah
61
62%package agent-standalone
63Summary: standalone agent for zabbix
64Group: Networking/Admin
65Requires: %{name}-common
66Obsoletes: %{name}-agent-inetd
67
68%description agent-standalone
69blah
70
71%package suckerd
72Summary: sucker daemon for zabbix
73Group: Networking/Admin
74Requires: %{name}
75
76%description suckerd
77blah
78
79%package trapper-inetd
80Summary: inetd trapper for zabbix
81Group: Networking/Admin
82Requires: %{name}
83Requires: inetdaemon
84Obsoletes: %{name}-trapper-standalone
85
86%description trapper-inetd
87blah
88
89%package trapper-standalone
90Summary: standalone trapper for zabbix
91Group: Networking/Admin
92Requires: %{name}
93Obsoletes: %{name}-trapper-inetd
94
95%description trapper-standalone
96blah
97
98%package sender
99Summary: zabbix's sender
100Group: Networking/Admin
101
102%description sender
103blah
104
105%prep
106%setup -q -n %{name}-%{version}%{_beta}
107
108%build
109rm -f missing
110%{__aclocal}
111%{__autoconf}
112%configure \
113 %{!?_with_mysql:--with-pgsql} \
114 %{?_with_mysql:--with-mysql}
115
116%{__make}
117
118%install
119rm -rf $RPM_BUILD_ROOT
120install -d $RPM_BUILD_ROOT{%{_sysconfdir},/etc/sysconfig/rc-inetd,%{_sbindir},/home/services/html/zabbix}
121
122install bin/zabbix_* $RPM_BUILD_ROOT%{_sbindir}
123install misc/conf/* $RPM_BUILD_ROOT%{_sysconfdir}
124cp -r frontends/php/* $RPM_BUILD_ROOT/home/services/html/zabbix
125
126install %SOURCE1 $RPM_BUILD_ROOT/etc/sysconfig/rc-inetd/zabbix-agent
127install %SOURCE2 $RPM_BUILD_ROOT/etc/sysconfig/rc-inetd/zabbix-trapper
128
129%clean
130rm -rf $RPM_BUILD_ROOT
131
132%pre common
133if [ -z "`/usr/bin/getgid zabbix`" ]; then
134 /usr/sbin/groupadd zabbix
135fi
136if [ -z "`/bin/id -u zabbix 2>/dev/null`" ]; then
137 /usr/sbin/useradd -d / -g zabbix -c "Zabbix User" -s /bin/false zabbix
138fi
139
140%postun common
141if [ "$1" = "0" ]; then
142 /usr/sbin/userdel zabbix
143 /usr/sbin/groupdel zabbix
144fi
145
146%post agent-inetd
147if [ -f /var/lock/subsys/rc-inetd ]; then
148 /etc/rc.d/init.d/rc-inetd reload
149else
150 echo "Type \"/etc/rc.d/init.d/rc-inetd start\" to start inet server" 1>&2
151fi
152
153%postun agent-inetd
154if [ -f /var/lock/subsys/rc-inetd ]; then
155 /etc/rc.d/init.d/rc-inetd reload
156fi
157
158%post trapper-inetd
159if [ -f /var/lock/subsys/rc-inetd ]; then
160 /etc/rc.d/init.d/rc-inetd reload
161else
162 echo "Type \"/etc/rc.d/init.d/rc-inetd start\" to start inet server" 1>&2
163fi
164
165%postun trapper-inetd
166if [ -f /var/lock/subsys/rc-inetd ]; then
167 /etc/rc.d/init.d/rc-inetd reload
168fi
169
170%files
171%defattr(644,root,root,755)
172%doc doc/manual.pdf AUTHORS ChangeLog FAQ TODO create bin/ZabbixW32.exe
173
174%files common
175%defattr(644,root,root,755)
176%attr(750,root,zabbix) %dir %{_sysconfdir}
177
178%files frontend-php
179%defattr(644,root,root,755)
180/home/services/html/zabbix
181
182%files agent-inetd
183%defattr(644,root,root,755)
184%attr(640,root,zabbix) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/zabbix_agent.conf
185%attr(640,root,root) %config(noreplace) %verify(not mtime md5 size) /etc/sysconfig/rc-inetd/zabbix-agent
186%attr(755,root,root) %{_sbindir}/zabbix_agent
187
188%files agent-standalone
189%defattr(644,root,root,755)
190%attr(640,root,zabbix) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/zabbix_agentd.conf
191%attr(755,root,root) %{_sbindir}/zabbix_agentd
192
193%files suckerd
194%defattr(644,root,root,755)
195%attr(640,root,zabbix) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/zabbix_suckerd.conf
196%attr(755,root,root) %{_sbindir}/zabbix_suckerd
197
198%files trapper-inetd
199%defattr(644,root,root,755)
200%attr(640,root,zabbix) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/zabbix_trapper.conf
201%attr(640,root,root) %config(noreplace) %verify(not mtime md5 size) /etc/sysconfig/rc-inetd/zabbix-trapper
202%attr(755,root,root) %{_sbindir}/zabbix_trapper
203
204%files trapper-standalone
205%defattr(644,root,root,755)
206%attr(640,root,zabbix) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/zabbix_trapperd.conf
207%attr(755,root,root) %{_sbindir}/zabbix_trapperd
208
209%files sender
210%defattr(644,root,root,755)
211%attr(755,root,root) %{_sbindir}/zabbix_sender
This page took 0.120282 seconds and 4 git commands to generate.