]> git.pld-linux.org Git - packages/nginx.git/blob - nginx.spec
- re-add monit-rc subpackage and put all monitrc files into it dependig on what bcond...
[packages/nginx.git] / nginx.spec
1 # TODO
2 # - /etc/sysconfig/nginx file
3 # - missing perl build/install requires
4 # - prepare pld style like nginx.conf
5 # - maybe -with-cpu-opt=CPU (pentium, pentiumpro, pentium3, pentium4, athlon, opteron, amd64, sparc32, sparc64, ppc64)
6 #
7 # Conditional build for nginx:
8 %bcond_without  light           # don't build light version
9 %bcond_without  mail            # don't build imap/mail proxy
10 %bcond_without  perl            # don't build with perl module
11 %bcond_without  addition        # adds module
12 %bcond_without  dav             # WebDAV
13 %bcond_without  flv             # FLV stream
14 %bcond_without  sub             # ngx_http_sub_module
15 %bcond_without  poll            # poll
16 %bcond_without  realip          # real ip (behind proxy)
17 %bcond_without  rtsig           # rtsig
18 %bcond_without  select          # select
19 %bcond_without  status          # stats module
20 %bcond_without  ssl             # ssl support
21 %bcond_with     http_browser    # header "User-agent" parser
22 #
23 Summary:        High perfomance HTTP and reverse proxy server
24 Summary(pl.UTF-8):      Serwer HTTP i odwrotne proxy o wysokiej wydajności
25 Name:           nginx
26 Version:        0.5.33
27 Release:        0.5
28 License:        BSD-like
29 Group:          Networking/Daemons
30 Source0:        http://sysoev.ru/nginx/%{name}-%{version}.tar.gz
31 # Source0-md5:  a78be74b4fd8e009545ef02488fcac86
32 Source1:        http://www.nginx.eu/favicon.ico
33 # Source1-md5:  2aaf2115c752cbdbfb8a2f0b3c3189ab
34 Source2:        http://www.nginx.eu/download/proxy.conf
35 # Source2-md5:  f5263ae01c2edb18f46d5d1df2d3a5cd
36 Source3:        %{name}.logrotate
37 Source4:        %{name}.mime
38 Source5:        %{name}-light.conf
39 Source6:        %{name}-light.monitrc
40 Source7:        %{name}-mail.conf
41 Source8:        %{name}-mail.monitrc
42 Source9:        %{name}-perl.conf
43 Source10:       %{name}-perl.monitrc
44 Source11:       %{name}-standard.conf
45 Source12:       %{name}-standard.monitrc
46 Source13:       %{name}-mime.types.sh
47 Patch0:         %{name}-config.patch
48 URL:            http://nginx.net/
49 BuildRequires:  mailcap
50 BuildRequires:  openssl-devel
51 BuildRequires:  pcre-devel
52 %{?with_perl:BuildRequires: perl-CGI}
53 %{?with_perl:BuildRequires: perl-devel}
54 %{?with_perl:BuildRequires: rpm-perlprov}
55 BuildRequires:  rpmbuild(macros) >= 1.268
56 BuildRequires:  zlib-devel
57 Requires(post,preun):   /sbin/chkconfig
58 Requires(postun):       /usr/sbin/groupdel
59 Requires(postun):       /usr/sbin/userdel
60 Requires(pre):  /bin/id
61 Requires(pre):  /usr/bin/getgid
62 Requires(pre):  /usr/sbin/groupadd
63 Requires(pre):  /usr/sbin/useradd
64 Requires:       openssl
65 Requires:       pcre
66 Requires:       rc-scripts >= 0.2.0
67 Requires:       zlib
68 Provides:       group(http)
69 Provides:       group(nginx)
70 Provides:       user(nginx)
71 Provides:       webserver
72 Conflicts:      logrotate < 3.7-4
73 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
74
75 %define         _sysconfdir     /etc/%{name}
76 %define         _nginxdir       /home/services/%{name}
77
78 %description
79 Nginx ("engine x") is a high-performance HTTP server and reverse
80 proxy, as well as an IMAP/POP3 proxy server. Nginx was written by Igor
81 Sysoev for Rambler.ru, Russia's second-most visited website, where it
82 has been running in production for over two and a half years. Igor has
83 released the source code under a BSD-like license. Although still in
84 beta, Nginx is known for its stability, rich feature set, simple
85 configuration, and low resource consumption.
86
87 Common files for Nginx daemon.
88
89 %description -l pl.UTF-8
90 Nginx ("engine x") jest wysokowydajnym serwerem HTTP, odwrotnym proxy
91 a także IMAP/POP3 proxy. Nginx został napisany przez Igora Sysoev'a
92 na potrzeby serwisu Rambler.ru. Jest to drugi pod względem ilości
93 odwiedzin serwis w Rosji i działa od ponad dwóch i pół roku. Igor
94 opublikował źródła na licencji BSD. Mimo, że projekt jest ciągle
95 w fazie beta, już zasÅynÄÅ dzieki stabilnoÅi, bogactwu dodatków,
96 prostej konfiguracji oraz maÅej "zasobożernoÅi".
97
98 Niezb¿dne pliki dla Nginx.
99
100 %package light
101 Summary:        High perfomance HTTP and reverse proxy server
102 Summary(pl.UTF-8):      Serwer HTTP i odwrotne proxy o wysokiej wydajności
103 License:        BSD-like
104 Group:          Networking/Daemons
105 URL:            http://nginx.net/
106 Requires(post,preun):   /sbin/chkconfig
107 Requires(postun):       /usr/sbin/groupdel
108 Requires(postun):       /usr/sbin/userdel
109 Requires:       %{name} = %{version}-%{release}
110 Requires:       openssl
111 Requires:       pcre
112 Requires:       zlib
113 Provides:       group(http)
114 Provides:       group(nginx)
115 Provides:       user(nginx)
116 Provides:       webserver
117 #Conflicts:     %{name}
118 #Conflicts:     %{name}-mail
119 #Conflicts:     %{name}-perl
120
121 %description light
122 The smallest, but also the fastest Nginx edition. No additional
123 modules, no Perl, no DAV, no FLV, no IMAP, POP3, SMTP proxy.
124
125 %description light -l pl.UTF-8
126 Najmniejsza i najszybsza wersja Nginx. Bez wsparcia dla Perla,
127 DAV, FLV oraz IMAP, POP3, SMTP proxy.
128
129 %package perl
130 Summary:        High perfomance HTTP and reverse proxy server
131 Summary(pl.UTF-8):      Serwer HTTP i odwrotne proxy o wysokiej wydajności
132 License:        BSD-like
133 Group:          Networking/Daemons
134 URL:            http://nginx.net/
135 Requires(post,preun):   /sbin/chkconfig
136 Requires(postun):       /usr/sbin/groupdel
137 Requires(postun):       /usr/sbin/userdel
138 Requires:       %{name} = %{version}-%{release}
139 Requires:       openssl
140 Provides:       group(http)
141 Provides:       group(nginx)
142 Provides:       user(nginx)
143 Provides:       webserver
144 #Conflicts:     %{name}
145 #Conflicts:     %{name}-light
146 #Conflicts:     %{name}-mail
147
148 %description perl
149 Nginx with Perl support. Mail modules not included.
150
151 %description perl -l pl.UTF-8
152 Nignx z obsługą Perla. Bez wsparcia dla modułów poczty.
153
154 %package mail
155 Summary:        High perfomance HTTP and reverse proxy server
156 Summary(pl.UTF-8):      Serwer HTTP i odwrotne proxy o wysokiej wydajności
157 License:        BSD-like
158 Group:          Networking/Daemons
159 URL:            http://nginx.net/
160 Requires(post,preun):   /sbin/chkconfig
161 Requires(postun):       /usr/sbin/groupdel
162 Requires(postun):       /usr/sbin/userdel
163 Requires:       %{name} = %{version}-%{release}
164 Requires:       openssl
165 Requires:       pcre
166 Requires:       zlib
167 Provides:       group(http)
168 Provides:       group(nginx)
169 Provides:       user(nginx)
170 Provides:       webserver
171 #Conflicts:     %{name}
172 #Conflicts:     %{name}-light
173 #Conflicts:     %{name}-perl
174
175 %description mail
176 Nginx with mail support. Only mail modules included.
177
178 %description mail -l pl.UTF-8
179 Nginx ze wsparciem tylko dla modułów poczty.
180
181 %package standard
182 Summary:        Configuration files and documentation for Nginx
183 Summary(pl.UTF-8):      Pliki konfiguracyjne i dokumentacja dla Nginx
184 License:        BSD-like
185 Group:          Networking/Daemons
186 URL:            http://nginx.net/
187 Requires(post,preun):   /sbin/chkconfig
188 Requires(postun):       /usr/sbin/groupdel
189 Requires(postun):       /usr/sbin/userdel
190 Requires:       %{name} = %{version}-%{release}
191 Conflicts:      logrotate < 3.7-4
192
193 %description standard
194 Nginx ("engine x") is a high-performance HTTP server and reverse
195 proxy, as well as an IMAP/POP3 proxy server. Nginx was written by Igor
196 Sysoev for Rambler.ru, Russia's second-most visited website, where it
197 has been running in production for over two and a half years. Igor has
198 released the source code under a BSD-like license. Although still in
199 beta, Nginx is known for its stability, rich feature set, simple
200 configuration, and low resource consumption.
201
202 This is standard nginx version, without perl support and imap, pop3,
203 smtp proxy. 
204
205 %description standard -l pl.UTF-8
206 Nginx ("engine x") jest wysokowydajnym serwerem HTTP, odwrotnym proxy
207 a także IMAP/POP3 proxy. Nginx został napisany przez Igora Sysoev'a
208 na potrzeby serwisu Rambler.ru. Jest to drugi pod względem ilości
209 odwiedzin serwis w Rosji i działa od ponad dwóch i pół roku. Igor
210 opublikował źródła na licencji BSD. Mimo, że projekt jest ciągle
211 w fazie beta, już zasÅynÄÅ dzieki stabilnoÅi, bogactwu dodatków,
212 prostej konfiguracji oraz maÅej "zasobożernoÅi".
213
214 To jest standardowa wersja nginx, bez obs?ugi perla oraz proxy dla
215 imap, pop3, smtp.
216
217 %package -n monit-rc-nginx
218 Summary:       Nginx support for monit
219 Summary(pl.UTF-8):     Wsparcie Nginx dla monit
220 License:       BSD-like
221 Group:         Applications/System
222 URL:           http://nginx.eu/
223 Requires:       monit
224 Requires:      %{name} = %{version}-%{release}
225 Provides:       group(http)
226 Provides:       group(nginx)
227 Provides:       user(nginx)
228 Provides:       webserver
229
230 %description -n monit-rc-nginx
231 monitrc file for monitoring Nginx webserver server.
232
233 %description -n monit-rc-nginx -l pl.UTF-8
234 Plik monitrc do monitorowania serwera WWW Nginx.
235
236 %prep
237 %setup -q
238 %patch0 -p0
239
240 # build mime.types.conf
241 #sh %{SOURCE13} /etc/mime.types
242
243 %build
244 # NB: not autoconf generated configure
245 cp -f configure auto/
246 #
247 %if %{with perl}
248 ./configure \
249         --prefix=%{_prefix} \
250         --sbin-path=%{_sbindir}/%{name}-perl \
251         --conf-path=%{_sysconfdir}/%{name}-perl.conf \
252         --error-log-path=%{_localstatedir}/log/%{name}/%{name}-perl_error.log \
253         --http-log-path=%{_localstatedir}/log/%{name}/%{name}-perl_access.log \
254         --pid-path=%{_localstatedir}/run/%{name}-perl.pid \
255         --lock-path=%{_localstatedir}/lock/subsys/%{name}-perl \
256         --user=nginx \
257         --group=nginx \
258         --with-http_perl_module \
259         --without-mail_pop3_module \
260         --without-mail_imap_module \
261         --without-mail_smtp_module \
262         %{?with_addition:--with-http_addition_module} \
263         %{?with_dav:--with-http_dav_module} \
264         %{?with_flv:--with-http_flv_module} \
265         %{?with_sub:--with-http_sub_module} \
266         %{?with_poll:--with-poll_module} \
267         %{?with_realip:--with-http_realip_module} \
268         %{?with_rtsig:--with-rtsig_module} \
269         %{?with_select:--with-select_module} \
270         %{?with_status:--with-http_stub_status_module} \
271         %{?with_ssl:--with-http_ssl_module} \
272         %{!?with_http_browser:--without-http_browser_module} \
273         --http-client-body-temp-path=%{_localstatedir}/cache/%{name}-perl/client_body_temp \
274         --http-proxy-temp-path=%{_localstatedir}/cache/%{name}-perl/proxy_temp \
275         --http-fastcgi-temp-path=%{_localstatedir}/cache/%{name}-perl/fastcgi_temp \
276         --with-cc="%{__cc}" \
277         --with-cc-opt="%{rpmcflags}" \
278         --with-ld-opt="%{rpmldflags}"
279 %{__make}
280 mv -f objs/nginx contrib/nginx-perl
281 mv -f objs/src/http/modules/perl/blib/arch/auto/nginx/nginx.bs contrib/nginx.bs
282 mv -f objs/src/http/modules/perl/blib/arch/auto/nginx/nginx.so contrib/nginx.so
283 mv -f objs/src/http/modules/perl/nginx.pm contrib/nginx.pm
284 %endif
285
286 %if %{with mail}
287 %{__make} clean
288 ./configure \
289         --prefix=%{_prefix} \
290         --sbin-path=%{_sbindir}/%{name}-mail \
291         --conf-path=%{_sysconfdir}/%{name}-mail.conf \
292         --error-log-path=%{_localstatedir}/log/%{name}/%{name}-mail_error.log \
293         --http-log-path=%{_localstatedir}/log/%{name}/%{name}-mail_access.log \
294         --pid-path=%{_localstatedir}/run/%{name}-mail.pid \
295         --lock-path=%{_localstatedir}/lock/subsys/%{name}-mail \
296         --user=nginx \
297         --group=nginx \
298         --with-imap \
299         --with-mail \
300         --with-mail_ssl_module \
301         --without-http \
302         %{?with_poll:--with-poll_module} \
303         %{?with_rtsig:--with-rtsig_module} \
304         %{?with_select:--with-select_module} \
305         --http-client-body-temp-path=%{_localstatedir}/cache/%{name}-mail/client_body_temp \
306         --http-proxy-temp-path=%{_localstatedir}/cache/%{name}-mail/proxy_temp \
307         --http-fastcgi-temp-path=%{_localstatedir}/cache/%{name}-mail/fastcgi_temp \
308         --with-cc="%{__cc}" \
309         --with-cc-opt="%{rpmcflags}" \
310         --with-ld-opt="%{rpmldflags}" \
311         %{?debug:--with-debug}
312 %{__make}
313 mv -f objs/nginx contrib/nginx-mail
314 %endif
315
316 %if %{with light}
317 %{__make} clean
318 ./configure \
319         --prefix=%{_prefix} \
320         --sbin-path=%{_sbindir}/%{name}-light \
321         --conf-path=%{_sysconfdir}/%{name}-light.conf \
322         --error-log-path=%{_localstatedir}/log/%{name}/%{name}-light_error.log \
323         --http-log-path=%{_localstatedir}/log/%{name}/%{name}-light_access.log \
324         --pid-path=%{_localstatedir}/run/%{name}-light.pid \
325         --lock-path=%{_localstatedir}/lock/subsys/%{name}-light \
326         --user=nginx \
327         --group=nginx \
328         %{?with_poll:--with-poll_module} \
329         %{?with_realip:--with-http_realip_module} \
330         %{?with_rtsig:--with-rtsig_module} \
331         %{?with_select:--with-select_module} \
332         %{?with_status:--with-http_stub_status_module} \
333         %{?with_ssl:--with-http_ssl_module} \
334         --without-http_browser_module \
335         --without-mail_pop3_module \
336         --without-mail_imap_module \
337         --without-mail_smtp_module \
338         --http-client-body-temp-path=%{_localstatedir}/cache/%{name}-light/client_body_temp \
339         --http-proxy-temp-path=%{_localstatedir}/cache/%{name}-light/proxy_temp \
340         --http-fastcgi-temp-path=%{_localstatedir}/cache/%{name}-light/fastcgi_temp \
341         --with-cc="%{__cc}" \
342         --with-cc-opt="%{rpmcflags}" \
343         --with-ld-opt="%{rpmldflags}" \
344         %{?debug:--with-debug}
345 %{__make}
346 mv -f objs/nginx contrib/nginx-light
347 %endif
348
349 %{__make} clean
350 ./configure \
351         --prefix=%{_prefix} \
352         --sbin-path=%{_sbindir}/%{name}-standard \
353         --conf-path=%{_sysconfdir}/%{name}.conf \
354         --error-log-path=%{_localstatedir}/log/%{name}/%{name}-standard_error.log \
355         --http-log-path=%{_localstatedir}/log/%{name}/%{name}-standard_access.log \
356         --pid-path=%{_localstatedir}/run/%{name}-standard.pid \
357         --lock-path=%{_localstatedir}/lock/subsys/%{name}-standard \
358         --user=nginx \
359         --group=nginx \
360         %{?with_addition:--with-http_addition_module} \
361         %{?with_dav:--with-http_dav_module} \
362         %{?with_flv:--with-http_flv_module} \
363         %{?with_sub:--with-http_sub_module} \
364         %{?with_poll:--with-poll_module} \
365         %{?with_realip:--with-http_realip_module} \
366         %{?with_rtsig:--with-rtsig_module} \
367         %{?with_select:--with-select_module} \
368         %{?with_status:--with-http_stub_status_module} \
369         %{?with_ssl:--with-http_ssl_module} \
370         %{!?with_http_browser:--without-http_browser_module} \
371         --http-client-body-temp-path=%{_localstatedir}/cache/%{name}-standard/client_body_temp \
372         --http-proxy-temp-path=%{_localstatedir}/cache/%{name}-standard/proxy_temp \
373         --http-fastcgi-temp-path=%{_localstatedir}/cache/%{name}-standard/fastcgi_temp \
374         --with-cc="%{__cc}" \
375         --with-cc-opt="%{rpmcflags}" \
376         --with-ld-opt="%{rpmldflags}" \
377         %{?debug:--with-debug}
378 %{__make}
379
380
381 %install
382 rm -rf $RPM_BUILD_ROOT
383 install -d $RPM_BUILD_ROOT/etc/rc.d/init.d \
384         $RPM_BUILD_ROOT%{_nginxdir}/{cgi-bin,html,errors} \
385         $RPM_BUILD_ROOT%{_localstatedir}/log/{%{name},archive/%{name}} \
386         $RPM_BUILD_ROOT%{_localstatedir}/cache/{%{name}-standard,%{name}-perl,%{name}-mail,%{name}-light} \
387         $RPM_BUILD_ROOT%{_localstatedir}/lock/subsys/{%{name}-standard,%{name}-perl,%{name}-mail,%{name}-light} \
388         $RPM_BUILD_ROOT{%{_sbindir},%{_sysconfdir}} \
389         $RPM_BUILD_ROOT/etc/{logrotate.d,monit}
390
391 #install conf/* $RPM_BUILD_ROOT%{_sysconfdir}
392 install html/index.html $RPM_BUILD_ROOT%{_nginxdir}/html
393 install html/50x.html $RPM_BUILD_ROOT%{_nginxdir}/errors
394 install %{SOURCE1} $RPM_BUILD_ROOT%{_nginxdir}/html/favicon.ico
395 install %{SOURCE2} $RPM_BUILD_ROOT%{_sysconfdir}/proxy.conf
396 install %{SOURCE3} $RPM_BUILD_ROOT/etc/logrotate.d/%{name}
397 install %{SOURCE4} $RPM_BUILD_ROOT%{_sysconfdir}/mime.types
398 install %{SOURCE11} $RPM_BUILD_ROOT%{_sysconfdir}/%{name}-standard.conf
399 install %{SOURCE12} $RPM_BUILD_ROOT/etc/monit/%{name}-standard.monitrc
400 install objs/%{name} $RPM_BUILD_ROOT%{_sbindir}/%{name}-standard
401 install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/%{name}-standard
402
403 %if %{with light}
404 install %{SOURCE5} $RPM_BUILD_ROOT%{_sysconfdir}/%{name}-light.conf
405 install %{SOURCE6} $RPM_BUILD_ROOT/etc/monit/%{name}-light.monitrc
406 install contrib/nginx-light $RPM_BUILD_ROOT%{_sbindir}/%{name}-light
407 %endif
408
409 %if %{with mail}
410 install %{SOURCE7} $RPM_BUILD_ROOT%{_sysconfdir}/%{name}-mail.conf
411 install %{SOURCE8} $RPM_BUILD_ROOT/etc/monit/%{name}-mail.monitrc
412 install contrib/nginx-mail $RPM_BUILD_ROOT%{_sbindir}/%{name}-mail
413 %endif
414
415 %if %{with perl}
416 install -d $RPM_BUILD_ROOT{%{perl_vendorarch},%{perl_vendorarch}/auto/%{name}}
417 install %{SOURCE7} $RPM_BUILD_ROOT%{_sysconfdir}/%{name}-perl.conf
418 install %{SOURCE8} $RPM_BUILD_ROOT/etc/monit/%{name}-perl.monitrc
419 install contrib/nginx.pm $RPM_BUILD_ROOT%{perl_vendorarch}/%{name}.pm
420 install contrib/nginx.so $RPM_BUILD_ROOT%{perl_vendorarch}/auto/%{name}/%{name}.so
421 install contrib/nginx.bs $RPM_BUILD_ROOT%{perl_vendorarch}/auto/%{name}/%{name}.bs
422 install contrib/nginx-perl $RPM_BUILD_ROOT%{_sbindir}/%{name}-perl
423 %endif
424
425 rm -f $RPM_BUILD_ROOT%{_sysconfdir}/*.default
426 rm -rf $RPM_BUILD_ROOT%{_prefix}/html
427
428 %clean
429 rm -rf $RPM_BUILD_ROOT
430
431 %pre
432 %groupadd -r -g 213 %{name}
433 %groupadd -g 51 http
434 %useradd -r -u 213 -d /usr/share/empty -s /bin/false -c "Nginx HTTP User" -g %{name} %{name}
435 %addusertogroup %{name} http
436
437 %post standard
438 for a in access.log error.log; do
439         if [ ! -f /var/log/%{name}/nginx-standard_$a ]; then
440                 touch /var/log/%{name}/nginx-standard_$a
441                 chown nginx:nginx /var/log/%{name}/nginx-standard_$a
442                 chmod 644 /var/log/%{name}/nginx-standard_$a
443         fi
444 done
445
446 %post light
447 for a in access.log error.log; do
448         if [ ! -f /var/log/%{name}/nginx-light_$a ]; then
449                 touch /var/log/%{name}/nginx-light_$a
450                 chown nginx:nginx /var/log/%{name}/nginx-light_$a
451                 chmod 644 /var/log/%{name}/nginx-light_$a
452         fi
453 done
454
455 %post perl
456 for a in access.log error.log; do
457         if [ ! -f /var/log/%{name}/nginx-perl_$a ]; then
458                 touch /var/log/%{name}/nginx-perl_$a
459                 chown nginx:nginx /var/log/%{name}/nginx-perl_$a
460                 chmod 644 /var/log/%{name}/nginx-perl_$a
461         fi
462 done
463
464 %post mail
465 for a in access.log error.log; do
466         if [ ! -f /var/log/%{name}/nginx-mail_$a ]; then
467                 touch /var/log/%{name}/nginx-mail_$a
468                 chown nginx:nginx /var/log/%{name}/nginx-mail_$a
469                 chmod 644 /var/log/%{name}/nginx-mail_$a
470         fi
471 done
472
473 %pre standard
474 /sbin/chkconfig --add %{name}-standard
475 %service %{name}-standard restart
476
477 %pre light
478 /sbin/chkconfig --add %{name}-light
479 %service %{name}-light restart
480
481 %pre perl
482 /sbin/chkconfig --add %{name}-perl
483 %service %{name}-perl restart
484
485 %pre mail
486 /sbin/chkconfig --add %{name}-mail
487 %service %{name}-mail restart
488
489 %preun standard
490 if [ "$1" = "0" ]; then
491         %service -q %{name}-standard stop
492         /sbin/chkconfig --del %{name}-standard
493 fi
494
495 %preun light
496 if [ "$1" = "0" ]; then
497         %service -q %{name}-light stop
498         /sbin/chkconfig --del %{name}-light
499 fi
500
501 %preun perl
502 if [ "$1" = "0" ]; then
503         %service -q %{name}-perl stop
504         /sbin/chkconfig --del %{name}-perl
505 fi
506
507 %preun mail
508 if [ "$1" = "0" ]; then
509         %service -q %{name}-mail stop
510         /sbin/chkconfig --del %{name}-mail
511 fi
512
513 %postun
514 if [ "$1" = "0" ]; then
515         %userremove %{name}
516         %groupremove %{name}
517 fi
518
519 %files
520 %defattr(644,root,root,755)
521 %doc CHANGES LICENSE README html/index.html conf/nginx.conf
522 %doc %lang(ru) CHANGES.ru
523 %dir %attr(754,root,root) %{_sysconfdir}
524 %dir %{_nginxdir}
525 %dir %{_nginxdir}/cgi-bin
526 %dir %{_nginxdir}/html
527 %dir %{_nginxdir}/errors
528 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/logrotate.d/%{name}
529 %attr(640,root,root) %{_sysconfdir}/*[_-]*
530 %attr(640,root,root) %{_sysconfdir}/proxy.conf
531 %attr(640,root,root) %{_sysconfdir}/mime.types
532 %attr(750,root,root) %dir /var/log/archive/%{name}
533 %attr(750,%{name},logs) /var/log/%{name}
534 %config(noreplace,missingok) %verify(not md5 mtime size) %{_nginxdir}/html/*
535 %config(noreplace,missingok) %verify(not md5 mtime size) %{_nginxdir}/errors/*
536
537 %files standard
538 %defattr(644,root,root,755)
539 %attr(755,root,root) %{_sbindir}/%{name}-standard
540 %attr(770,root,%{name}) /var/cache/%{name}-standard
541 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}-standard.conf
542
543 %if %{with mail}
544 %files mail
545 %defattr(644,root,root,755)
546 %attr(755,root,root) %{_sbindir}/%{name}-mail
547 %attr(770,root,%{name}) /var/cache/%{name}-mail
548 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}-mail.conf
549 %endif
550
551 %if %{with light}
552 %files light
553 %defattr(644,root,root,755)
554 %attr(755,root,root) %{_sbindir}/%{name}-light
555 %attr(770,root,%{name}) /var/cache/%{name}-light
556 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}-light.conf
557 %endif
558
559 %if %{with perl}
560 %files perl
561 %defattr(644,root,root,755)
562 %attr(755,root,root) %{_sbindir}/%{name}-perl
563 attr(770,root,%{name}) /var/cache/%{name}-perl
564 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}-perl.conf
565 %dir %{perl_vendorarch}/auto/%{name}
566 %attr(755,root,root) %{perl_vendorarch}/auto/%{name}/%{name}.so
567 %attr(700,root,root) %{perl_vendorarch}/auto/%{name}/%{name}.bs
568 %attr(700,root,root) %{perl_vendorarch}/%{name}.pm
569 %endif
570
571 %files -n monit-rc-nginx
572 %defattr(644,root,root,755)
573 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/monit/%{name}-standard.monitrc
574 %if %{with perl}
575 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/monit/%{name}-perl.monitrc
576 %endif
577 %if %{with light}
578 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/monit/%{name}-light.monitrc
579 %endif
580 %if %{with mail}
581 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/monit/%{name}-mail.monitrc
582 %endif
This page took 0.072108 seconds and 4 git commands to generate.