]> git.pld-linux.org Git - packages/nginx.git/blobdiff - nginx.spec
- fix patching
[packages/nginx.git] / nginx.spec
index 6597f23306d280112d720f9a8e6719b3a2f816a1..6fed3bbe5850d617e148f31465e505b4b15c9a91 100644 (file)
@@ -1,7 +1,6 @@
 # TODO
 # - /etc/sysconfig/nginx file
 # - missing perl build/install requires
-# - maybe -with-cpu-opt=CPU (pentium, pentiumpro, pentium3, pentium4, athlon, opteron, amd64, sparc32, sparc64, ppc64) ?
 # - nginx should have own group (and work with it) or use http group ?
 #
 # Conditional build for nginx:
@@ -11,6 +10,7 @@
 %bcond_without addition        # adds module
 %bcond_without dav             # WebDAV
 %bcond_without flv             # FLV stream
+%bcond_without ipv6            # build without ipv6 support
 %bcond_without sub             # ngx_http_sub_module
 %bcond_without poll            # poll
 %bcond_without realip          # real ip (behind proxy)
 Summary:       High perfomance HTTP and reverse proxy server
 Summary(pl.UTF-8):     Serwer HTTP i odwrotne proxy o wysokiej wydajności
 Name:          nginx
-Version:       0.5.33
-Release:       0.8
+Version:       1.2.4
+Release:       0.1
 License:       BSD-like
-Group:         Networking/Daemons
-Source0:       http://sysoev.ru/nginx/%{name}-%{version}.tar.gz
-# Source0-md5: a78be74b4fd8e009545ef02488fcac86
-Source1:       http://www.nginx.eu/favicon.ico
+Group:         Networking/Daemons/HTTP
+Source0:       http://nginx.org/download/%{name}-%{version}.tar.gz
+# Source0-md5: a7c9a515f632c8cbb07ab67392208088
+Source1:       http://nginx.net/favicon.ico
 # Source1-md5: 2aaf2115c752cbdbfb8a2f0b3c3189ab
-Source2:       http://www.nginx.eu/download/proxy.conf
-# Source2-md5: f5263ae01c2edb18f46d5d1df2d3a5cd
+Source2:       proxy.conf
 Source3:       %{name}.logrotate
 Source4:       %{name}.mime
 Source5:       %{name}-light.conf
@@ -48,13 +47,14 @@ Source14:   %{name}-standard.conf
 Source15:      %{name}-standard.monitrc
 Source16:      %{name}-standard.init
 Source17:      %{name}-mime.types.sh
-Patch0:                %{name}-config.patch
+Patch0:                nginx-no-Werror.patch
 URL:           http://nginx.net/
 BuildRequires: mailcap
 BuildRequires: openssl-devel
 BuildRequires: pcre-devel
 %{?with_perl:BuildRequires: perl-CGI}
 %{?with_perl:BuildRequires: perl-devel}
+%{?with_perl:BuildRequires: python}
 %{?with_perl:BuildRequires: rpm-perlprov}
 BuildRequires: rpmbuild(macros) >= 1.268
 BuildRequires: zlib-devel
@@ -65,7 +65,7 @@ Requires(pre):        /bin/id
 Requires(pre): /usr/bin/getgid
 Requires(pre): /usr/sbin/groupadd
 Requires(pre): /usr/sbin/useradd
-Requires:      nginx-daemon
+#Requires:     nginx-daemon
 Requires:      openssl
 Requires:      pcre
 Requires:      rc-scripts >= 0.2.0
@@ -75,40 +75,38 @@ Provides:   group(http)
 Provides:      group(nginx)
 Provides:      user(nginx)
 Provides:      webserver
-Conflicts:     logrotate < 3.7-4
+Conflicts:     logrotate < 3.8.0
 BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
 %define                _sysconfdir     /etc/%{name}
 %define                _nginxdir       /home/services/%{name}
 
 %description
-Nginx ("engine x") is a high-performance HTTP server and reverse
-proxy, as well as an IMAP/POP3 proxy server. Nginx was written by Igor
+nginx ("engine x") is a high-performance HTTP server and reverse
+proxy, as well as an IMAP/POP3 proxy server. nginx was written by Igor
 Sysoev for Rambler.ru, Russia's second-most visited website, where it
 has been running in production for over two and a half years. Igor has
 released the source code under a BSD-like license. Although still in
-beta, Nginx is known for its stability, rich feature set, simple
+beta, nginx is known for its stability, rich feature set, simple
 configuration, and low resource consumption.
 
-Common files for Nginx daemon.
+Common files for nginx daemon.
 
 %description -l pl.UTF-8
-Nginx ("engine x") jest wysokowydajnym serwerem HTTP, odwrotnym proxy
-a także IMAP/POP3 proxy. Nginx został napisany przez Igora Sysoev'a
+nginx ("engine x") jest wysokowydajnym serwerem HTTP, odwrotnym proxy
+a także IMAP/POP3 proxy. nginx został napisany przez Igora Sysoeva
 na potrzeby serwisu Rambler.ru. Jest to drugi pod względem ilości
 odwiedzin serwis w Rosji i działa od ponad dwóch i pół roku. Igor
 opublikował źródła na licencji BSD. Mimo, że projekt jest ciągle
-w fazie beta, już zasłynął dzieki stabilności, bogactwu dodatków,
+w fazie beta, już zasłynął dzięki stabilności, bogactwu dodatków,
 prostej konfiguracji oraz małej "zasobożerności".
 
-Niezbędne pliki dla Nginx.
+Niezbędne pliki dla nginx.
 
 %package light
 Summary:       High perfomance HTTP and reverse proxy server
 Summary(pl.UTF-8):     Serwer HTTP i odwrotne proxy o wysokiej wydajności
-License:       BSD-like
-Group:         Networking/Daemons
-URL:           http://nginx.net/
+Group:         Networking/Daemons/HTTP
 Requires(post,preun):  /sbin/chkconfig
 Requires(postun):      /usr/sbin/groupdel
 Requires(postun):      /usr/sbin/userdel
@@ -123,19 +121,17 @@ Provides: user(nginx)
 Provides:      webserver
 
 %description light
-The smallest, but also the fastest Nginx edition. No additional
+The smallest, but also the fastest nginx edition. No additional
 modules, no Perl, no DAV, no FLV, no IMAP, POP3, SMTP proxy.
 
 %description light -l pl.UTF-8
-Najmniejsza i najszybsza wersja Nginx. Bez wsparcia dla Perla, DAV,
+Najmniejsza i najszybsza wersja nginx. Bez wsparcia dla Perla, DAV,
 FLV oraz IMAP, POP3, SMTP proxy.
 
 %package perl
 Summary:       High perfomance HTTP and reverse proxy server
 Summary(pl.UTF-8):     Serwer HTTP i odwrotne proxy o wysokiej wydajności
-License:       BSD-like
-Group:         Networking/Daemons
-URL:           http://nginx.net/
+Group:         Networking/Daemons/HTTP
 Requires(post,preun):  /sbin/chkconfig
 Requires(postun):      /usr/sbin/groupdel
 Requires(postun):      /usr/sbin/userdel
@@ -148,17 +144,15 @@ Provides: user(nginx)
 Provides:      webserver
 
 %description perl
-Nginx with Perl support. Mail modules not included.
+nginx with Perl support. Mail modules not included.
 
 %description perl -l pl.UTF-8
-Nignx z obsługą Perla. Bez wsparcia dla modułów poczty.
+nginx z obsługą Perla. Bez wsparcia dla modułów poczty.
 
 %package mail
-Summary:       High perfomance HTTP and reverse proxy server
-Summary(pl.UTF-8):     Serwer HTTP i odwrotne proxy o wysokiej wydajności
-License:       BSD-like
-Group:         Networking/Daemons
-URL:           http://nginx.net/
+Summary:       High perfomance IMAP, POP3, SMTP proxy server
+Summary(pl.UTF-8):     IMAP, POP3, SMTP proxy o wysokiej wydajności
+Group:         Networking/Daemons/HTTP
 Requires(post,preun):  /sbin/chkconfig
 Requires(postun):      /usr/sbin/groupdel
 Requires(postun):      /usr/sbin/userdel
@@ -173,17 +167,15 @@ Provides: user(nginx)
 Provides:      webserver
 
 %description mail
-Nginx with mail support. Only mail modules included.
+nginx with mail support. Only mail modules included.
 
 %description mail -l pl.UTF-8
-Nginx ze wsparciem tylko dla modułów poczty.
+nginx ze wsparciem tylko dla modułów poczty.
 
 %package standard
-Summary:       Configuration files and documentation for Nginx
-Summary(pl.UTF-8):     Pliki konfiguracyjne i dokumentacja dla Nginx
-License:       BSD-like
-Group:         Networking/Daemons
-URL:           http://nginx.net/
+Summary:       High perfomance HTTP and reverse proxy server
+Summary(pl.UTF-8):     Serwer HTTP i odwrotne proxy o wysokiej wydajności
+Group:         Networking/Daemons/HTTP
 Requires(post,preun):  /sbin/chkconfig
 Requires(postun):      /usr/sbin/groupdel
 Requires(postun):      /usr/sbin/userdel
@@ -195,43 +187,26 @@ Provides: nginx-daemon
 Conflicts:     logrotate < 3.7-4
 
 %description standard
-Nginx ("engine x") is a high-performance HTTP server and reverse
-proxy, as well as an IMAP/POP3 proxy server. Nginx was written by Igor
-Sysoev for Rambler.ru, Russia's second-most visited website, where it
-has been running in production for over two and a half years. Igor has
-released the source code under a BSD-like license. Although still in
-beta, Nginx is known for its stability, rich feature set, simple
-configuration, and low resource consumption.
-
-This is standard Nginx version, without Perl support and IMAP, POP3,
+This is standard nginx version, without Perl support and IMAP, POP3,
 SMTP proxy. 
 
 %description standard -l pl.UTF-8
-Nginx ("engine x") jest wysokowydajnym serwerem HTTP, odwrotnym proxy
-a także IMAP/POP3 proxy. Nginx został napisany przez Igora Sysoev'a
-na potrzeby serwisu Rambler.ru. Jest to drugi pod względem ilości
-odwiedzin serwis w Rosji i działa od ponad dwóch i pół roku. Igor
-opublikował źródła na licencji BSD. Mimo, że projekt jest ciągle
-w fazie beta, już zasłynął dzieki stabilności, bogactwu dodatków,
-prostej konfiguracji oraz małej "zasobożerności".
-
-To jest standardowa wersja Nginx, bez obsługi Perla oraz proxy dla
+To jest standardowa wersja nginx, bez obsługi Perla oraz proxy dla
 IMAP, POP3, SMTP.
 
 %package -n monit-rc-nginx
-Summary:       Nginx support for monit
-Summary(pl.UTF-8):     Wsparcie Nginx dla monit
-License:       BSD-like
+Summary:       nginx support for monit
+Summary(pl.UTF-8):     Wsparcie nginx dla monit
 Group:         Applications/System
 URL:           http://nginx.eu/
 Requires:      %{name} = %{version}-%{release}
 Requires:      monit
 
 %description -n monit-rc-nginx
-monitrc file for monitoring Nginx webserver server.
+monitrc file for monitoring nginx webserver.
 
 %description -n monit-rc-nginx -l pl.UTF-8
-Plik monitrc do monitorowania serwera WWW Nginx.
+Plik monitrc do monitorowania serwera WWW nginx.
 
 %prep
 %setup -q
@@ -262,6 +237,7 @@ cp -f configure auto/
        %{?with_addition:--with-http_addition_module} \
        %{?with_dav:--with-http_dav_module} \
        %{?with_flv:--with-http_flv_module} \
+       %{?with_ipv6:--with-ipv6} \
        %{?with_sub:--with-http_sub_module} \
        %{?with_poll:--with-poll_module} \
        %{?with_realip:--with-http_realip_module} \
@@ -298,6 +274,7 @@ mv -f objs/src/http/modules/perl/nginx.pm contrib/nginx.pm
        --with-mail \
        --with-mail_ssl_module \
        --without-http \
+       %{?with_ipv6:--with-ipv6} \
        %{?with_poll:--with-poll_module} \
        %{?with_rtsig:--with-rtsig_module} \
        %{?with_select:--with-select_module} \
@@ -323,6 +300,7 @@ mv -f objs/nginx contrib/nginx-mail
        --lock-path=%{_localstatedir}/lock/subsys/%{name}-light \
        --user=nginx \
        --group=nginx \
+       %{?with_ipv6:--with-ipv6} \
        %{?with_poll:--with-poll_module} \
        %{?with_realip:--with-http_realip_module} \
        %{?with_rtsig:--with-rtsig_module} \
@@ -357,6 +335,7 @@ mv -f objs/nginx contrib/nginx-light
        %{?with_addition:--with-http_addition_module} \
        %{?with_dav:--with-http_dav_module} \
        %{?with_flv:--with-http_flv_module} \
+       %{?with_ipv6:--with-ipv6} \
        %{?with_sub:--with-http_sub_module} \
        %{?with_poll:--with-poll_module} \
        %{?with_realip:--with-http_realip_module} \
@@ -385,8 +364,10 @@ install -d $RPM_BUILD_ROOT/etc/rc.d/init.d \
        $RPM_BUILD_ROOT{%{_sbindir},%{_sysconfdir}} \
        $RPM_BUILD_ROOT/etc/{logrotate.d,monit}
 
-install conf/* $RPM_BUILD_ROOT%{_sysconfdir}
 install conf/fastcgi_params $RPM_BUILD_ROOT%{_sysconfdir}/fastcgi.params
+install conf/koi-utf $RPM_BUILD_ROOT%{_sysconfdir}/koi-utf
+install conf/koi-win $RPM_BUILD_ROOT%{_sysconfdir}/koi-win
+install conf/win-utf $RPM_BUILD_ROOT%{_sysconfdir}/win-utf
 install html/index.html $RPM_BUILD_ROOT%{_nginxdir}/html
 install html/50x.html $RPM_BUILD_ROOT%{_nginxdir}/errors
 install %{SOURCE1} $RPM_BUILD_ROOT%{_nginxdir}/html/favicon.ico
@@ -438,6 +419,7 @@ rm -rf $RPM_BUILD_ROOT
 %post standard
 for a in access.log error.log; do
        if [ ! -f /var/log/%{name}/nginx-standard_$a ]; then
+               umask 022
                touch /var/log/%{name}/nginx-standard_$a
                chown nginx:nginx /var/log/%{name}/nginx-standard_$a
                chmod 644 /var/log/%{name}/nginx-standard_$a
@@ -450,6 +432,7 @@ echo 'NOTE: daemon is now using "/etc/nginx/nginx-standard.conf" as config.'
 %post light
 for a in access.log error.log; do
        if [ ! -f /var/log/%{name}/nginx-light_$a ]; then
+               umask 022
                touch /var/log/%{name}/nginx-light_$a
                chown nginx:nginx /var/log/%{name}/nginx-light_$a
                chmod 644 /var/log/%{name}/nginx-light_$a
@@ -457,11 +440,12 @@ for a in access.log error.log; do
 done
 /sbin/chkconfig --add %{name}-light
 %service %{name}-light restart
-echo 'NOTE: daemon is now using "/etc/nginx/nginx-light.conf" file'
+echo 'NOTE: daemon is now using "/etc/nginx/nginx-light.conf" as config'
 
 %post perl
 for a in access.log error.log; do
        if [ ! -f /var/log/%{name}/nginx-perl_$a ]; then
+               umask 022
                touch /var/log/%{name}/nginx-perl_$a
                chown nginx:nginx /var/log/%{name}/nginx-perl_$a
                chmod 644 /var/log/%{name}/nginx-perl_$a
@@ -469,11 +453,12 @@ for a in access.log error.log; do
 done
 /sbin/chkconfig --add %{name}-perl
 %service %{name}-perl restart
-echo 'NOTE: daemon is now using "/etc/nginx/nginx-perl.conf" file'
+echo 'NOTE: daemon is now using "/etc/nginx/nginx-perl.conf" as config'
 
 %post mail
 for a in access.log error.log; do
        if [ ! -f /var/log/%{name}/nginx-mail_$a ]; then
+               umask 022
                touch /var/log/%{name}/nginx-mail_$a
                chown nginx:nginx /var/log/%{name}/nginx-mail_$a
                chmod 644 /var/log/%{name}/nginx-mail_$a
@@ -481,7 +466,7 @@ for a in access.log error.log; do
 done
 /sbin/chkconfig --add %{name}-mail
 %service %{name}-mail restart
-echo 'NOTE: daemon is now using "/etc/nginx/nginx-mail.conf" file'
+echo 'NOTE: daemon is now using "/etc/nginx/nginx-mail.conf" as config'
 
 %preun standard
 if [ "$1" = "0" ];then
@@ -523,11 +508,16 @@ fi
 %dir %{_nginxdir}/html
 %dir %{_nginxdir}/errors
 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/logrotate.d/%{name}
-%attr(640,root,root) %{_sysconfdir}/*[_-]*
-%attr(640,root,root) %{_sysconfdir}/proxy.conf
+# XXX: duplicates, don't use such glob here
+#%attr(640,root,root) %{_sysconfdir}/*[_-]*
+%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/proxy.conf
+%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/fastcgi.params
 %attr(640,root,root) %{_sysconfdir}/mime.types
-%attr(750,root,root) %dir /var/log/archive/%{name}
-%attr(750,%{name},logs) /var/log/%{name}
+%attr(640,root,root) %{_sysconfdir}/koi-utf
+%attr(640,root,root) %{_sysconfdir}/koi-win
+%attr(640,root,root) %{_sysconfdir}/win-utf
+%attr(750,nginx,logs) %dir /var/log/archive/%{name}
+%attr(750,nginx,logs) /var/log/%{name}
 %config(noreplace,missingok) %verify(not md5 mtime size) %{_nginxdir}/html/*
 %config(noreplace,missingok) %verify(not md5 mtime size) %{_nginxdir}/errors/*
 
@@ -565,8 +555,8 @@ fi
 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}-perl.conf
 %dir %{perl_vendorarch}/auto/%{name}
 %attr(755,root,root) %{perl_vendorarch}/auto/%{name}/%{name}.so
-%attr(700,root,root) %{perl_vendorarch}/auto/%{name}/%{name}.bs
-%attr(700,root,root) %{perl_vendorarch}/%{name}.pm
+%{perl_vendorarch}/auto/%{name}/%{name}.bs
+%{perl_vendorarch}/%{name}.pm
 %endif
 
 %files -n monit-rc-nginx
This page took 0.075644 seconds and 4 git commands to generate.