Search
j0ke.net Open Build Service
>
Projects
>
home:kries
>
proceed-nginx
> Changes
Sign Up
|
Log In
Username
Password
Cancel
Overview
Repositories
Revisions
Requests
Users
Advanced
Attributes
Meta
Changes of Revision 28
[-]
[+]
Added
nginx.spec
@@ -0,0 +1,315 @@ +%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.0f +%define ngxpurge_version 2.3 + +%define with_ldap_auth 0 + +Name: nginx +Version: 1.13.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 +Source14: ngx_pagespeed-%{nps_version}.zip +Source15: %{psol_version}.tar.gz +Source16: ngx_cache_purge-%{ngxpurge_version}.tar.gz +Source17: naxsi-0.55.3.tar.gz +Source18: changelog +Source19: nginx-auth-ldap.tar.gz + +Source100: index.html +Source101: poweredby.png +Source102: nginx-logo.png +Source103: 50x.html +Source104: 404.html +Source105: ssl-ciphersample +Source106: pagespeed.conf +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} + +cd openssl-%{openssl_version} +#%patch4 -p1 +./config + +%if 0%{?rhel_version} == 700 || 0%{?centos_version} == 700 + +cd %{_builddir}/nginx-%{version}/ +%{__unzip} -o %{SOURCE14} +if [ $? -ne 0 ]; then + exit $? +fi + +cd ngx_pagespeed-%{nps_version} +%{__tar} xzf %{SOURCE15} +if [ $? -ne 0 ]; then + exit $? +fi +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-threads \ + --with-libatomic \ + --with-pcre-jit \ + --with-pcre \ + --with-ipv6 \ + --with-http_slice_module \ + --with-stream_ssl_preread_module \ + --with-http_sub_module \ +%if 0%{?with_ldap_auth} == 1 + --add-module=%{_builddir}/nginx-%{version}/nginx-auth-ldap \ +%endif + --add-module=%{_builddir}/nginx-%{version}/naxsi-0.55.3/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" \