Logoj0ke.net Open Build Service > Projects > internetx:projects:http > nginx > Changes
Sign Up | Log In

Changes of Revision 109

[-] Added nginx.spec
x
 
1
@@ -0,0 +1,426 @@
2
+%define nginx_user      nginx
3
+%define nginx_group     %{nginx_user}
4
+%define nginx_home      %{_localstatedir}/lib/nginx
5
+%define nginx_home_tmp  %{nginx_home}/tmp
6
+%define nginx_logdir    %{_localstatedir}/log/nginx
7
+%define nginx_confdir   %{_sysconfdir}/nginx
8
+%define nginx_datadir   %{_datadir}/nginx
9
+%define nginx_webroot   %{nginx_datadir}/html
10
+
11
+%define rtmp_ext                nginx-rtmp-module
12
+%define rtmp_ext_version        1.1.6
13
+%define rtmp                    %{rtmp_ext}-%{rtmp_ext_version}
14
+%define rtmp_nover              %{rtmp_ext}
15
+%define with_rtmp_ext           1
16
+
17
+%define nps_version        1.9.32.3
18
+%define slowfs_version     1.5
19
+#%define waf_version       2.8.0
20
+%define openssl_version            1.0.2g
21
+%define ngxpurge_version   2.3
22
+
23
+%define custoptflags "-g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -m64 -mtune=native \ 
24
+             -mfpmath=sse -pipe -Wall -fexceptions -grecord-gcc-switches -fPIE -Wno-sign-compare -Wno-string-plus-int -Wno-deprecated-declarations \
25
+             -Wno-unused-parameter -Wno-unused-const-variable -Wno-conditional-uninitialized -Wno-mismatched-tags -Wno-c++11-extensions \
26
+             -Wno-sometimes-uninitialized -Wno-parentheses-equality -Wno-tautological-compare -Wno-self-assign -Wno-deprecated-register \
27
+             -Wno-deprecated -Wno-invalid-source-encoding -Wno-pointer-sign -Wno-parentheses -Wno-enum-conversion"
28
+
29
+Name:           nginx
30
+Version:        1.9.12
31
+Release:        1
32
+Summary:        Robust, small and high performance http and reverse proxy server
33
+Group:          System Environment/Daemons   
34
+
35
+License:        BSD
36
+URL:            http://nginx.net/ 
37
+BuildRoot:      %{_tmppath}/%{name}-%{version}-root
38
+
39
+
40
+Provides: webserver
41
+
42
+
43
+BuildRequires:      pcre-devel
44
+BuildRequires:      zlib-devel
45
+BuildRequires:      openssl-devel
46
+BuildRequires:      perl(ExtUtils::Embed)
47
+BuildRequires:      libxml2-devel
48
+BuildRequires:      libxslt-devel
49
+BuildRequires:      gd-devel
50
+BuildRequires:     GeoIP-devel
51
+
52
+Requires:           pcre
53
+Requires:      zlib
54
+Requires:      openssl
55
+Requires:      libxml2
56
+Requires:      libxslt
57
+Requires:      gd
58
+Requires:           perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version))
59
+Requires:      GeoIP
60
+
61
+Requires(pre):      shadow-utils
62
+Requires(post):     chkconfig
63
+Requires(preun):    chkconfig, initscripts
64
+Requires(postun):   initscripts
65
+
66
+Source0:    http://sysoev.ru/nginx/nginx-%{version}.tar.gz
67
+Source1:    %{name}.init
68
+Source2:    %{name}.logrotate
69
+Source3:    virtual.conf
70
+Source4:    ssl.conf
71
+Source5:    nginx-upstream-fair.tgz
72
+Source6:    upstream-fair.conf
73
+Source7:    %{name}.sysconfig
74
+Source8:    ngx_slowfs_cache-%{slowfs_version}.tar.gz
75
+Source9:    Nginx-limit-traffic-rate-module.tar.gz
76
+Source10:   %{rtmp}.tar.gz
77
+Source11:   nginx_upstream_check_module-master.tar.gz
78
+Source12:   openssl-%{openssl_version}.tar.gz
79
+Source13:   nginx-munin.tar.gz
80
+Source14:   release-%{nps_version}-beta.zip
81
+Source15:   %{nps_version}.tar.gz
82
+Source16:   ngx_cache_purge-%{ngxpurge_version}.tar.gz
83
+
84
+Source100:  index.html
85
+Source101:  poweredby.png
86
+Source102:  nginx-logo.png
87
+Source103:  50x.html
88
+Source104:  404.html
89
+Source105:  ssl-ciphersample
90
+Source106:  pagespeed.conf
91
+
92
+Patch0:     nginx-auto-cc-gcc.patch
93
+Patch1:     nginx-conf-0.7.x.patch
94
+#Patch2:       check_1.7.5+.patch
95
+Patch3:        openssl-rc4tilt.patch
96
+Patch4:     openssl__chacha20_poly1305_draft_and_rfc_ossl102g.patch
97
+
98
+%description
99
+Nginx [engine x] is an HTTP(S) server, HTTP(S) reverse proxy and IMAP/POP3
100
+proxy server written by Igor Sysoev.
101
+
102
+Several 3rd Party Extensions added
103
+
104
+%prep
105
+%setup -q
106
+
107
+%patch0 -p0
108
+%patch1 -p0
109
+#%patch2 -p1
110
+%{__tar} zxvf %{SOURCE5}
111
+%{__tar} zxvf %{SOURCE9}
112
+%{__tar} zxvf %{SOURCE10}
113
+#%{__tar} zxvf %{SOURCE11}
114
+%{__tar} zxvf %{SOURCE12}
115
+%{__tar} zxvf %{SOURCE13}
116
+%{__tar} zxvf %{SOURCE16}
117
+
118
+
119
+
120
+cd %{_builddir}/openssl-%{openssl_version}
121
+%patch4 -p1 
122
+./config threads shared enable-ec_nistp_64_gcc_128 -Wl,-rpath=/usr/local/ssl/lib -fPIC -DOPENSSL_PIC -DOPENSSL_THREADS -D_REENTRANT \ 
123
+   -DDSO_DLFCN -DHAVE_DLFCN_H -m64 -DL_ENDIAN -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time \
124
+   -D_FORTIFY_SOURCE=2 -Wl,-Bsymbolic-functions -Wl,-z,relro -Wall -DMD32_REG_T=int -DOPENSSL_IA32_SSE2 -DOPENSSL_BN_ASM_MONT \
125
+   -DOPENSSL_BN_ASM_MONT5 -DOPENSSL_BN_ASM_GF2m -DSHA1_ASM -DSHA256_ASM -DSHA512_ASM -DMD5_ASM -DAES_ASM -DVPAES_ASM -DBSAES_ASM \
126
+   -DWHIRLPOOL_ASM -DGHASH_ASM -DECP_NISTZ256_ASM
127
+
128
+%if 0%{?rhel_version} == 700 || 0%{?centos_version} == 700
129
+
130
+cd %{_builddir}/nginx-%{version}/
131
+%{__unzip} -o %{SOURCE14}
132
+if [ $? -ne 0 ]; then
133
+  exit $?
134
+fi
135
+
136
+cd ngx_pagespeed-release-%{nps_version}-beta
137
+%{__tar} xzf %{SOURCE15}
138
+if [ $? -ne 0 ]; then
139
+  exit $?
140
+fi
141
+chmod -Rf a+rX,u+w,g-w,o-w .
142
+
143
+%endif
144
+
145
+
146
+%build
147
+export DESTDIR=%{buildroot}
148
+./configure \
149
+    --user=%{nginx_user} \
150
+    --group=%{nginx_group} \
151
+    --prefix=%{nginx_datadir} \
152
+    --sbin-path=%{_sbindir}/%{name} \
153
+    --conf-path=%{nginx_confdir}/%{name}.conf \
154
+    --error-log-path=%{nginx_logdir}/error.log \
155
+    --http-log-path=%{nginx_logdir}/access.log \
156
+    --http-client-body-temp-path=%{nginx_home_tmp}/client_body \
157
+    --http-proxy-temp-path=%{nginx_home_tmp}/proxy \
158
+    --http-fastcgi-temp-path=%{nginx_home_tmp}/fastcgi \
159
+    --pid-path=%{_localstatedir}/run/%{name}.pid \
160
+    --lock-path=%{_localstatedir}/lock/subsys/%{name} \
161
+    --with-http_ssl_module  \
162
+    --with-http_v2_module \
163
+    --with-http_realip_module \
164
+    --with-http_addition_module \
165
+    --with-http_xslt_module \
166
+    --with-http_image_filter_module \
167
+    --with-http_geoip_module \
168
+    --with-http_sub_module \
169
+    --with-http_dav_module \
170
+    --with-http_flv_module \
171
+    --with-http_mp4_module \
172
+    --with-http_gunzip_module \
173
+    --with-http_gzip_static_module \
174
+    --with-http_auth_request_module \
175
+    --with-http_random_index_module \
176
+    --with-http_secure_link_module \
177
+    --with-http_degradation_module \
178
+    --with-http_stub_status_module \
179
+    --with-stream \
180
+    --with-stream_ssl_module \
181
+    --with-threads \
182
+    --with-libatomic \
183
+    --with-pcre-jit \
184
+    --with-pcre \
185
+    --with-debug \
186
+    --with-ipv6 \
187
+    --with-http_slice_module \
188
+    --with-ld-opt="-Wl,-z,relro,-z,now -Wl,-rpath -Wl,-Bsymbolic-functions -Wl,--as-needed -fPIE" \
189
+    --with-openssl=%{_builddir}/nginx-%{version}/openssl-%{openssl_version} \
190
+    --with-openssl-opt=enable-ec_nistp_64_gcc_128 \
191
+    --with-file-aio \
192
+    --add-module=%{_builddir}/nginx-%{version}/Nginx-limit-traffic-rate-module \
193
+    --add-module=%{_builddir}/nginx-%{version}/ngx_cache_purge-2.3 \
194
+%if 0%{?rhel_version} == 700 || 0%{?centos_version} == 700
195
+    --add-module=%{_builddir}/nginx-%{version}/ngx_pagespeed-release-%{nps_version}-beta \
196
+    --with-threads \
197
+%endif
198
+%if 0%{with_rtmp_ext}
199
+    --add-module=%{_builddir}/nginx-%{version}/%{rtmp} \
200
+%endif
201