]> git.pld-linux.org Git - packages/nginx.git/blame_incremental - nginx.spec
- small consistency fix
[packages/nginx.git] / nginx.spec
... / ...
CommitLineData
1# TODO
2# - /etc/sysconfig/nginx file
3# - missing perl build/install requires
4#
5# Conditional build for nginx:
6%bcond_without light # don't build light version
7%bcond_without mail # don't build imap/mail proxy
8%bcond_without perl # don't build with perl module
9%bcond_without addition # adds module
10%bcond_without dav # WebDAV
11%bcond_without flv # FLV stream
12%bcond_without ipv6 # build without ipv6 support
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 spdy # spdy module
19%bcond_without status # status module
20%bcond_without ssl # ssl support
21%bcond_with http_browser # header "User-agent" parser
22%bcond_with rtmp # rtmp support
23%bcond_with threads # thread pool support
24%bcond_with debug # enable debug logging: http://nginx.org/en/docs/debugging_log.html
25%bcond_without auth_request # auth_request module
26
27%ifarch x32
28%undefine with_rtsig
29%endif
30
31%define rtmp_version 1.1.7
32Summary: High perfomance HTTP and reverse proxy server
33Summary(pl.UTF-8): Serwer HTTP i odwrotne proxy o wysokiej wydajności
34# nginx lines:
35# - stable: production quality with stable API
36# - mainline: production quality but API can change
37Name: nginx
38Version: 1.8.0
39Release: 3
40License: BSD-like
41Group: Networking/Daemons/HTTP
42Source0: http://nginx.org/download/%{name}-%{version}.tar.gz
43# Source0-md5: 3ca4a37931e9fa301964b8ce889da8cb
44Source1: http://nginx.net/favicon.ico
45# Source1-md5: 2aaf2115c752cbdbfb8a2f0b3c3189ab
46Source2: proxy.conf
47Source3: %{name}.logrotate
48Source4: %{name}.mime
49Source6: %{name}-light.monitrc
50Source7: %{name}.init
51Source8: %{name}-mail.conf
52Source9: %{name}-mail.monitrc
53Source12: %{name}-perl.monitrc
54Source14: %{name}.conf
55Source15: %{name}-standard.monitrc
56Source17: %{name}-mime.types.sh
57Source18: %{name}-standard.service
58Source19: %{name}-light.service
59Source20: %{name}-perl.service
60Source21: %{name}-mail.service
61Source101: https://github.com/arut/nginx-rtmp-module/archive/v%{rtmp_version}/nginx-rtmp-module-%{rtmp_version}.tar.gz
62# Source101-md5: 8006de2560db3e55bb15d110220076ac
63Patch0: %{name}-no-Werror.patch
64URL: http://nginx.net/
65BuildRequires: mailcap
66%{?with_ssl:BuildRequires: openssl-devel >= 1.0.2}
67BuildRequires: 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}
72BuildRequires: rpmbuild(macros) >= 1.644
73BuildRequires: zlib-devel
74BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
75
76%define _sysconfdir /etc/%{name}
77%define _nginxdir /home/services/%{name}
78
79%description
80nginx ("engine x") is a high-performance HTTP server and reverse
81proxy, as well as an IMAP/POP3 proxy server. nginx was written by Igor
82Sysoev for Rambler.ru, Russia's second-most visited website, where it
83has been running in production for over two and a half years. Igor has
84released the source code under a BSD-like license. Although still in
85beta, nginx is known for its stability, rich feature set, simple
86configuration, and low resource consumption.
87
88%description -l pl.UTF-8
89nginx ("engine x") jest wysokowydajnym serwerem HTTP, odwrotnym proxy
90a także IMAP/POP3 proxy. nginx został napisany przez Igora Sysoeva na
91potrzeby serwisu Rambler.ru. Jest to drugi pod względem ilości
92odwiedzin serwis w Rosji i działa od ponad dwóch i pół roku. Igor
93opublikował źródła na licencji BSD. Mimo, że projekt jest ciągle w
94fazie beta, już zasłynął dzięki stabilności, bogactwu dodatków,
95prostej konfiguracji oraz małej "zasobożerności".
96
97%package common
98Summary: nginx - common files
99Summary(pl.UTF-8): nginx - pliki wspólne
100Group: Networking/Daemons/HTTP
101Requires(postun): /usr/sbin/groupdel
102Requires(postun): /usr/sbin/userdel
103Requires(pre): /bin/id
104Requires(pre): /usr/bin/getgid
105Requires(pre): /usr/sbin/groupadd
106Requires(pre): /usr/sbin/useradd
107Requires: rc-scripts >= 0.2.0
108Requires: systemd-units >= 38
109Provides: group(http)
110Provides: group(nginx)
111Provides: user(nginx)
112Provides: webserver
113Obsoletes: nginx < 1.4.1-4.1
114Conflicts: logrotate < 3.8.0
115
116%description common
117Common files for the nginx daemon.
118
119%description common -l pl.UTF-8
120Niezbędne pliki dla nginx.
121
122%package light
123Summary: High perfomance HTTP and reverse proxy server
124Summary(pl.UTF-8): Serwer HTTP i odwrotne proxy o wysokiej wydajności
125Group: Networking/Daemons/HTTP
126Requires(post,preun): /sbin/chkconfig
127Requires(post,preun,postun): systemd-units >= 38
128Requires: %{name}-common = %{version}-%{release}
129%{?with_ssl:Requires: openssl >= 1.0.2}
130Provides: nginx-daemon
131Provides: webserver
132
133%description light
134nginx ("engine x") is a high-performance HTTP server and reverse
135proxy, as well as an IMAP/POP3 proxy server. nginx was written by Igor
136Sysoev for Rambler.ru, Russia's second-most visited website, where it
137has been running in production for over two and a half years. Igor has
138released the source code under a BSD-like license. Although still in
139beta, nginx is known for its stability, rich feature set, simple
140configuration, and low resource consumption.
141
142The smallest, but also the fastest nginx edition. No additional
143modules, no Perl, no DAV, no FLV, no IMAP, POP3, SMTP proxy.
144
145%description light -l pl.UTF-8
146nginx ("engine x") jest wysokowydajnym serwerem HTTP, odwrotnym proxy
147a także IMAP/POP3 proxy. nginx został napisany przez Igora Sysoeva na
148potrzeby serwisu Rambler.ru. Jest to drugi pod względem ilości
149odwiedzin serwis w Rosji i działa od ponad dwóch i pół roku. Igor
150opublikował źródła na licencji BSD. Mimo, że projekt jest ciągle w
151fazie beta, już zasłynął dzięki stabilności, bogactwu dodatków,
152prostej konfiguracji oraz małej "zasobożerności".
153
154Najmniejsza i najszybsza wersja nginx. Bez wsparcia dla Perla, DAV,
155FLV oraz IMAP, POP3, SMTP proxy.
156
157%package perl
158Summary: High perfomance HTTP and reverse proxy server
159Summary(pl.UTF-8): Serwer HTTP i odwrotne proxy o wysokiej wydajności
160Group: Networking/Daemons/HTTP
161Requires(post,preun): /sbin/chkconfig
162Requires(post,preun,postun): systemd-units >= 38
163Requires: %{name}-common = %{version}-%{release}
164%{?with_ssl:Requires: openssl >= 1.0.2}
165Provides: nginx-daemon
166Provides: webserver
167
168%description perl
169nginx ("engine x") is a high-performance HTTP server and reverse
170proxy, as well as an IMAP/POP3 proxy server. nginx was written by Igor
171Sysoev for Rambler.ru, Russia's second-most visited website, where it
172has been running in production for over two and a half years. Igor has
173released the source code under a BSD-like license. Although still in
174beta, nginx is known for its stability, rich feature set, simple
175configuration, and low resource consumption.
176
177nginx with Perl support. Mail modules not included.
178
179%description perl -l pl.UTF-8
180nginx ("engine x") jest wysokowydajnym serwerem HTTP, odwrotnym proxy
181a także IMAP/POP3 proxy. nginx został napisany przez Igora Sysoeva na
182potrzeby serwisu Rambler.ru. Jest to drugi pod względem ilości
183odwiedzin serwis w Rosji i działa od ponad dwóch i pół roku. Igor
184opublikował źródła na licencji BSD. Mimo, że projekt jest ciągle w
185fazie beta, już zasłynął dzięki stabilności, bogactwu dodatków,
186prostej konfiguracji oraz małej "zasobożerności".
187
188nginx z obsługą Perla. Bez wsparcia dla modułów poczty.
189
190%package mail
191Summary: High perfomance IMAP, POP3, SMTP proxy server
192Summary(pl.UTF-8): IMAP, POP3, SMTP proxy o wysokiej wydajności
193Group: Networking/Daemons/HTTP
194Requires(post,preun): /sbin/chkconfig
195Requires(post,preun,postun): systemd-units >= 38
196Requires: %{name}-common = %{version}-%{release}
197Provides: nginx-daemon
198
199%description mail
200nginx ("engine x") is a high-performance HTTP server and reverse
201proxy, as well as an IMAP/POP3 proxy server. nginx was written by Igor
202Sysoev for Rambler.ru, Russia's second-most visited website, where it
203has been running in production for over two and a half years. Igor has
204released the source code under a BSD-like license. Although still in
205beta, nginx is known for its stability, rich feature set, simple
206configuration, and low resource consumption.
207
208nginx with mail support. Only mail modules included.
209
210%description mail -l pl.UTF-8
211nginx ("engine x") jest wysokowydajnym serwerem HTTP, odwrotnym proxy
212a także IMAP/POP3 proxy. nginx został napisany przez Igora Sysoeva na
213potrzeby serwisu Rambler.ru. Jest to drugi pod względem ilości
214odwiedzin serwis w Rosji i działa od ponad dwóch i pół roku. Igor
215opublikował źródła na licencji BSD. Mimo, że projekt jest ciągle w
216fazie beta, już zasłynął dzięki stabilności, bogactwu dodatków,
217prostej konfiguracji oraz małej "zasobożerności".
218
219nginx ze wsparciem tylko dla modułów poczty.
220
221%package standard
222Summary: High perfomance HTTP and reverse proxy server
223Summary(pl.UTF-8): Serwer HTTP i odwrotne proxy o wysokiej wydajności
224Group: Networking/Daemons/HTTP
225Requires(post,preun): /sbin/chkconfig
226Requires(post,preun,postun): systemd-units >= 38
227Requires: %{name}-common = %{version}-%{release}
228%{?with_ssl:Requires: openssl >= 1.0.2}
229Provides: nginx
230Provides: nginx-daemon
231Conflicts: logrotate < 3.7-4
232
233%description standard
234nginx ("engine x") is a high-performance HTTP server and reverse
235proxy, as well as an IMAP/POP3 proxy server. nginx was written by Igor
236Sysoev for Rambler.ru, Russia's second-most visited website, where it
237has been running in production for over two and a half years. Igor has
238released the source code under a BSD-like license. Although still in
239beta, nginx is known for its stability, rich feature set, simple
240configuration, and low resource consumption.
241
242This is standard nginx version, without Perl support and IMAP, POP3,
243SMTP proxy.
244
245%description standard -l pl.UTF-8
246nginx ("engine x") jest wysokowydajnym serwerem HTTP, odwrotnym proxy
247a także IMAP/POP3 proxy. nginx został napisany przez Igora Sysoeva na
248potrzeby serwisu Rambler.ru. Jest to drugi pod względem ilości
249odwiedzin serwis w Rosji i działa od ponad dwóch i pół roku. Igor
250opublikował źródła na licencji BSD. Mimo, że projekt jest ciągle w
251fazie beta, już zasłynął dzięki stabilności, bogactwu dodatków,
252prostej konfiguracji oraz małej "zasobożerności". ginx ("engine x")
253jest wysokowydajnym serwerem HTTP, odwrotnym proxy a także IMAP/POP3
254proxy. nginx został napisany przez Igora Sysoeva na potrzeby serwisu
255Rambler.ru. Jest to drugi pod względem ilości odwiedzin serwis w Rosji
256i działa od ponad dwóch i pół roku. Igor opublikował źródła na
257licencji BSD. Mimo, że projekt jest ciągle w fazie beta, już zasłynął
258dzięki stabilności, bogactwu dodatków, prostej konfiguracji oraz małej
259"zasobożerności".
260
261To jest standardowa wersja nginx, bez obsługi Perla oraz proxy dla
262IMAP, POP3, SMTP.
263
264%package -n monit-rc-nginx
265Summary: nginx support for monit
266Summary(pl.UTF-8): Wsparcie nginx dla monit
267Group: Applications/System
268URL: http://nginx.eu/
269Requires: %{name}-common = %{version}-%{release}
270Requires: monit
271
272%description -n monit-rc-nginx
273monitrc file for monitoring nginx webserver.
274
275%description -n monit-rc-nginx -l pl.UTF-8
276Plik monitrc do monitorowania serwera WWW nginx.
277
278%prep
279%setup -q %{?with_rtmp:-a101}
280%patch0 -p0
281
282%if %{with rtmp}
283mv nginx-rtmp-module-%{rtmp_version} nginx-rtmp-module
284%endif
285
286# build mime.types.conf
287#sh %{SOURCE17} /etc/mime.types
288
289%build
290# NB: not autoconf generated configure
291cp -f configure auto/
292
293install -d bin
294
295# build with default options
296build() {
297 local type=$1; shift
298./configure \
299 --prefix=%{_prefix} \
300 --sbin-path=%{_sbindir}/%{name}-$type \
301 --conf-path=%{_sysconfdir}/%{name}-$type.conf \
302 --error-log-path=%{_localstatedir}/log/%{name}/%{name}-${type}_error.log \
303 --http-log-path=%{_localstatedir}/log/%{name}/%{name}-${type}_access.log \
304 --pid-path=%{_localstatedir}/run/%{name}-$type.pid \
305 --lock-path=%{_localstatedir}/lock/subsys/%{name}-$type \
306 --http-client-body-temp-path=%{_localstatedir}/cache/%{name}-$type/client_body_temp \
307 --http-fastcgi-temp-path=%{_localstatedir}/cache/%{name}-$type/fastcgi_temp \
308 --http-proxy-temp-path=%{_localstatedir}/cache/%{name}-$type/proxy_temp \
309 --user=nginx \
310 --group=nginx \
311 %{?with_ipv6:--with-ipv6} \
312 %{?with_select:--with-select_module} \
313 %{?with_poll:--with-poll_module} \
314 %{?with_rtsig:--with-rtsig_module} \
315 --with-cc="%{__cc}" \
316 --with-cc-opt="%{rpmcflags}" \
317 --with-ld-opt="%{rpmldflags}" \
318 %{?with_debug:--with-debug} \
319 "$@"
320%{__make}
321}
322
323%if %{with perl}
324build perl \
325 --with-http_perl_module \
326 %{?with_addition:--with-http_addition_module} \
327 %{?with_dav:--with-http_dav_module} \
328 %{?with_flv:--with-http_flv_module} \
329 %{?with_sub:--with-http_sub_module} \
330 %{?with_realip:--with-http_realip_module} \
331 %{?with_status:--with-http_stub_status_module} \
332 %{?with_ssl:--with-http_ssl_module} \
333 %{!?with_http_browser:--without-http_browser_module} \
334 %{?with_rtmp:--add-module=./nginx-rtmp-module} \
335 %{?with_auth_request:--with-http_auth_request_module} \
336 %{?with_threads:--with-threads} \
337 %{?with_spdy:--with-http_spdy_module} \
338 --with-http_secure_link_module \
339 %{nil}
340
341mv -f objs/nginx bin/nginx-perl
342mv -f objs/src/http/modules/perl/blib/arch/auto/nginx/nginx.so bin/nginx.so
343mv -f objs/src/http/modules/perl/nginx.pm bin/nginx.pm
344%endif
345
346%if %{with mail}
347build mail \
348 --without-http \
349 --with-imap \
350 --with-mail \
351 --with-mail_ssl_module \
352 %{nil}
353
354mv -f objs/nginx bin/nginx-mail
355%endif
356
357%if %{with light}
358build light \
359 %{?with_realip:--with-http_realip_module} \
360 %{?with_status:--with-http_stub_status_module} \
361 %{?with_ssl:--with-http_ssl_module} \
362 %{?with_rtmp:--add-module=./nginx-rtmp-module} \
363 %{?with_auth_request:--with-http_auth_request_module} \
364 %{?with_threads:--with-threads} \
365 %{?with_spdy:--with-http_spdy_module} \
366 --without-http_browser_module \
367 --with-http_secure_link_module \
368 %{nil}
369
370mv -f objs/nginx bin/nginx-light
371%endif
372
373build standard \
374 %{?with_addition:--with-http_addition_module} \
375 %{?with_dav:--with-http_dav_module} \
376 %{?with_flv:--with-http_flv_module} \
377 %{?with_sub:--with-http_sub_module} \
378 %{?with_realip:--with-http_realip_module} \
379 %{?with_status:--with-http_stub_status_module} \
380 %{?with_ssl:--with-http_ssl_module} \
381 %{!?with_http_browser:--without-http_browser_module} \
382 %{?with_rtmp:--add-module=./nginx-rtmp-module} \
383 %{?with_auth_request:--with-http_auth_request_module} \
384 %{?with_threads:--with-threads} \
385 --with-http_secure_link_module \
386 %{nil}
387
388mv -f objs/nginx bin/nginx-standard
389
390%install
391rm -rf $RPM_BUILD_ROOT
392install -d $RPM_BUILD_ROOT/etc/rc.d/init.d \
393 $RPM_BUILD_ROOT%{_nginxdir}/{cgi-bin,html,errors} \
394 $RPM_BUILD_ROOT%{_localstatedir}/log/{%{name},archive/%{name}} \
395 $RPM_BUILD_ROOT%{_localstatedir}/cache/{%{name}-standard,%{name}-perl,%{name}-mail,%{name}-light} \
396 $RPM_BUILD_ROOT%{_localstatedir}/lock/subsys/{%{name}-standard,%{name}-perl,%{name}-mail,%{name}-light} \
397 $RPM_BUILD_ROOT{%{_sbindir},%{_sysconfdir}/{vhosts,webapps}.d} \
398 $RPM_BUILD_ROOT/etc/{logrotate.d,monit} \
399 $RPM_BUILD_ROOT{%{systemdunitdir},/etc/systemd/system}
400
401cp -p conf/*_params $RPM_BUILD_ROOT%{_sysconfdir}
402cp -p conf/koi-utf $RPM_BUILD_ROOT%{_sysconfdir}/koi-utf
403cp -p conf/koi-win $RPM_BUILD_ROOT%{_sysconfdir}/koi-win
404cp -p conf/win-utf $RPM_BUILD_ROOT%{_sysconfdir}/win-utf
405cp -p html/index.html $RPM_BUILD_ROOT%{_nginxdir}/html
406cp -p html/50x.html $RPM_BUILD_ROOT%{_nginxdir}/errors
407cp -p %{SOURCE1} $RPM_BUILD_ROOT%{_nginxdir}/html/favicon.ico
408cp -p %{SOURCE2} $RPM_BUILD_ROOT%{_sysconfdir}/proxy.conf
409cp -p %{SOURCE3} $RPM_BUILD_ROOT/etc/logrotate.d/%{name}
410cp -p %{SOURCE4} $RPM_BUILD_ROOT%{_sysconfdir}/mime.types
411
412install_build() {
413 local type=$1
414 %{__sed} -e 's/@type@/standard/g' %{_sourcedir}/%{name}.conf \
415 > $RPM_BUILD_ROOT%{_sysconfdir}/%{name}-$type.conf
416
417 install -p %{SOURCE7} $RPM_BUILD_ROOT/etc/rc.d/init.d/%{name}-$type
418 %{__sed} -i -e 's/@type@/standard/g' $RPM_BUILD_ROOT/etc/rc.d/init.d/%{name}-$type
419
420 cp -p %{_sourcedir}/%{name}-$type.service $RPM_BUILD_ROOT%{systemdunitdir}
421 cp -p %{_sourcedir}/%{name}-$type.monitrc $RPM_BUILD_ROOT/etc/monit
422 install -p bin/%{name}-$type $RPM_BUILD_ROOT%{_sbindir}
423}
424
425install_build standard
426ln -sf %{systemdunitdir}/%{name}-standard.service $RPM_BUILD_ROOT/etc/systemd/system/nginx.service
427
428%if %{with light}
429install_build light
430%endif
431
432%if %{with perl}
433install -d $RPM_BUILD_ROOT{%{perl_vendorarch},%{perl_vendorarch}/auto/%{name}}
434install_build perl
435cp -p bin/nginx.pm $RPM_BUILD_ROOT%{perl_vendorarch}/%{name}.pm
436install -p bin/nginx.so $RPM_BUILD_ROOT%{perl_vendorarch}/auto/%{name}/%{name}.so
437install -p bin/nginx-perl $RPM_BUILD_ROOT%{_sbindir}
438%endif
439
440%if %{with mail}
441install_build mail
442%endif
443
444# only touch these for ghost packaging
445touch $RPM_BUILD_ROOT%{_sysconfdir}/{fastcgi,scgi,uwsgi}.params
446
447%clean
448rm -rf $RPM_BUILD_ROOT
449
450%pre common
451%groupadd -r -g 213 %{name}
452%groupadd -g 51 http
453%useradd -r -u 213 -d /usr/share/empty -s /bin/false -c "Nginx HTTP User" -g %{name} %{name}
454%addusertogroup %{name} http
455
456%post standard
457for a in access.log error.log; do
458 if [ ! -f /var/log/%{name}/nginx-standard_$a ]; then
459 umask 022
460 touch /var/log/%{name}/nginx-standard_$a
461 chown nginx:nginx /var/log/%{name}/nginx-standard_$a
462 chmod 644 /var/log/%{name}/nginx-standard_$a
463 fi
464done
465/sbin/chkconfig --add %{name}-standard
466%systemd_post %{name}-standard.service
467%service %{name}-standard force-reload
468echo 'NOTE: this nginx daemon is using "/etc/nginx/nginx-standard.conf" as config.'
469if ! [ -L /etc/systemd/system/nginx.service ] ; then
470 ln -s %{systemdunitdir}/%{name}-standard.service /etc/systemd/system/nginx.service || :
471fi
472
473%post light
474for a in access.log error.log; do
475 if [ ! -f /var/log/%{name}/nginx-light_$a ]; then
476 umask 022
477 touch /var/log/%{name}/nginx-light_$a
478 chown nginx:nginx /var/log/%{name}/nginx-light_$a
479 chmod 644 /var/log/%{name}/nginx-light_$a
480 fi
481done
482/sbin/chkconfig --add %{name}-light
483%systemd_post %{name}-light.service
484%service %{name}-light force-reload
485echo 'NOTE: this nginx daemon is using "/etc/nginx/nginx-light.conf" as config'
486
487%post perl
488for a in access.log error.log; do
489 if [ ! -f /var/log/%{name}/nginx-perl_$a ]; then
490 umask 022
491 touch /var/log/%{name}/nginx-perl_$a
492 chown nginx:nginx /var/log/%{name}/nginx-perl_$a
493 chmod 644 /var/log/%{name}/nginx-perl_$a
494 fi
495done
496/sbin/chkconfig --add %{name}-perl
497%systemd_post %{name}-perl.service
498%service %{name}-perl force-reload
499echo 'NOTE: this nginx daemon is using "/etc/nginx/nginx-perl.conf" as config'
500
501%post mail
502for a in access.log error.log; do
503 if [ ! -f /var/log/%{name}/nginx-mail_$a ]; then
504 umask 022
505 touch /var/log/%{name}/nginx-mail_$a
506 chown nginx:nginx /var/log/%{name}/nginx-mail_$a
507 chmod 644 /var/log/%{name}/nginx-mail_$a
508 fi
509done
510/sbin/chkconfig --add %{name}-mail
511%systemd_post %{name}-mail.service
512%service %{name}-mail force-reload
513echo 'NOTE: this nginx daemon is using "/etc/nginx/nginx-mail.conf" as config'
514
515%preun standard
516if [ "$1" = "0" ];then
517 %service %{name}-standard stop
518 /sbin/chkconfig --del %{name}-standard
519fi
520%systemd_preun %{name}-standard.service
521
522%preun light
523if [ "$1" = "0" ]; then
524 %service %{name}-light stop
525 /sbin/chkconfig --del %{name}-light
526fi
527%systemd_preun %{name}-light.service
528
529%preun perl
530if [ "$1" = "0" ]; then
531 %service %{name}-perl stop
532 /sbin/chkconfig --del %{name}-perl
533fi
534%systemd_preun %{name}-perl.service
535
536%preun mail
537if [ "$1" = "0" ]; then
538 %service %{name}-mail stop
539 /sbin/chkconfig --del %{name}-mail
540fi
541%systemd_preun %{name}-mail.service
542
543%postun common
544if [ "$1" = "0" ]; then
545 %userremove %{name}
546 %groupremove %{name}
547fi
548
549%postun standard
550%systemd_reload
551
552%postun light
553%systemd_reload
554
555%postun perl
556%systemd_reload
557
558%postun mail
559%systemd_reload
560
561%triggerpostun -- %{name}-standard < 1.4.1-4
562%systemd_trigger %{name}-standard.service
563
564%triggerpostun -- %{name}-light < 1.4.1-4
565%systemd_trigger %{name}-light.service
566
567%triggerpostun -- %{name}-perl < 1.4.1-4
568%systemd_trigger %{name}-perl.service
569
570%triggerpostun -- %{name}-mail < 1.4.1-4
571%systemd_trigger %{name}-mail.service
572
573%triggerpostun common -- %{name}-common < 1.8.0-2
574# skip *this* trigger on downgrade
575[ $1 -le 1 ] && exit 0
576ln -sf fastcgi_params %{_sysconfdir}/fastcgi.params
577ln -sf scgi_params %{_sysconfdir}/scgi.params
578ln -sf uwsgi_params %{_sysconfdir}/uwsgi.params
579exit 0
580
581%files common
582%defattr(644,root,root,755)
583%doc CHANGES LICENSE README html/index.html conf/nginx.conf
584%doc %lang(ru) CHANGES.ru
585%dir %attr(750,root,nginx) %{_sysconfdir}
586%dir %{_nginxdir}
587%dir %{_nginxdir}/cgi-bin
588%dir %{_nginxdir}/html
589%dir %{_nginxdir}/errors
590%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/logrotate.d/%{name}
591# XXX: duplicates, don't use such glob here
592#%attr(640,root,root) %{_sysconfdir}/*[_-]*
593%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/proxy.conf
594%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/fastcgi_params
595%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/scgi_params
596%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/uwsgi_params
597%ghost %{_sysconfdir}/fastcgi.params
598%ghost %{_sysconfdir}/scgi.params
599%ghost %{_sysconfdir}/uwsgi.params
600%attr(640,root,root) %{_sysconfdir}/mime.types
601%attr(640,root,root) %{_sysconfdir}/koi-utf
602%attr(640,root,root) %{_sysconfdir}/koi-win
603%attr(640,root,root) %{_sysconfdir}/win-utf
604%dir %{_sysconfdir}/webapps.d
605%dir %{_sysconfdir}/vhosts.d
606%attr(750,nginx,logs) %dir /var/log/archive/%{name}
607%attr(750,nginx,logs) /var/log/%{name}
608%config(noreplace,missingok) %verify(not md5 mtime size) %{_nginxdir}/html/*
609%config(noreplace,missingok) %verify(not md5 mtime size) %{_nginxdir}/errors/*
610%ghost /etc/systemd/system/nginx.service
611
612%files standard
613%defattr(644,root,root,755)
614%attr(755,root,root) %{_sbindir}/%{name}-standard
615%attr(770,root,%{name}) /var/cache/%{name}-standard
616%attr(754,root,root) /etc/rc.d/init.d/%{name}-standard
617%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}-standard.conf
618%{systemdunitdir}/%{name}-standard.service
619
620%if %{with mail}
621%files mail
622%defattr(644,root,root,755)
623%attr(755,root,root) %{_sbindir}/%{name}-mail
624%attr(770,root,%{name}) /var/cache/%{name}-mail
625%attr(754,root,root) /etc/rc.d/init.d/%{name}-mail
626%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}-mail.conf
627%{systemdunitdir}/%{name}-mail.service
628%endif
629
630%if %{with light}
631%files light
632%defattr(644,root,root,755)
633%attr(755,root,root) %{_sbindir}/%{name}-light
634%attr(770,root,%{name}) /var/cache/%{name}-light
635%attr(754,root,root) /etc/rc.d/init.d/%{name}-light
636%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}-light.conf
637%{systemdunitdir}/%{name}-light.service
638%endif
639
640%if %{with perl}
641%files perl
642%defattr(644,root,root,755)
643%attr(755,root,root) %{_sbindir}/%{name}-perl
644%attr(754,root,root) /etc/rc.d/init.d/%{name}-perl
645%attr(770,root,%{name}) /var/cache/%{name}-perl
646%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}-perl.conf
647%dir %{perl_vendorarch}/auto/%{name}
648%attr(755,root,root) %{perl_vendorarch}/auto/%{name}/%{name}.so
649%{perl_vendorarch}/%{name}.pm
650%{systemdunitdir}/%{name}-perl.service
651%endif
652
653%files -n monit-rc-nginx
654%defattr(644,root,root,755)
655%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/monit/%{name}-standard.monitrc
656%if %{with perl}
657%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/monit/%{name}-perl.monitrc
658%endif
659%if %{with light}
660%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/monit/%{name}-light.monitrc
661%endif
662%if %{with mail}
663%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/monit/%{name}-mail.monitrc
664%endif
This page took 0.052266 seconds and 4 git commands to generate.