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