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