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