]> git.pld-linux.org Git - packages/zabbix.git/blob - zabbix.spec
- new, NFY
[packages/zabbix.git] / zabbix.spec
1 #
2 # Conditional build:
3 # _with_mysql - enable postgresql support (by default use mysql)
4 #
5 %define _beta   beta8
6 Summary:        zabbix
7 Summary(pl):    zabbix
8 Name:           zabbix
9 Version:        1.0
10 Release:        0.%{_beta}.0.1
11 License:        GPL v2+
12 Group:          Networking/Admin
13 Source0:        http://dl.sourceforge.net/%{name}/%{name}-%{version}%{_beta}.tar.gz
14 Source1:        %{name}-agent.inetd
15 Source2:        %{name}-trapper.inetd
16 URL:            http://zabbix.sourceforge.net/
17 %{!?_with_mysql:BuildRequires:   mysql-devel}
18 %{?_with_mysql:BuildRequires:   postgresql-devel}
19 BuildRequires:  ucd-snmp-devel
20 BuildRequires:  openssl-devel >= 0.9.6j
21 #PreReq:                -
22 Requires:       %{name}-common
23 #Requires(pre,post):    -
24 #Requires(preun):       -
25 #Requires(postun):      -
26 #Provides:      -
27 #Obsoletes:     -
28 #Conflicts:     -
29 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
30
31 %define _sysconfdir     /etc/%{name}
32
33 %description
34 none yet
35
36 %package common
37 Summary:        zabbix common
38 Group:          Networking/Admin
39
40 %description common
41 blah
42
43 %package frontend-php
44 Summary:        PHP frontend for zabbix
45 Group:          Networking/Admin
46 Requires:       apache
47 Requires:       php
48
49 %description frontend-php
50 blah
51
52 %package agent-inetd
53 Summary:        inetd agent for zabbix
54 Group:          Networking/Admin
55 Requires:       %{name}-common
56 Requires:       inetdaemon
57 Obsoletes:      %{name}-agent-standalone
58
59 %description agent-inetd
60 blah
61
62 %package agent-standalone
63 Summary:        standalone agent for zabbix
64 Group:          Networking/Admin
65 Requires:       %{name}-common
66 Obsoletes:      %{name}-agent-inetd
67
68 %description agent-standalone
69 blah
70
71 %package suckerd
72 Summary:        sucker daemon for zabbix
73 Group:          Networking/Admin
74 Requires:       %{name}
75
76 %description suckerd
77 blah
78
79 %package trapper-inetd
80 Summary:        inetd trapper for zabbix
81 Group:          Networking/Admin
82 Requires:       %{name}
83 Requires:       inetdaemon
84 Obsoletes:      %{name}-trapper-standalone
85
86 %description trapper-inetd
87 blah
88
89 %package trapper-standalone
90 Summary:        standalone trapper for zabbix
91 Group:          Networking/Admin
92 Requires:       %{name}
93 Obsoletes:      %{name}-trapper-inetd
94
95 %description trapper-standalone
96 blah
97
98 %package sender
99 Summary:        zabbix's sender
100 Group:          Networking/Admin
101
102 %description sender
103 blah
104
105 %prep
106 %setup -q -n %{name}-%{version}%{_beta}
107
108 %build
109 rm -f missing
110 %{__aclocal}
111 %{__autoconf}
112 %configure \
113         %{!?_with_mysql:--with-pgsql} \
114         %{?_with_mysql:--with-mysql}
115
116 %{__make}
117
118 %install
119 rm -rf $RPM_BUILD_ROOT
120 install -d $RPM_BUILD_ROOT{%{_sysconfdir},/etc/sysconfig/rc-inetd,%{_sbindir},/home/services/html/zabbix}
121
122 install bin/zabbix_* $RPM_BUILD_ROOT%{_sbindir}
123 install misc/conf/* $RPM_BUILD_ROOT%{_sysconfdir}
124 cp -r frontends/php/* $RPM_BUILD_ROOT/home/services/html/zabbix
125
126 install %SOURCE1 $RPM_BUILD_ROOT/etc/sysconfig/rc-inetd/zabbix-agent
127 install %SOURCE2 $RPM_BUILD_ROOT/etc/sysconfig/rc-inetd/zabbix-trapper
128
129 %clean
130 rm -rf $RPM_BUILD_ROOT
131
132 %pre common
133 if [ -z "`/usr/bin/getgid zabbix`" ]; then
134         /usr/sbin/groupadd zabbix
135 fi
136 if [ -z "`/bin/id -u zabbix 2>/dev/null`" ]; then
137         /usr/sbin/useradd -d / -g zabbix -c "Zabbix User" -s /bin/false zabbix
138 fi
139
140 %postun common
141 if [ "$1" = "0" ]; then
142         /usr/sbin/userdel zabbix
143         /usr/sbin/groupdel zabbix
144 fi
145
146 %post agent-inetd
147 if [ -f /var/lock/subsys/rc-inetd ]; then
148         /etc/rc.d/init.d/rc-inetd reload
149 else
150         echo "Type \"/etc/rc.d/init.d/rc-inetd start\" to start inet server" 1>&2
151 fi
152
153 %postun agent-inetd
154 if [ -f /var/lock/subsys/rc-inetd ]; then
155         /etc/rc.d/init.d/rc-inetd reload
156 fi
157
158 %post trapper-inetd
159 if [ -f /var/lock/subsys/rc-inetd ]; then
160         /etc/rc.d/init.d/rc-inetd reload
161 else
162         echo "Type \"/etc/rc.d/init.d/rc-inetd start\" to start inet server" 1>&2
163 fi
164
165 %postun trapper-inetd
166 if [ -f /var/lock/subsys/rc-inetd ]; then
167         /etc/rc.d/init.d/rc-inetd reload
168 fi
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.06879 seconds and 4 git commands to generate.