Search
j0ke.net Open Build Service
>
Projects
>
internetx
:
projects
:
http
>
nginx
> Changes
Sign Up
|
Log In
Username
Password
Cancel
Overview
Repositories
Revisions
Requests
Users
Advanced
Attributes
Meta
Changes of Revision 109
[-]
[+]
Added
nginx.spec
@@ -0,0 +1,426 @@ +%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.6 +%define rtmp %{rtmp_ext}-%{rtmp_ext_version} +%define rtmp_nover %{rtmp_ext} +%define with_rtmp_ext 1 + +%define nps_version 1.9.32.3 +%define slowfs_version 1.5 +#%define waf_version 2.8.0 +%define openssl_version 1.0.2g +%define ngxpurge_version 2.3 + +%define custoptflags "-g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -m64 -mtune=native \ + -mfpmath=sse -pipe -Wall -fexceptions -grecord-gcc-switches -fPIE -Wno-sign-compare -Wno-string-plus-int -Wno-deprecated-declarations \ + -Wno-unused-parameter -Wno-unused-const-variable -Wno-conditional-uninitialized -Wno-mismatched-tags -Wno-c++11-extensions \ + -Wno-sometimes-uninitialized -Wno-parentheses-equality -Wno-tautological-compare -Wno-self-assign -Wno-deprecated-register \ + -Wno-deprecated -Wno-invalid-source-encoding -Wno-pointer-sign -Wno-parentheses -Wno-enum-conversion" + +Name: nginx +Version: 1.9.12 +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 + +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: release-%{nps_version}-beta.zip +Source15: %{nps_version}.tar.gz +Source16: ngx_cache_purge-%{ngxpurge_version}.tar.gz + +Source100: index.html +Source101: poweredby.png +Source102: nginx-logo.png +Source103: 50x.html +Source104: 404.html +Source105: ssl-ciphersample +Source106: pagespeed.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} + + + +cd %{_builddir}/openssl-%{openssl_version} +%patch4 -p1 +./config threads shared enable-ec_nistp_64_gcc_128 -Wl,-rpath=/usr/local/ssl/lib -fPIC -DOPENSSL_PIC -DOPENSSL_THREADS -D_REENTRANT \ + -DDSO_DLFCN -DHAVE_DLFCN_H -m64 -DL_ENDIAN -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time \ + -D_FORTIFY_SOURCE=2 -Wl,-Bsymbolic-functions -Wl,-z,relro -Wall -DMD32_REG_T=int -DOPENSSL_IA32_SSE2 -DOPENSSL_BN_ASM_MONT \ + -DOPENSSL_BN_ASM_MONT5 -DOPENSSL_BN_ASM_GF2m -DSHA1_ASM -DSHA256_ASM -DSHA512_ASM -DMD5_ASM -DAES_ASM -DVPAES_ASM -DBSAES_ASM \ + -DWHIRLPOOL_ASM -DGHASH_ASM -DECP_NISTZ256_ASM + +%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-release-%{nps_version}-beta +%{__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-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_auth_request_module \ + --with-http_random_index_module \ + --with-http_secure_link_module \ + --with-http_degradation_module \ + --with-http_stub_status_module \ + --with-stream \ + --with-stream_ssl_module \ + --with-threads \ + --with-libatomic \ + --with-pcre-jit \ + --with-pcre \ + --with-debug \ + --with-ipv6 \ + --with-http_slice_module \ + --with-ld-opt="-Wl,-z,relro,-z,now -Wl,-rpath -Wl,-Bsymbolic-functions -Wl,--as-needed -fPIE" \ + --with-openssl=%{_builddir}/nginx-%{version}/openssl-%{openssl_version} \ + --with-openssl-opt=enable-ec_nistp_64_gcc_128 \ + --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 + --add-module=%{_builddir}/nginx-%{version}/ngx_pagespeed-release-%{nps_version}-beta \ + --with-threads \ +%endif +%if 0%{with_rtmp_ext} + --add-module=%{_builddir}/nginx-%{version}/%{rtmp} \ +%endif