Search
j0ke.net Open Build Service
>
Projects
>
internetx
:
projects
:
http
>
nginx
> nginx.spec
Sign Up
|
Log In
Username
Password
Cancel
Overview
Repositories
Revisions
Requests
Users
Advanced
Attributes
Meta
File nginx.spec of Package nginx
%define nginx_user nginx %define nginx_group %{nginx_user} %define nginx_home %{_localstatedir}/lib/nginx %define nginx_home_tmp %{nginx_home}/tmp %define nginx_logdir %{_localstatedir}/log/nginx %define nginx_confdir %{_sysconfdir}/nginx %define nginx_datadir %{_datadir}/nginx %define nginx_webroot %{nginx_datadir}/html %define rtmp_ext nginx-rtmp-module %define rtmp_ext_version 1.1.15 %define rtmp %{rtmp_ext}-%{rtmp_ext_version} %define rtmp_nover %{rtmp_ext} %define with_rtmp_ext 0 %define nps_version latest-testing %define psol_version 1.12.34.2-x64 %define slowfs_version 1.5 #%define waf_version 2.8.0 %define openssl_version 1.1.1b %define ngxpurge_version 2.3 %define ajpmodule_version 0.3 %define with_ldap_auth 0 %define with_ajp_module 1 %define with_pagespeed 0 Name: nginx Version: 1.16.1 Release: 1 Summary: Robust, small and high performance http and reverse proxy server Group: System Environment/Daemons License: BSD URL: http://nginx.net/ BuildRoot: %{_tmppath}/%{name}-%{version}-root Provides: webserver BuildRequires: pcre-devel BuildRequires: zlib-devel BuildRequires: openssl-devel BuildRequires: perl(ExtUtils::Embed) BuildRequires: libxml2-devel BuildRequires: libxslt-devel BuildRequires: gd-devel BuildRequires: GeoIP-devel BuildRequires: libatomic_ops-devel %if 0%{?with_ldap_auth} == 1 BuildRequires: openldap-devel %endif Requires: pcre Requires: zlib Requires: openssl Requires: libxml2 Requires: libxslt Requires: gd Requires: perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version)) Requires: GeoIP Requires(pre): shadow-utils Requires(post): chkconfig Requires(preun): chkconfig, initscripts Requires(postun): initscripts Source0: http://sysoev.ru/nginx/nginx-%{version}.tar.gz Source1: %{name}.init Source2: %{name}.logrotate Source3: virtual.conf Source4: ssl.conf Source5: nginx-upstream-fair.tgz Source6: upstream-fair.conf Source7: %{name}.sysconfig Source8: ngx_slowfs_cache-%{slowfs_version}.tar.gz Source9: Nginx-limit-traffic-rate-module.tar.gz Source10: %{rtmp}.tar.gz Source11: nginx_upstream_check_module-master.tar.gz Source12: openssl-%{openssl_version}.tar.gz Source13: nginx-munin.tar.gz %if 0%{?with_pagespeed} == 1 Source14: ngx_pagespeed-%{nps_version}.zip Source15: %{psol_version}.tar.gz %endif Source16: ngx_cache_purge-%{ngxpurge_version}.tar.gz Source17: naxsi-git.tar.gz Source18: changelog Source19: nginx-auth-ldap.tar.gz Source20: nginx-ajp-module-%{ajpmodule_version}.tar.gz Source100: index.html Source101: poweredby.png Source102: nginx-logo.png Source103: 50x.html Source104: 404.html Source105: ssl-ciphersample %if 0%{?with_pagespeed} == 1 Source106: pagespeed.conf %endif Source108: blockips.conf Patch0: nginx-auto-cc-gcc.patch Patch1: nginx-conf-0.7.x.patch #Patch2: check_1.7.5+.patch Patch3: openssl-rc4tilt.patch #Patch4: openssl__chacha20_poly1305_draft_and_rfc_ossl102g.patch %description Nginx [engine x] is an HTTP(S) server, HTTP(S) reverse proxy and IMAP/POP3 proxy server written by Igor Sysoev. Several 3rd Party Extensions added %prep %setup -q %patch0 -p0 %patch1 -p0 #%patch2 -p1 %{__tar} zxvf %{SOURCE5} %{__tar} zxvf %{SOURCE9} %{__tar} zxvf %{SOURCE10} #%{__tar} zxvf %{SOURCE11} %{__tar} zxvf %{SOURCE12} %{__tar} zxvf %{SOURCE13} %{__tar} zxvf %{SOURCE16} %{__tar} zxvf %{SOURCE17} %{__tar} zxvf %{SOURCE19} %{__tar} zxvf %{SOURCE20} cd openssl-%{openssl_version} #%patch4 -p1 ./config %if 0%{?rhel_version} == 700 || 0%{?centos_version} == 700 %if 0%{?with_pagespeed} == 1 cd %{_builddir}/nginx-%{version}/ %{__unzip} -o %{SOURCE14} if [ $? -ne 0 ]; then exit $? fi %{__tar} xzf %{SOURCE15} if [ $? -ne 0 ]; then exit $? fi %endif chmod -Rf a+rX,u+w,g-w,o-w . %endif %build export DESTDIR=%{buildroot} ./configure \ --user=%{nginx_user} \ --group=%{nginx_group} \ --prefix=%{nginx_datadir} \ --sbin-path=%{_sbindir}/%{name} \ --conf-path=%{nginx_confdir}/%{name}.conf \ --error-log-path=%{nginx_logdir}/error.log \ --http-log-path=%{nginx_logdir}/access.log \ --http-client-body-temp-path=%{nginx_home_tmp}/client_body \ --http-proxy-temp-path=%{nginx_home_tmp}/proxy \ --http-fastcgi-temp-path=%{nginx_home_tmp}/fastcgi \ --pid-path=%{_localstatedir}/run/%{name}.pid \ --lock-path=%{_localstatedir}/lock/subsys/%{name} \ --with-poll_module \ --with-http_ssl_module \ --with-http_v2_module \ --with-http_realip_module \ --with-http_addition_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_auth_request_module \ --with-http_random_index_module \ --with-http_secure_link_module \ --with-http_degradation_module \ --with-http_stub_status_module \ --with-http_xslt_module \ --with-http_image_filter_module \ --with-http_geoip_module \ --with-http_perl_module \ --with-stream \ --with-stream_ssl_module \ --with-stream_realip_module \ --with-stream_geoip_module \ --with-stream_ssl_preread_module \ --with-threads \ --with-libatomic \ --with-pcre-jit \ --with-pcre \ --with-ipv6 \ --with-http_slice_module \ --with-stream_ssl_preread_module \ %if 0%{?with_ldap_auth} == 1 --add-module=%{_builddir}/nginx-%{version}/nginx-auth-ldap \ %endif --add-module=%{_builddir}/nginx-%{version}/naxsi-git/naxsi_src \ %if 0%{?rhel_version} == 700 || 0%{?centos_version} == 700 --with-ld-opt="-Wl,-z,relro,-z,now -Wl,-rpath -Wl,-Bsymbolic-functions -Wl,--as-needed -fPIE" \ --with-cc-opt="-g -Ofast -march=native -ffast-math -fstack-protector-strong -Wformat -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2" \ %endif --with-openssl=%{_builddir}/nginx-%{version}/openssl-%{openssl_version} \ %if 0%{?rhel_version} == 700 || 0%{?centos_version} == 700 --with-openssl-opt=enable-ec_nistp_64_gcc_128 \ %endif --with-file-aio \ --add-module=%{_builddir}/nginx-%{version}/Nginx-limit-traffic-rate-module \ --add-module=%{_builddir}/nginx-%{version}/ngx_cache_purge-2.3 \ %if 0%{?rhel_version} == 700 || 0%{?centos_version} == 700 %if 0%{?with_pagespeed} == 1 --add-module=%{_builddir}/nginx-%{version}/ngx_pagespeed-%{nps_version} \ --with-threads \ %endif %endif %if 0%{with_rtmp_ext} --add-module=%{_builddir}/nginx-%{version}/%{rtmp} \ %endif %if 0%{with_ajp_module} --add-module=%{_builddir}/nginx-%{version}/nginx-ajp-module-%{ajpmodule_version} \ %endif --with-mail \ --with-mail_ssl_module make mv nginx-upstream-fair/README nginx-upstream-fair/README.nginx-upstream-fair %install rm -rf %{buildroot} make install DESTDIR=%{buildroot} INSTALLDIRS=vendor find %{buildroot} -type f -name .packlist -exec rm -f {} \; find %{buildroot} -type f -name perllocal.pod -exec rm -f {} \; find %{buildroot} -type f -empty -exec rm -f {} \; find %{buildroot} -type f -exec chmod 0644 {} \; find %{buildroot} -type f -name '*.so' -exec chmod 0755 {} \; chmod 0755 %{buildroot}%{_sbindir}/nginx %{__install} -p -D -m 0755 %{SOURCE1} %{buildroot}%{_initrddir}/%{name} %{__install} -p -D -m 0644 %{SOURCE2} %{buildroot}%{_sysconfdir}/logrotate.d/%{name} %{__install} -p -D -m 0644 %{SOURCE7} %{buildroot}%{_sysconfdir}/sysconfig/%{name} %{__install} -p -d -m 0755 %{buildroot}%{nginx_confdir}/conf.d %{__install} -p -m 0644 %{SOURCE3} %{SOURCE4} %{SOURCE6} %{SOURCE108} %{buildroot}%{nginx_confdir}/conf.d %if 0%{?rhel_version} == 700 || 0%{?centos_version} == 700 %if 0%{?with_pagespeed} == 1 %{__install} -p -m 0644 %{SOURCE106} %{buildroot}%{nginx_confdir}/conf.d %endif %endif %{__install} -p -m 0644 %{SOURCE105} %{buildroot}%{nginx_confdir} %{__install} -p -d -m 0755 %{buildroot}%{nginx_home_tmp} %{__install} -p -d -m 0755 %{buildroot}%{nginx_logdir} %{__install} -p -d -m 0755 %{buildroot}%{nginx_webroot} %{__install} -p -m 0644 %{SOURCE100} %{SOURCE101} %{SOURCE102} %{SOURCE103} %{SOURCE104} %{buildroot}%{nginx_webroot} # convert to UTF-8 all files that give warnings. for textfile in CHANGES do mv $textfile $textfile.old iconv --from-code ISO8859-1 --to-code UTF-8 --output $textfile $textfile.old rm -f $textfile.old done %clean rm -rf %{buildroot} %pre %{_sbindir}/useradd -c "Nginx user" -s /bin/false -r -d %{nginx_home} %{nginx_user} 2>/dev/null || : %post /sbin/chkconfig --add %{name} %preun if [ $1 = 0 ]; then /sbin/service %{name} stop >/dev/null 2>&1 /sbin/chkconfig --del %{name} fi %postun if [ $1 -ge 1 ]; then /sbin/service %{name} condrestart > /dev/null 2>&1 || : fi %files %defattr(-,root,root,-) %doc LICENSE CHANGES README nginx-upstream-fair/README.nginx-upstream-fair %{nginx_datadir}/ %{_sbindir}/%{name} %{_initrddir}/%{name} %dir %{nginx_confdir} %dir %{nginx_confdir}/conf.d %config(noreplace) %{nginx_confdir}/conf.d/*.conf %config(noreplace) %{nginx_confdir}/win-utf %config(noreplace) %{nginx_confdir}/%{name}.conf.default %config(noreplace) %{nginx_confdir}/mime.types.default %config(noreplace) %{nginx_confdir}/fastcgi_params %config(noreplace) %{nginx_confdir}/fastcgi_params.default %config(noreplace) %{nginx_confdir}/fastcgi.conf %config(noreplace) %{nginx_confdir}/fastcgi.conf.default %config(noreplace) %{nginx_confdir}/scgi_params %config(noreplace) %{nginx_confdir}/scgi_params.default %config(noreplace) %{nginx_confdir}/uwsgi_params %config(noreplace) %{nginx_confdir}/uwsgi_params.default %config(noreplace) %{nginx_confdir}/koi-win %config(noreplace) %{nginx_confdir}/koi-utf %config(noreplace) %{nginx_confdir}/%{name}.conf %config(noreplace) %{nginx_confdir}/mime.types %config(noreplace) %{_sysconfdir}/logrotate.d/%{name} %config(noreplace) %{_sysconfdir}/sysconfig/%{name} %config %{nginx_confdir}/ssl-ciphersample %dir %{perl_vendorarch}/auto/%{name} %{perl_vendorarch}/%{name}.pm %{perl_vendorarch}/auto/%{name}/%{name}.so %{_mandir}/man3/%{name}.3pm.gz %attr(-,%{nginx_user},%{nginx_group}) %dir %{nginx_home} %attr(-,%{nginx_user},%{nginx_group}) %dir %{nginx_home_tmp} %attr(-,%{nginx_user},%{nginx_group}) %dir %{nginx_logdir} %changelog