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