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