2 # - /etc/sysconfig/nginx file
3 # - missing perl build/install requires
4 # - mod_spdy build http://mailman.nginx.org/pipermail/nginx-devel/2012-June/002343.html patch from http://nginx.org/patches/attic/spdy/
5 # http://nginx.org/en/docs/http/ngx_http_spdy_module.html
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 ipv6 # build without ipv6 support
15 %bcond_without sub # ngx_http_sub_module
16 %bcond_without poll # poll
17 %bcond_without realip # real ip (behind proxy)
18 %bcond_without rtsig # rtsig
19 %bcond_without select # select
20 %bcond_without status # stats module
21 %bcond_without ssl # ssl support
22 %bcond_with http_browser # header "User-agent" parser
23 %bcond_without rtmp # rtmp support
24 %bcond_without auth_request # auth_request module
26 %define rtmp_version 1.1.3
27 Summary: High perfomance HTTP and reverse proxy server
28 Summary(pl.UTF-8): Serwer HTTP i odwrotne proxy o wysokiej wydajności
30 # - stable: production quality with stable API
31 # - mainline: production quality but API can change
36 Group: Networking/Daemons/HTTP
37 Source0: http://nginx.org/download/%{name}-%{version}.tar.gz
38 # Source0-md5: 9659cbb26f226f6390b18ef991a79233
39 Source1: http://nginx.net/favicon.ico
40 # Source1-md5: 2aaf2115c752cbdbfb8a2f0b3c3189ab
42 Source3: %{name}.logrotate
44 Source5: %{name}-light.conf
45 Source6: %{name}-light.monitrc
46 Source7: %{name}-light.init
47 Source8: %{name}-mail.conf
48 Source9: %{name}-mail.monitrc
49 Source10: %{name}-mail.init
50 Source11: %{name}-perl.conf
51 Source12: %{name}-perl.monitrc
52 Source13: %{name}-perl.init
53 Source14: %{name}-standard.conf
54 Source15: %{name}-standard.monitrc
55 Source16: %{name}-standard.init
56 Source17: %{name}-mime.types.sh
57 Source18: %{name}-standard.service
58 Source19: %{name}-light.service
59 Source20: %{name}-perl.service
60 Source21: %{name}-mail.service
61 Source101: https://github.com/arut/nginx-rtmp-module/archive/v%{rtmp_version}.tar.gz
62 # Source101-md5: 66ee2b74799e03a25a9e3aaadd874436
63 Patch0: nginx-no-Werror.patch
64 URL: http://nginx.net/
65 BuildRequires: mailcap
66 BuildRequires: openssl-devel
67 BuildRequires: pcre-devel
68 %{?with_perl:BuildRequires: perl-CGI}
69 %{?with_perl:BuildRequires: perl-devel}
70 %{?with_perl:BuildRequires: python}
71 %{?with_perl:BuildRequires: rpm-perlprov}
72 BuildRequires: rpmbuild(macros) >= 1.644
73 BuildRequires: zlib-devel
74 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
76 %define _sysconfdir /etc/%{name}
77 %define _nginxdir /home/services/%{name}
80 nginx ("engine x") is a high-performance HTTP server and reverse
81 proxy, as well as an IMAP/POP3 proxy server. nginx was written by Igor
82 Sysoev for Rambler.ru, Russia's second-most visited website, where it
83 has been running in production for over two and a half years. Igor has
84 released the source code under a BSD-like license. Although still in
85 beta, nginx is known for its stability, rich feature set, simple
86 configuration, and low resource consumption.
88 %description -l pl.UTF-8
89 nginx ("engine x") jest wysokowydajnym serwerem HTTP, odwrotnym proxy
90 a także IMAP/POP3 proxy. nginx został napisany przez Igora Sysoeva
91 na potrzeby serwisu Rambler.ru. Jest to drugi pod względem ilości
92 odwiedzin serwis w Rosji i działa od ponad dwóch i pół roku. Igor
93 opublikował źródła na licencji BSD. Mimo, że projekt jest ciągle
94 w fazie beta, już zasłynął dzięki stabilności, bogactwu dodatków,
95 prostej konfiguracji oraz małej "zasobożerności".
98 Summary: nginx - common files
99 Summary(pl.UTF-8): nginx - pliki wspólne
100 Group: Networking/Daemons/HTTP
101 Requires(postun): /usr/sbin/groupdel
102 Requires(postun): /usr/sbin/userdel
103 Requires(pre): /bin/id
104 Requires(pre): /usr/bin/getgid
105 Requires(pre): /usr/sbin/groupadd
106 Requires(pre): /usr/sbin/useradd
109 Requires: rc-scripts >= 0.2.0
110 Requires: systemd-units >= 38
112 Provides: group(http)
113 Provides: group(nginx)
114 Provides: user(nginx)
116 Conflicts: logrotate < 3.8.0
117 Obsoletes: %{name} < 1.4.1-4.1
120 Common files for the nginx daemon.
122 %description common -l pl.UTF-8
123 Niezbędne pliki dla nginx.
126 Summary: High perfomance HTTP and reverse proxy server
127 Summary(pl.UTF-8): Serwer HTTP i odwrotne proxy o wysokiej wydajności
128 Group: Networking/Daemons/HTTP
129 Requires(post,preun): /sbin/chkconfig
130 Requires(post,preun,postun): systemd-units >= 38
131 Requires: %{name}-common = %{version}-%{release}
135 Provides: nginx-daemon
139 nginx ("engine x") is a high-performance HTTP server and reverse
140 proxy, as well as an IMAP/POP3 proxy server. nginx was written by Igor
141 Sysoev for Rambler.ru, Russia's second-most visited website, where it
142 has been running in production for over two and a half years. Igor has
143 released the source code under a BSD-like license. Although still in
144 beta, nginx is known for its stability, rich feature set, simple
145 configuration, and low resource consumption.
147 The smallest, but also the fastest nginx edition. No additional
148 modules, no Perl, no DAV, no FLV, no IMAP, POP3, SMTP proxy.
150 %description light -l pl.UTF-8
151 nginx ("engine x") jest wysokowydajnym serwerem HTTP, odwrotnym proxy
152 a także IMAP/POP3 proxy. nginx został napisany przez Igora Sysoeva
153 na potrzeby serwisu Rambler.ru. Jest to drugi pod względem ilości
154 odwiedzin serwis w Rosji i działa od ponad dwóch i pół roku. Igor
155 opublikował źródła na licencji BSD. Mimo, że projekt jest ciągle
156 w fazie beta, już zasłynął dzięki stabilności, bogactwu dodatków,
157 prostej konfiguracji oraz małej "zasobożerności".
159 Najmniejsza i najszybsza wersja nginx. Bez wsparcia dla Perla, DAV,
160 FLV oraz IMAP, POP3, SMTP proxy.
163 Summary: High perfomance HTTP and reverse proxy server
164 Summary(pl.UTF-8): Serwer HTTP i odwrotne proxy o wysokiej wydajności
165 Group: Networking/Daemons/HTTP
166 Requires(post,preun): /sbin/chkconfig
167 Requires(post,preun,postun): systemd-units >= 38
168 Requires: %{name}-common = %{version}-%{release}
170 Provides: nginx-daemon
174 nginx ("engine x") is a high-performance HTTP server and reverse
175 proxy, as well as an IMAP/POP3 proxy server. nginx was written by Igor
176 Sysoev for Rambler.ru, Russia's second-most visited website, where it
177 has been running in production for over two and a half years. Igor has
178 released the source code under a BSD-like license. Although still in
179 beta, nginx is known for its stability, rich feature set, simple
180 configuration, and low resource consumption.
182 nginx with Perl support. Mail modules not included.
184 %description perl -l pl.UTF-8
185 nginx ("engine x") jest wysokowydajnym serwerem HTTP, odwrotnym proxy
186 a także IMAP/POP3 proxy. nginx został napisany przez Igora Sysoeva
187 na potrzeby serwisu Rambler.ru. Jest to drugi pod względem ilości
188 odwiedzin serwis w Rosji i działa od ponad dwóch i pół roku. Igor
189 opublikował źródła na licencji BSD. Mimo, że projekt jest ciągle
190 w fazie beta, już zasłynął dzięki stabilności, bogactwu dodatków,
191 prostej konfiguracji oraz małej "zasobożerności".
193 nginx z obsługą Perla. Bez wsparcia dla modułów poczty.
196 Summary: High perfomance IMAP, POP3, SMTP proxy server
197 Summary(pl.UTF-8): IMAP, POP3, SMTP proxy o wysokiej wydajności
198 Group: Networking/Daemons/HTTP
199 Requires(post,preun): /sbin/chkconfig
200 Requires(post,preun,postun): systemd-units >= 38
201 Requires: %{name}-common = %{version}-%{release}
205 Provides: nginx-daemon
208 nginx ("engine x") is a high-performance HTTP server and reverse
209 proxy, as well as an IMAP/POP3 proxy server. nginx was written by Igor
210 Sysoev for Rambler.ru, Russia's second-most visited website, where it
211 has been running in production for over two and a half years. Igor has
212 released the source code under a BSD-like license. Although still in
213 beta, nginx is known for its stability, rich feature set, simple
214 configuration, and low resource consumption.
216 nginx with mail support. Only mail modules included.
218 %description mail -l pl.UTF-8
219 nginx ("engine x") jest wysokowydajnym serwerem HTTP, odwrotnym proxy
220 a także IMAP/POP3 proxy. nginx został napisany przez Igora Sysoeva
221 na potrzeby serwisu Rambler.ru. Jest to drugi pod względem ilości
222 odwiedzin serwis w Rosji i działa od ponad dwóch i pół roku. Igor
223 opublikował źródła na licencji BSD. Mimo, że projekt jest ciągle
224 w fazie beta, już zasłynął dzięki stabilności, bogactwu dodatków,
225 prostej konfiguracji oraz małej "zasobożerności".
227 nginx ze wsparciem tylko dla modułów poczty.
230 Summary: High perfomance HTTP and reverse proxy server
231 Summary(pl.UTF-8): Serwer HTTP i odwrotne proxy o wysokiej wydajności
232 Group: Networking/Daemons/HTTP
233 Requires(post,preun): /sbin/chkconfig
234 Requires(post,preun,postun): systemd-units >= 38
235 Requires: %{name}-common = %{version}-%{release}
238 Provides: nginx-daemon
239 Conflicts: logrotate < 3.7-4
241 %description standard
242 nginx ("engine x") is a high-performance HTTP server and reverse
243 proxy, as well as an IMAP/POP3 proxy server. nginx was written by Igor
244 Sysoev for Rambler.ru, Russia's second-most visited website, where it
245 has been running in production for over two and a half years. Igor has
246 released the source code under a BSD-like license. Although still in
247 beta, nginx is known for its stability, rich feature set, simple
248 configuration, and low resource consumption.
250 This is standard nginx version, without Perl support and IMAP, POP3,
253 %description standard -l pl.UTF-8
254 nginx ("engine x") jest wysokowydajnym serwerem HTTP, odwrotnym proxy
255 a także IMAP/POP3 proxy. nginx został napisany przez Igora Sysoeva
256 na potrzeby serwisu Rambler.ru. Jest to drugi pod względem ilości
257 odwiedzin serwis w Rosji i działa od ponad dwóch i pół roku. Igor
258 opublikował źródła na licencji BSD. Mimo, że projekt jest ciągle
259 w fazie beta, już zasłynął dzięki stabilności, bogactwu dodatków,
260 prostej konfiguracji oraz małej "zasobożerności".
261 ginx ("engine x") jest wysokowydajnym serwerem HTTP, odwrotnym proxy
262 a także IMAP/POP3 proxy. nginx został napisany przez Igora Sysoeva
263 na potrzeby serwisu Rambler.ru. Jest to drugi pod względem ilości
264 odwiedzin serwis w Rosji i działa od ponad dwóch i pół roku. Igor
265 opublikował źródła na licencji BSD. Mimo, że projekt jest ciągle
266 w fazie beta, już zasłynął dzięki stabilności, bogactwu dodatków,
267 prostej konfiguracji oraz małej "zasobożerności".
269 To jest standardowa wersja nginx, bez obsługi Perla oraz proxy dla
272 %package -n monit-rc-nginx
273 Summary: nginx support for monit
274 Summary(pl.UTF-8): Wsparcie nginx dla monit
275 Group: Applications/System
276 URL: http://nginx.eu/
277 Requires: %{name}-common = %{version}-%{release}
280 %description -n monit-rc-nginx
281 monitrc file for monitoring nginx webserver.
283 %description -n monit-rc-nginx -l pl.UTF-8
284 Plik monitrc do monitorowania serwera WWW nginx.
287 %setup -q %{?with_rtmp:-a101}
291 mv nginx-rtmp-module-%{rtmp_version} nginx-rtmp-module
294 # build mime.types.conf
295 #sh %{SOURCE17} /etc/mime.types
298 # NB: not autoconf generated configure
299 cp -f configure auto/
303 --prefix=%{_prefix} \
304 --sbin-path=%{_sbindir}/%{name}-perl \
305 --conf-path=%{_sysconfdir}/%{name}-perl.conf \
306 --error-log-path=%{_localstatedir}/log/%{name}/%{name}-perl_error.log \
307 --http-log-path=%{_localstatedir}/log/%{name}/%{name}-perl_access.log \
308 --pid-path=%{_localstatedir}/run/%{name}-perl.pid \
309 --lock-path=%{_localstatedir}/lock/subsys/%{name}-perl \
312 --with-http_perl_module \
313 --without-mail_pop3_module \
314 --without-mail_imap_module \
315 --without-mail_smtp_module \
316 %{?with_addition:--with-http_addition_module} \
317 %{?with_dav:--with-http_dav_module} \
318 %{?with_flv:--with-http_flv_module} \
319 %{?with_ipv6:--with-ipv6} \
320 %{?with_sub:--with-http_sub_module} \
321 %{?with_poll:--with-poll_module} \
322 %{?with_realip:--with-http_realip_module} \
323 %{?with_rtsig:--with-rtsig_module} \
324 %{?with_select:--with-select_module} \
325 %{?with_status:--with-http_stub_status_module} \
326 %{?with_ssl:--with-http_ssl_module} \
327 %{!?with_http_browser:--without-http_browser_module} \
328 %{?with_rtmp:--add-module=./nginx-rtmp-module} \
329 %{?with_auth_request:--with-http_auth_request_module} \
330 --with-http_secure_link_module \
331 --http-client-body-temp-path=%{_localstatedir}/cache/%{name}-perl/client_body_temp \
332 --http-proxy-temp-path=%{_localstatedir}/cache/%{name}-perl/proxy_temp \
333 --http-fastcgi-temp-path=%{_localstatedir}/cache/%{name}-perl/fastcgi_temp \
334 --with-cc="%{__cc}" \
335 --with-cc-opt="%{rpmcflags}" \
336 --with-ld-opt="%{rpmldflags}"
338 mv -f objs/nginx contrib/nginx-perl
339 mv -f objs/src/http/modules/perl/blib/arch/auto/nginx/nginx.bs contrib/nginx.bs
340 mv -f objs/src/http/modules/perl/blib/arch/auto/nginx/nginx.so contrib/nginx.so
341 mv -f objs/src/http/modules/perl/nginx.pm contrib/nginx.pm
346 --prefix=%{_prefix} \
347 --sbin-path=%{_sbindir}/%{name}-mail \
348 --conf-path=%{_sysconfdir}/%{name}-mail.conf \
349 --error-log-path=%{_localstatedir}/log/%{name}/%{name}-mail_error.log \
350 --http-log-path=%{_localstatedir}/log/%{name}/%{name}-mail_access.log \
351 --pid-path=%{_localstatedir}/run/%{name}-mail.pid \
352 --lock-path=%{_localstatedir}/lock/subsys/%{name}-mail \
357 --with-mail_ssl_module \
359 %{?with_ipv6:--with-ipv6} \
360 %{?with_poll:--with-poll_module} \
361 %{?with_rtsig:--with-rtsig_module} \
362 %{?with_select:--with-select_module} \
363 --http-client-body-temp-path=%{_localstatedir}/cache/%{name}-mail/client_body_temp \
364 --http-proxy-temp-path=%{_localstatedir}/cache/%{name}-mail/proxy_temp \
365 --http-fastcgi-temp-path=%{_localstatedir}/cache/%{name}-mail/fastcgi_temp \
366 --with-cc="%{__cc}" \
367 --with-cc-opt="%{rpmcflags}" \
368 --with-ld-opt="%{rpmldflags}" \
369 %{?debug:--with-debug}
371 mv -f objs/nginx contrib/nginx-mail
376 --prefix=%{_prefix} \
377 --sbin-path=%{_sbindir}/%{name}-light \
378 --conf-path=%{_sysconfdir}/%{name}-light.conf \
379 --error-log-path=%{_localstatedir}/log/%{name}/%{name}-light_error.log \
380 --http-log-path=%{_localstatedir}/log/%{name}/%{name}-light_access.log \
381 --pid-path=%{_localstatedir}/run/%{name}-light.pid \
382 --lock-path=%{_localstatedir}/lock/subsys/%{name}-light \
385 %{?with_ipv6:--with-ipv6} \
386 %{?with_poll:--with-poll_module} \
387 %{?with_realip:--with-http_realip_module} \
388 %{?with_rtsig:--with-rtsig_module} \
389 %{?with_select:--with-select_module} \
390 %{?with_status:--with-http_stub_status_module} \
391 %{?with_ssl:--with-http_ssl_module} \
392 %{?with_rtmp:--add-module=./nginx-rtmp-module} \
393 %{?with_auth_request:--with-http_auth_request_module} \
394 --without-http_browser_module \
395 --without-mail_pop3_module \
396 --without-mail_imap_module \
397 --without-mail_smtp_module \
398 --with-http_secure_link_module \
399 --http-client-body-temp-path=%{_localstatedir}/cache/%{name}-light/client_body_temp \
400 --http-proxy-temp-path=%{_localstatedir}/cache/%{name}-light/proxy_temp \
401 --http-fastcgi-temp-path=%{_localstatedir}/cache/%{name}-light/fastcgi_temp \
402 --with-cc="%{__cc}" \
403 --with-cc-opt="%{rpmcflags}" \
404 --with-ld-opt="%{rpmldflags}" \
405 %{?debug:--with-debug}
407 mv -f objs/nginx contrib/nginx-light
411 --prefix=%{_prefix} \
412 --sbin-path=%{_sbindir}/%{name}-standard \
413 --conf-path=%{_sysconfdir}/%{name}-standard.conf \
414 --error-log-path=%{_localstatedir}/log/%{name}/%{name}-standard_error.log \
415 --http-log-path=%{_localstatedir}/log/%{name}/%{name}-standard_access.log \
416 --pid-path=%{_localstatedir}/run/%{name}-standard.pid \
417 --lock-path=%{_localstatedir}/lock/subsys/%{name}-standard \
420 %{?with_addition:--with-http_addition_module} \
421 %{?with_dav:--with-http_dav_module} \
422 %{?with_flv:--with-http_flv_module} \
423 %{?with_ipv6:--with-ipv6} \
424 %{?with_sub:--with-http_sub_module} \
425 %{?with_poll:--with-poll_module} \
426 %{?with_realip:--with-http_realip_module} \
427 %{?with_rtsig:--with-rtsig_module} \
428 %{?with_select:--with-select_module} \
429 %{?with_status:--with-http_stub_status_module} \
430 %{?with_ssl:--with-http_ssl_module} \
431 %{!?with_http_browser:--without-http_browser_module} \
432 %{?with_rtmp:--add-module=./nginx-rtmp-module} \
433 %{?with_auth_request:--with-http_auth_request_module} \
434 --with-http_secure_link_module \
435 --http-client-body-temp-path=%{_localstatedir}/cache/%{name}-standard/client_body_temp \
436 --http-proxy-temp-path=%{_localstatedir}/cache/%{name}-standard/proxy_temp \
437 --http-fastcgi-temp-path=%{_localstatedir}/cache/%{name}-standard/fastcgi_temp \
438 --with-cc="%{__cc}" \
439 --with-cc-opt="%{rpmcflags}" \
440 --with-ld-opt="%{rpmldflags}" \
441 %{?debug:--with-debug}
446 rm -rf $RPM_BUILD_ROOT
447 install -d $RPM_BUILD_ROOT/etc/rc.d/init.d \
448 $RPM_BUILD_ROOT%{_nginxdir}/{cgi-bin,html,errors} \
449 $RPM_BUILD_ROOT%{_localstatedir}/log/{%{name},archive/%{name}} \
450 $RPM_BUILD_ROOT%{_localstatedir}/cache/{%{name}-standard,%{name}-perl,%{name}-mail,%{name}-light} \
451 $RPM_BUILD_ROOT%{_localstatedir}/lock/subsys/{%{name}-standard,%{name}-perl,%{name}-mail,%{name}-light} \
452 $RPM_BUILD_ROOT{%{_sbindir},%{_sysconfdir}/{vhosts,webapps}.d} \
453 $RPM_BUILD_ROOT/etc/{logrotate.d,monit} \
454 $RPM_BUILD_ROOT{%{systemdunitdir},/etc/systemd/system}
456 install conf/fastcgi_params $RPM_BUILD_ROOT%{_sysconfdir}/fastcgi.params
457 install conf/scgi_params $RPM_BUILD_ROOT%{_sysconfdir}/scgi.params
458 install conf/uwsgi_params $RPM_BUILD_ROOT%{_sysconfdir}/uwsgi.params
459 install conf/koi-utf $RPM_BUILD_ROOT%{_sysconfdir}/koi-utf
460 install conf/koi-win $RPM_BUILD_ROOT%{_sysconfdir}/koi-win
461 install conf/win-utf $RPM_BUILD_ROOT%{_sysconfdir}/win-utf
462 install html/index.html $RPM_BUILD_ROOT%{_nginxdir}/html
463 install html/50x.html $RPM_BUILD_ROOT%{_nginxdir}/errors
464 install %{SOURCE1} $RPM_BUILD_ROOT%{_nginxdir}/html/favicon.ico
465 install %{SOURCE2} $RPM_BUILD_ROOT%{_sysconfdir}/proxy.conf
466 install %{SOURCE3} $RPM_BUILD_ROOT/etc/logrotate.d/%{name}
467 install %{SOURCE4} $RPM_BUILD_ROOT%{_sysconfdir}/mime.types
468 install %{SOURCE14} $RPM_BUILD_ROOT%{_sysconfdir}/%{name}-standard.conf
469 install %{SOURCE15} $RPM_BUILD_ROOT/etc/monit/%{name}-standard.monitrc
470 install %{SOURCE16} $RPM_BUILD_ROOT/etc/rc.d/init.d/%{name}-standard
471 install %{SOURCE18} $RPM_BUILD_ROOT%{systemdunitdir}/%{name}-standard.service
472 install objs/%{name} $RPM_BUILD_ROOT%{_sbindir}/%{name}-standard
473 ln -sf %{systemdunitdir}/%{name}-standard.service $RPM_BUILD_ROOT/etc/systemd/system/nginx.service
476 install %{SOURCE5} $RPM_BUILD_ROOT%{_sysconfdir}/%{name}-light.conf
477 install %{SOURCE6} $RPM_BUILD_ROOT/etc/monit/%{name}-light.monitrc
478 install %{SOURCE7} $RPM_BUILD_ROOT/etc/rc.d/init.d/%{name}-light
479 install %{SOURCE19} $RPM_BUILD_ROOT%{systemdunitdir}/%{name}-light.service
480 install contrib/nginx-light $RPM_BUILD_ROOT%{_sbindir}/%{name}-light
484 install %{SOURCE8} $RPM_BUILD_ROOT%{_sysconfdir}/%{name}-mail.conf
485 install %{SOURCE9} $RPM_BUILD_ROOT/etc/monit/%{name}-mail.monitrc
486 install %{SOURCE10} $RPM_BUILD_ROOT/etc/rc.d/init.d/%{name}-mail
487 install %{SOURCE21} $RPM_BUILD_ROOT%{systemdunitdir}/%{name}-mail.service
488 install contrib/nginx-mail $RPM_BUILD_ROOT%{_sbindir}/%{name}-mail
492 install -d $RPM_BUILD_ROOT{%{perl_vendorarch},%{perl_vendorarch}/auto/%{name}}
493 install %{SOURCE11} $RPM_BUILD_ROOT%{_sysconfdir}/%{name}-perl.conf
494 install %{SOURCE12} $RPM_BUILD_ROOT/etc/monit/%{name}-perl.monitrc
495 install %{SOURCE13} $RPM_BUILD_ROOT/etc/rc.d/init.d/%{name}-perl
496 install %{SOURCE20} $RPM_BUILD_ROOT%{systemdunitdir}/%{name}-perl.service
497 install contrib/nginx.pm $RPM_BUILD_ROOT%{perl_vendorarch}/%{name}.pm
498 install contrib/nginx.so $RPM_BUILD_ROOT%{perl_vendorarch}/auto/%{name}/%{name}.so
499 install contrib/nginx.bs $RPM_BUILD_ROOT%{perl_vendorarch}/auto/%{name}/%{name}.bs
500 install contrib/nginx-perl $RPM_BUILD_ROOT%{_sbindir}/%{name}-perl
503 rm -f $RPM_BUILD_ROOT%{_sysconfdir}/*.default
504 rm -rf $RPM_BUILD_ROOT%{_prefix}/html
507 rm -rf $RPM_BUILD_ROOT
510 %groupadd -r -g 213 %{name}
512 %useradd -r -u 213 -d /usr/share/empty -s /bin/false -c "Nginx HTTP User" -g %{name} %{name}
513 %addusertogroup %{name} http
516 for a in access.log error.log; do
517 if [ ! -f /var/log/%{name}/nginx-standard_$a ]; then
519 touch /var/log/%{name}/nginx-standard_$a
520 chown nginx:nginx /var/log/%{name}/nginx-standard_$a
521 chmod 644 /var/log/%{name}/nginx-standard_$a
524 /sbin/chkconfig --add %{name}-standard
525 %systemd_post %{name}-standard.service
526 %service %{name}-standard restart
527 echo 'NOTE: this nginx daemon is using "/etc/nginx/nginx-standard.conf" as config.'
528 if ! [ -L /etc/systemd/system/nginx.service ] ; then
529 ln -s %{systemdunitdir}/%{name}-standard.service /etc/systemd/system/nginx.service || :
533 for a in access.log error.log; do
534 if [ ! -f /var/log/%{name}/nginx-light_$a ]; then
536 touch /var/log/%{name}/nginx-light_$a
537 chown nginx:nginx /var/log/%{name}/nginx-light_$a
538 chmod 644 /var/log/%{name}/nginx-light_$a
541 /sbin/chkconfig --add %{name}-light
542 %systemd_post %{name}-light.service
543 %service %{name}-light restart
544 echo 'NOTE: this nginx daemon is using "/etc/nginx/nginx-light.conf" as config'
547 for a in access.log error.log; do
548 if [ ! -f /var/log/%{name}/nginx-perl_$a ]; then
550 touch /var/log/%{name}/nginx-perl_$a
551 chown nginx:nginx /var/log/%{name}/nginx-perl_$a
552 chmod 644 /var/log/%{name}/nginx-perl_$a
555 /sbin/chkconfig --add %{name}-perl
556 %systemd_post %{name}-perl.service
557 %service %{name}-perl restart
558 echo 'NOTE: this nginx daemon is using "/etc/nginx/nginx-perl.conf" as config'
561 for a in access.log error.log; do
562 if [ ! -f /var/log/%{name}/nginx-mail_$a ]; then
564 touch /var/log/%{name}/nginx-mail_$a
565 chown nginx:nginx /var/log/%{name}/nginx-mail_$a
566 chmod 644 /var/log/%{name}/nginx-mail_$a
569 /sbin/chkconfig --add %{name}-mail
570 %systemd_post %{name}-mail.service
571 %service %{name}-mail restart
572 echo 'NOTE: this nginx daemon is using "/etc/nginx/nginx-mail.conf" as config'
575 if [ "$1" = "0" ];then
576 %service %{name}-standard stop
577 /sbin/chkconfig --del %{name}-standard
579 %systemd_preun %{name}-standard.service
582 if [ "$1" = "0" ]; then
583 %service %{name}-light stop
584 /sbin/chkconfig --del %{name}-light
586 %systemd_preun %{name}-light.service
589 if [ "$1" = "0" ]; then
590 %service %{name}-perl stop
591 /sbin/chkconfig --del %{name}-perl
593 %systemd_preun %{name}-perl.service
596 if [ "$1" = "0" ]; then
597 %service %{name}-mail stop
598 /sbin/chkconfig --del %{name}-mail
600 %systemd_preun %{name}-mail.service
603 if [ "$1" = "0" ]; then
620 %triggerpostun -- %{name}-standard < 1.4.1-4
621 %systemd_trigger %{name}-standard.service
623 %triggerpostun -- %{name}-light < 1.4.1-4
624 %systemd_trigger %{name}-light.service
626 %triggerpostun -- %{name}-perl < 1.4.1-4
627 %systemd_trigger %{name}-perl.service
629 %triggerpostun -- %{name}-mail < 1.4.1-4
630 %systemd_trigger %{name}-mail.service
633 %defattr(644,root,root,755)
634 %doc CHANGES LICENSE README html/index.html conf/nginx.conf
635 %doc %lang(ru) CHANGES.ru
636 %dir %attr(754,root,root) %{_sysconfdir}
638 %dir %{_nginxdir}/cgi-bin
639 %dir %{_nginxdir}/html
640 %dir %{_nginxdir}/errors
641 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/logrotate.d/%{name}
642 # XXX: duplicates, don't use such glob here
643 #%attr(640,root,root) %{_sysconfdir}/*[_-]*
644 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/proxy.conf
645 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/fastcgi.params
646 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/scgi.params
647 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/uwsgi.params
648 %attr(640,root,root) %{_sysconfdir}/mime.types
649 %attr(640,root,root) %{_sysconfdir}/koi-utf
650 %attr(640,root,root) %{_sysconfdir}/koi-win
651 %attr(640,root,root) %{_sysconfdir}/win-utf
652 %dir %{_sysconfdir}/webapps.d
653 %dir %{_sysconfdir}/vhosts.d
654 %attr(750,nginx,logs) %dir /var/log/archive/%{name}
655 %attr(750,nginx,logs) /var/log/%{name}
656 %config(noreplace,missingok) %verify(not md5 mtime size) %{_nginxdir}/html/*
657 %config(noreplace,missingok) %verify(not md5 mtime size) %{_nginxdir}/errors/*
658 %ghost /etc/systemd/system/nginx.service
661 %defattr(644,root,root,755)
662 %attr(755,root,root) %{_sbindir}/%{name}-standard
663 %attr(770,root,%{name}) /var/cache/%{name}-standard
664 %attr(754,root,root) /etc/rc.d/init.d/%{name}-standard
665 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}-standard.conf
666 %{systemdunitdir}/%{name}-standard.service
670 %defattr(644,root,root,755)
671 %attr(755,root,root) %{_sbindir}/%{name}-mail
672 %attr(770,root,%{name}) /var/cache/%{name}-mail
673 %attr(754,root,root) /etc/rc.d/init.d/%{name}-mail
674 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}-mail.conf
675 %{systemdunitdir}/%{name}-mail.service
680 %defattr(644,root,root,755)
681 %attr(755,root,root) %{_sbindir}/%{name}-light
682 %attr(770,root,%{name}) /var/cache/%{name}-light
683 %attr(754,root,root) /etc/rc.d/init.d/%{name}-light
684 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}-light.conf
685 %{systemdunitdir}/%{name}-light.service
690 %defattr(644,root,root,755)
691 %attr(755,root,root) %{_sbindir}/%{name}-perl
692 %attr(754,root,root) /etc/rc.d/init.d/%{name}-perl
693 %attr(770,root,%{name}) /var/cache/%{name}-perl
694 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}-perl.conf
695 %dir %{perl_vendorarch}/auto/%{name}
696 %attr(755,root,root) %{perl_vendorarch}/auto/%{name}/%{name}.so
697 %{perl_vendorarch}/auto/%{name}/%{name}.bs
698 %{perl_vendorarch}/%{name}.pm
699 %{systemdunitdir}/%{name}-perl.service
702 %files -n monit-rc-nginx
703 %defattr(644,root,root,755)
704 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/monit/%{name}-standard.monitrc
706 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/monit/%{name}-perl.monitrc
709 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/monit/%{name}-light.monitrc
712 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/monit/%{name}-mail.monitrc