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