Search
j0ke.net Open Build Service
>
Projects
>
server:http
:
nginx
:
suse
>
nginx-1.9
> nginx-1.9.spec
Sign Up
|
Log In
Username
Password
Cancel
Overview
Repositories
Revisions
Requests
Users
Advanced
Attributes
Meta
File nginx-1.9.spec of Package nginx-1.9
# # spec file for package nginx-1.9 # # Copyright (c) 2011 SUSE LINUX Products GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed # upon. The license for this file, and modifications and additions to the # file, is the same license as for the pristine package itself (unless the # license for the pristine package is not an Open Source License, in which # case the license is the MIT License). An "Open Source License" is a # license that conforms to the Open Source Definition (Version 1.9) # published by the Open Source Initiative. # Please submit bugfixes or comments via http://bugs.opensuse.org/ # ## %define modsec_name modsecurity-apache %define modsec_name modsecurity %define modsec_version 2.9.0 ## %define modsec %{modsec_name}_%{modsec_version} %define modsec %{modsec_name}-%{modsec_version} %define ajp_name yaoweibin-nginx_ajp_module %define ajp_version 0.3.0 #%define ajp_verhash df34c09 %define ajp %{ajp_name}-v%{ajp_version} %define ajp_nover nginx_ajp_module-%{ajp_version} %define with_ajp 1 %define upstream_fair gnosek-nginx-upstream-fair %define upstream_fair_hash a18b409 %define with_upstream_fair 1 %define traffic_rate bigplum-Nginx-limit-traffic-rate-module %define traffic_rate_hash c0c90f5 %define with_traffic_rate 1 %define dav_ext arut-nginx-dav-ext-module %define dav_ext_version v0.0.2-2 %define dav_ext_hash 54cebc1 %define dav %{dav_ext}-%{dav_ext_version}-g%{dav_ext_hash} %define dav_nover %{dav_ext}-%{dav_ext_hash} %define with_dav_ext 0 %define rtmp_ext nginx-rtmp-module %define rtmp_ext_version 1.1.7 %define rtmp %{rtmp_ext}-%{rtmp_ext_version} %define rtmp_nover %{rtmp_ext} %define with_rtmp_ext 1 %define openssl_ext openssl %define openssl_ext_version 1.0.2j %define openssl %{openssl_ext}-%{openssl_ext_version} %define with_openssl_ext 1 Name: nginx-1.9 Version: 1.9.15 Release: 1 %define pkg_name nginx # %define ngx_prefix %{_prefix} %define ngx_sbindir %{_sbindir}/nginx %define ngx_conf_dir %{_sysconfdir}/nginx %define ngx_conf_path %{ngx_conf_dir}/nginx.conf %define ngx_log_dir /var/log/nginx %define ngx_error_log %{ngx_log_dir}/error.log %define ngx_access_log %{ngx_log_dir}/access.log %define ngx_pid_path /var/run/nginx.pid %define ngx_lock_path /var/run/nginx.lock %define ngx_home /var/lib/nginx %define ngx_tmp_http %{ngx_home}/tmp/ %define ngx_tmp_proxy %{ngx_home}/proxy/ %define ngx_tmp_fcgi %{ngx_home}/fastcgi/ %define ngx_tmp_scgi %{ngx_home}/scgi/ %define ngx_tmp_uwsgi %{ngx_home}/uwsgi/ %define ngx_user_group nginx %define with_cpp_test 0 %define with_google_perftools 0 %if 0%{?suse_version} >= 1110 && 0%{?sles_version} != 10 %define with_passenger 0 %define with_libatomic 1 %endif %if 0%{?sles_version} == 10 %define with_modsec 0 %else %define with_modsec 1 %endif # Group: Productivity/Networking/Web/Proxy License: BSD-2-Clause # BuildRoot: %{_tmppath}/%{name}-%{version}-build %if 0%{?with_cpp_test} BuildRequires: gcc-c++ %endif BuildRequires: gd-devel BuildRequires: GeoIP-devel %if 0%{?with_google_perftools} BuildRequires: google-perftools-devel %endif %if 0%{?with_libatomic} BuildRequires: libatomic-ops-devel %endif BuildRequires: libxslt-devel BuildRequires: openssl-devel BuildRequires: pcre-devel BuildRequires: pkgconfig BuildRequires: zlib-devel %if 0%{?with_passenger} BuildRequires: ruby BuildRequires: ruby-devel BuildRequires: rubygem-passenger-devel-static # workaround for obs scheduler: %if 0%{?suse_version} >= 1210 BuildRequires: rubygem-rack-1_1 %endif Recommends: packageand(rubygem-passenger:rubygem-passenger-nginx) %endif %if 0%{?suse_version} >= 1210 BuildRequires: systemd %{?systemd_requires} %define has_systemd 1 %endif Recommends: logrotate %if 0%{?with_modsec} BuildRequires: libapr-util1-devel libapr1-devel apache2-devel apache2-prefork openldap2-devel BuildRequires: libxml2-devel libtool curl-devel BuildRequires: curl %endif PreReq: %fillup_prereq PreReq: %insserv_prereq PreReq: pwdutils Provides: nginx = %{version}-%{release} # Conflicts: nginx-0.5 nginx-0.6 nginx-0.7 nginx-0.8 nginx-0.9 nginx-1.0 nginx-1.1 nginx-1.2 nginx-1.3 nginx-1.4 nginx-1.5 nginx-1.6 nginx-1.7 nginx-1.8 %requires_eq perl # Url: http://nginx.org/ Source: http://nginx.org/download/nginx-%{version}.tar.bz2 Source1: nginx.init Source2: nginx.logrotate Source3: %{modsec}.tar.bz2 Source4: %{ajp}.tar.bz2 Source5: %{upstream_fair}-%{upstream_fair_hash}.tar.bz2 Source6: %{traffic_rate}-%{traffic_rate_hash}.tar.bz2 Source7: %{dav}.tar.bz2 Source8: %{rtmp}.tar.bz2 Source9: %{openssl}.tar.bz2 Source20: nginx.service # PATCH-FIX-UPSTREAM nginx-0.4.0-no_Werror.patch Patch: nginx-0.4.0-no_Werror.patch # PATCH-FIX-UPSTREAM nginx-0.6.38-html.patch #Patch2: nginx-1.0.12-html.patch Patch2: nginx-1.9.13-html.patch # PATCH-FIX-UPSTREAM nginx-0.4.0-perl_vendor_install.patch Patch3: nginx-1.2.4-perl_vendor_install.patch # PATCH-FIX-UPSTREAM nginx-1.0.4_default_config.patch Patch4: nginx-1.0.4_default_config.patch # # Patch for nginx 1.7.9+ ajp module Patch5: nginx-1.7.9+_ajp.patch # modsec config patch # Patch5: modsecurity-apache_2.7.4_config.patch Summary: A HTTP server and IMAP/POP3 proxy server %description nginx [engine x] is a HTTP server and IMAP/POP3 proxy server written by Igor Sysoev. It has been running on many heavily loaded Russian sites for more than two years. Author: ------- Igor Sysoev %prep %setup -n %{pkg_name}-%{version} -a 3 -a 4 -a 5 -a 6 -a 7 -a 8 -a 9 %patch %patch3 %patch4 %patch2 %if 0%{?with_ajp} cd %{ajp_nover} %patch5 -p1 cd ../ %endif perl -pi -e 's|\r\n|\n|g' contrib/geo2nginx.pl rm conf/nginx.conf.orig %build %if 0%{?with_modsec} cd %{modsec} ./autogen.sh ./configure --enable-standalone-module %__make cd .. %endif %if 0%{?with_passenger} #ln -s %{_libdir}/ruby/gems/%{rb_ver}/gems/passenger-* passenger cp -r %{_libdir}/ruby/gems/%{rb_ver}/gems/passenger-* passenger %endif ./configure \ --prefix=%{ngx_prefix}/ \ --sbin-path=%{ngx_sbindir} \ --conf-path=%{ngx_conf_path} \ --error-log-path=%{ngx_error_log} \ --http-log-path=%{ngx_access_log} \ --pid-path=%{ngx_pid_path} \ --lock-path=%{ngx_lock_path} \ --http-client-body-temp-path=%{ngx_tmp_http} \ --http-proxy-temp-path=%{ngx_tmp_proxy} \ --http-fastcgi-temp-path=%{ngx_tmp_fcgi} \ --http-uwsgi-temp-path=%{ngx_tmp_uwsgi} \ --http-scgi-temp-path=%{ngx_tmp_scgi} \ --user=nginx --group=nginx \ --with-select_module \ --with-poll_module \ --with-ipv6 \ %if 0%{?with_openssl_ext} --with-openssl=%{openssl} \ %endif %if 0%{?suse_version} > 1110 --with-file-aio \ %endif --with-threads \ --with-http_ssl_module \ --with-http_v2_module \ --with-http_realip_module \ --with-http_addition_module \ --with-http_xslt_module \ --with-http_image_filter_module \ --with-http_geoip_module \ --with-http_sub_module \ --with-http_dav_module \ --with-http_flv_module \ --with-http_mp4_module \ --with-http_gunzip_module \ --with-http_gzip_static_module \ --with-http_random_index_module \ --with-http_secure_link_module \ --with-http_degradation_module \ --with-http_stub_status_module \ --with-http_perl_module \ --with-http_slice_module \ --with-stream \ --with-stream_ssl_module \ --with-perl=%{_bindir}/perl \ --with-mail \ --with-mail_ssl_module \ --with-pcre \ %if 0%{?with_libatomic} --with-libatomic \ %endif %if 0%{?with_passenger} --add-module=passenger/ext/nginx \ %endif %if 0%{?with_modsec} --add-module=%{modsec}/nginx/modsecurity \ %endif %if 0%{?with_ajp} --add-module=%{ajp_nover} \ %endif %if 0%{?with_upstream_fair} --add-module=%{upstream_fair}-%{upstream_fair_hash} \ %endif %if 0%{?with_traffic_rate} --add-module=%{traffic_rate}-%{traffic_rate_hash} \ %endif %if 0%{?with_dav_ext} --add-module=%{dav_nover} \ %endif %if 0%{?with_rtmp_ext} --add-module=%{rtmp} \ %endif %if 0%{?with_google_perftools} --with-google_perftools_module \ %endif %if 0%{?with_cpp_test} --with-cpp_test_module \ %endif --with-md5=/usr \ --with-sha1=/usr \ %if 0%{?suse_version} > 1000 || 0%{?fedora_version} > 4 || 0%{?mandriva_version} > 2006 --with-cc-opt="%{optflags} -fstack-protector" %else --with-cc-opt="%{optflags}" %endif %{__make} %install %makeinstall %perl_process_packlist # %{__install} -d -m 0750 %{buildroot}%{ngx_home}/{,tmp,proxy,fastcgi,scgi,uwsgi} # %{__install} -D -m 0755 %{S:1} %{buildroot}%{_sysconfdir}/init.d/%{pkg_name} %{__install} -D -m 0644 %{S:2} %{buildroot}%{_sysconfdir}/logrotate.d/%{name} %if 0%{?has_systemd} %{__install} -D -m 0644 %{S:20} %{buildroot}%{_unitdir}/nginx.service %endif %{__ln_s} -f %{_sysconfdir}/init.d/%{pkg_name} %{buildroot}%{_sbindir}/rc%{pkg_name} %{__rm} %{buildroot}/srv/www/htdocs/index.html %post %fillup_and_insserv %{pkg_name} %if 0%{?has_systemd} %service_add_post nginx.service %endif %preun %stop_on_removal %{pkg_name} %if 0%{?has_systemd} %service_del_preun nginx.service %endif %postun %restart_on_update %{pkg_name} %{insserv_cleanup} %if 0%{?has_systemd} %service_del_postun nginx.service %endif %clean %{__rm} -rf %{buildroot} %pre /usr/sbin/groupadd -r %{ngx_user_group} &>/dev/null ||: /usr/sbin/useradd -g %{ngx_user_group} -s /bin/false -r -c "user for %{ngx_user_group}" -d %{ngx_home} %{ngx_user_group} &>/dev/null ||: %if 0%{?has_systemd} %service_add_pre nginx.service %endif %files %defattr(-,root,root,-) %dir %{ngx_conf_dir}/ %config(noreplace) %{ngx_conf_dir}/koi-utf %config(noreplace) %{ngx_conf_dir}/koi-win %config(noreplace) %{ngx_conf_dir}/fastcgi_params %config(noreplace) %{ngx_conf_dir}/fastcgi_params.default %config(noreplace) %{ngx_conf_dir}/mime.types %config(noreplace) %{ngx_conf_dir}/mime.types.default %config(noreplace) %{ngx_conf_dir}/nginx.conf %config(noreplace) %{ngx_conf_dir}/nginx.conf.default %config(noreplace) %{ngx_conf_dir}/fastcgi.conf %config(noreplace) %{ngx_conf_dir}/fastcgi.conf.default %config(noreplace) %{ngx_conf_dir}/win-utf %config(noreplace) %{ngx_conf_dir}/scgi_params %config(noreplace) %{ngx_conf_dir}/scgi_params.default %config(noreplace) %{ngx_conf_dir}/uwsgi_params %config(noreplace) %{ngx_conf_dir}/uwsgi_params.default %config(noreplace) %{_sysconfdir}/logrotate.d/%{name} %{perl_vendorarch}/auto/nginx/ %{perl_vendorarch}/nginx.pm %{ngx_sbindir} %{_mandir}/man3/nginx.3pm* /srv/www/htdocs/50x.html %if 0%{?suse_version} && 0%{?suse_version} < 1140 %{_localstatedir}/adm/perl-modules/%{name} %endif %{_sysconfdir}/init.d/%{pkg_name} %{_sbindir}/rc%{pkg_name} %dir %attr(750,%{ngx_user_group},%{ngx_user_group}) /var/log/nginx/ %dir %attr(750,%{ngx_user_group},%{ngx_user_group}) %{ngx_home}/ %dir %attr(750,%{ngx_user_group},%{ngx_user_group}) %{ngx_tmp_http} %dir %attr(750,%{ngx_user_group},%{ngx_user_group}) %{ngx_tmp_proxy} %dir %attr(750,%{ngx_user_group},%{ngx_user_group}) %{ngx_tmp_fcgi} %dir %attr(750,%{ngx_user_group},%{ngx_user_group}) %{ngx_tmp_scgi} %dir %attr(750,%{ngx_user_group},%{ngx_user_group}) %{ngx_tmp_uwsgi} %doc CHANGES* LICENSE README %doc conf/ contrib/ %if 0%{?has_systemd} %{_unitdir}/nginx.service %endif %changelog