Accepting request 842999 from home:darix:apps
make nginx package maintenance easier by moving shared code into macros and all the shared buildrequires into requires of the nginx-source package OBS-URL: https://build.opensuse.org/request/show/842999 OBS-URL: https://build.opensuse.org/package/show/server:http/nginx?expand=0&rev=181
This commit is contained in:
parent
c99877744d
commit
b8a0749612
@ -1,3 +0,0 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:a3dcbab117a9c103bc1ea5200fc00a7b7d2af97ff7fd525f16f8ac2632e30fbf
|
||||
size 28130
|
@ -1,3 +0,0 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:87aa597400b0b5a05274ee2d23d8cb8224e12686227a0abe31d783b3a645ea37
|
||||
size 519919
|
@ -8,6 +8,22 @@ Tue Oct 27 20:23:09 UTC 2020 - Илья Индиго <ilya@ilya.pp.ua>
|
||||
* Add the "ssl_reject_handshake" directive.
|
||||
* Add the "proxy_smtp_auth" directive in mail proxy.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Fri Oct 2 04:14:33 UTC 2020 - Marcus Rueckert <mrueckert@suse.de>
|
||||
|
||||
- use the ngx_* macros from the nginx-macros package to simplify
|
||||
the spec file
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Fri Oct 2 01:58:09 UTC 2020 - Marcus Rueckert <mrueckert@suse.de>
|
||||
|
||||
- moved all the modules that support dynamic modules into their own
|
||||
modules:
|
||||
nginx-module-geoip2
|
||||
nginx-module-fancyindex
|
||||
nginx-module-headers-more
|
||||
- the rtmp module is replaced with nginx-module-http-flv
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed Sep 30 11:28:16 UTC 2020 - Илья Индиго <ilya@ilya.pp.ua>
|
||||
|
||||
|
179
nginx.spec
179
nginx.spec
@ -17,55 +17,37 @@
|
||||
|
||||
|
||||
%{!?vim_data_dir:%global vim_data_dir %{_datadir}/vim/%(readlink %{_datadir}/vim/current)}
|
||||
%define pkg_name nginx
|
||||
%define ngx_prefix %{_prefix}
|
||||
%define ngx_sbin_path %{_sbindir}/nginx
|
||||
%define ngx_module_dir %{_libdir}/nginx/modules
|
||||
%define ngx_conf_dir %{_sysconfdir}/nginx
|
||||
%define ngx_conf_path %{ngx_conf_dir}/nginx.conf
|
||||
%define ngx_log_dir %{_localstatedir}/log/nginx
|
||||
%define ngx_error_log %{ngx_log_dir}/error.log
|
||||
%define ngx_access_log %{ngx_log_dir}/access.log
|
||||
%define ngx_home %{_localstatedir}/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 ngx_doc_dir %{_docdir}/%{name}
|
||||
%define ngx_fancyindex_version 0.4.2
|
||||
%define ngx_fancyindex_module_path ngx-fancyindex-%{ngx_fancyindex_version}
|
||||
%define headers_more_nginx_version 0.33
|
||||
%define headers_more_nginx_module_path headers-more-nginx-module-%{headers_more_nginx_version}
|
||||
|
||||
%define pkg_name nginx
|
||||
|
||||
%define nginx_upstream_check_version 0.3.0
|
||||
%define nginx_upstream_check_module_path nginx_upstream_check_module-%{nginx_upstream_check_version}
|
||||
%define nginx_rtmp_version 1.2.1
|
||||
%define nginx_rtmp_module_path nginx-rtmp-module-%{nginx_rtmp_version}
|
||||
%define nginx_geoip2_version 3.3
|
||||
%define nginx_geoip2_module_path ngx_http_geoip2_module-%{nginx_geoip2_version}
|
||||
|
||||
%define src_install_dir %{_prefix}/src/%{name}
|
||||
|
||||
%if 0%{?is_opensuse}
|
||||
%bcond_without extra_modules
|
||||
%else
|
||||
%bcond_with extra_modules
|
||||
%endif
|
||||
#
|
||||
# keep in sync with ngx_conditionals in nginx-macros
|
||||
%if 0%{?suse_version} != 1315 || 0%{?is_opensuse}
|
||||
%bcond_without libatomic
|
||||
%bcond_without ngx_libatomic
|
||||
%else
|
||||
%bcond_with libatomic
|
||||
%bcond_with ngx_libatomic
|
||||
%endif
|
||||
%if 0%{?suse_version} > 1220
|
||||
%bcond_without http2
|
||||
%bcond_without pcre_jit
|
||||
%bcond_without ngx_http2
|
||||
%bcond_without ngx_pcre_jit
|
||||
%bcond_without systemd
|
||||
%else
|
||||
%bcond_with http2
|
||||
%bcond_with pcre_jit
|
||||
%bcond_with ngx_http2
|
||||
%bcond_with ngx_pcre_jit
|
||||
%bcond_with systemd
|
||||
%endif
|
||||
%bcond_with cpp_test
|
||||
%bcond_with google_perftools
|
||||
%bcond_with ngx_cpp_test
|
||||
%bcond_with ngx_google_perftools
|
||||
#
|
||||
%if %{with systemd}
|
||||
%define ngx_pid_path /run/nginx.pid
|
||||
@ -86,11 +68,7 @@ Source0: https://nginx.org/download/%{name}-%{version}.tar.gz
|
||||
Source1: nginx.init
|
||||
Source2: nginx.logrotate
|
||||
Source3: nginx.service
|
||||
Source4: https://github.com/aperezdc/ngx-fancyindex/archive/v%{ngx_fancyindex_version}/%{ngx_fancyindex_module_path}.tar.gz
|
||||
Source5: https://github.com/openresty/headers-more-nginx-module/archive/v%{headers_more_nginx_version}/%{headers_more_nginx_module_path}.tar.gz
|
||||
Source6: https://github.com/yaoweibin/nginx_upstream_check_module/archive/v%{nginx_upstream_check_version}/%{nginx_upstream_check_module_path}.tar.gz
|
||||
Source7: https://github.com/arut/nginx-rtmp-module/archive/v%{nginx_rtmp_version}/%{nginx_rtmp_module_path}.tar.gz
|
||||
Source8: https://github.com/leev/ngx_http_geoip2_module/archive/%{nginx_geoip2_version}.tar.gz#/%{nginx_geoip2_module_path}.tar.gz
|
||||
Source4: https://github.com/yaoweibin/nginx_upstream_check_module/archive/v%{nginx_upstream_check_version}/%{nginx_upstream_check_module_path}.tar.gz
|
||||
Source9: nginx.sysusers
|
||||
Source100: nginx.rpmlintrc
|
||||
Source101: https://nginx.org/download/%{name}-%{version}.tar.gz.asc
|
||||
@ -107,27 +85,28 @@ Patch3: nginx-1.6.1-default_config.patch
|
||||
Patch4: nginx-aio.patch
|
||||
# PATCH-FIX-UPSTREAM check_1.9.2+.patch
|
||||
Patch5: check_1.9.2+.patch
|
||||
# keep Buildrequires for the libraries and everything in sync with the requires in the nginx-source package
|
||||
BuildRequires: gcc-c++
|
||||
BuildRequires: gd-devel
|
||||
#
|
||||
BuildRequires: libxslt-devel
|
||||
BuildRequires: nginx-macros
|
||||
BuildRequires: openssl-devel
|
||||
BuildRequires: pcre-devel
|
||||
BuildRequires: pkgconfig
|
||||
BuildRequires: vim
|
||||
BuildRequires: zlib-devel
|
||||
BuildRequires: pkgconfig(libmaxminddb)
|
||||
%requires_eq perl
|
||||
#
|
||||
Recommends: logrotate
|
||||
Recommends: vim-plugin-nginx
|
||||
Provides: http_daemon
|
||||
Provides: httpd
|
||||
#
|
||||
%if %{with google_perftools}
|
||||
%if %{with ngx_google_perftools}
|
||||
BuildRequires: google-perftools-devel
|
||||
%endif
|
||||
#
|
||||
%if %{with libatomic}
|
||||
%if %{with ngx_libatomic}
|
||||
BuildRequires: libatomic-ops-devel
|
||||
%endif
|
||||
#
|
||||
@ -143,6 +122,11 @@ Requires(pre): %insserv_prereq
|
||||
Requires(pre): shadow
|
||||
%endif
|
||||
|
||||
Recommends: nginx-module-fancyindex
|
||||
Recommends: nginx-module-geoip2
|
||||
Recommends: nginx-module-headers-more
|
||||
Recommends: nginx-module-http-flv
|
||||
|
||||
%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.
|
||||
@ -165,18 +149,32 @@ This package holds the VIM support for nginx config files.
|
||||
Summary: The nginx source
|
||||
Group: Development/Sources
|
||||
BuildArch: noarch
|
||||
Requires: gcc-c++
|
||||
Requires: gd-devel
|
||||
Requires: libxslt-devel
|
||||
Requires: openssl-devel
|
||||
Requires: pcre-devel
|
||||
Requires: pcre-devel
|
||||
Requires: pkgconfig
|
||||
Requires: vim
|
||||
Requires: zlib-devel
|
||||
%if %{with ngx_libatomic}
|
||||
Requires: libatomic-ops-devel
|
||||
%endif
|
||||
Requires: nginx = %{version}
|
||||
%requires_ge nginx-macros
|
||||
|
||||
%description -n nginx-source
|
||||
The source of nginx [engine x] HTTP server and IMAP/POP3 proxy server.
|
||||
|
||||
%prep
|
||||
%setup -q -n %{pkg_name}-%{version} -a 4 -a 5 -a 6 -a 7 -a 8
|
||||
%setup -q -n %{pkg_name}-%{version} -a 4
|
||||
%patch0 -p1
|
||||
%patch1 -p1
|
||||
%patch2
|
||||
%patch3
|
||||
%patch4 -p1
|
||||
%if %{with extra_modules}
|
||||
%if %{with ngx_extra_modules}
|
||||
%patch5
|
||||
%endif
|
||||
|
||||
@ -192,81 +190,11 @@ sed -i 's/^\(#define NGX_LISTEN_BACKLOG \).*/\1-1/' src/os/unix/ngx_linux_config
|
||||
|
||||
%build
|
||||
# FIXME: you should use the %%configure macro
|
||||
./configure \
|
||||
--prefix=%{ngx_prefix}/ \
|
||||
--sbin-path=%{ngx_sbin_path} \
|
||||
--modules-path=%{ngx_module_dir} \
|
||||
--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 \
|
||||
--without-select_module \
|
||||
--without-poll_module \
|
||||
--with-threads \
|
||||
--with-file-aio \
|
||||
--with-ipv6 \
|
||||
--with-http_ssl_module \
|
||||
%if %{with http2}
|
||||
--with-http_v2_module \
|
||||
%endif
|
||||
--with-http_realip_module \
|
||||
--with-http_addition_module \
|
||||
--with-http_xslt_module=dynamic \
|
||||
--with-http_image_filter_module=dynamic \
|
||||
--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_slice_module \
|
||||
--with-http_stub_status_module \
|
||||
--with-http_perl_module=dynamic \
|
||||
--with-perl=%{_bindir}/perl \
|
||||
--with-mail=dynamic \
|
||||
--with-mail_ssl_module \
|
||||
--with-stream=dynamic \
|
||||
--with-stream_ssl_module \
|
||||
--with-stream_realip_module \
|
||||
--with-stream_ssl_preread_module \
|
||||
--with-pcre \
|
||||
%if %{with pcre_jit}
|
||||
--with-pcre-jit \
|
||||
%endif
|
||||
%if %{with libatomic}
|
||||
--with-libatomic \
|
||||
%endif
|
||||
%if %{with google_perftools}
|
||||
--with-google_perftools_module \
|
||||
%endif
|
||||
%if %{with cpp_test}
|
||||
--with-cpp_test_module \
|
||||
%endif
|
||||
--with-compat \
|
||||
%if %{with extra_modules}
|
||||
%ngx_configure \
|
||||
%if %{with ngx_extra_modules}
|
||||
--add-module=%{nginx_upstream_check_module_path} \
|
||||
--add-dynamic-module=%{ngx_fancyindex_module_path} \
|
||||
--add-dynamic-module=%{headers_more_nginx_module_path} \
|
||||
--add-dynamic-module=%{nginx_rtmp_module_path} \
|
||||
%endif
|
||||
--add-dynamic-module=%{nginx_geoip2_module_path} \
|
||||
%if 0%{?suse_version} > 1220
|
||||
--with-cc-opt="%{optflags} -fPIC -D_GNU_SOURCE" \
|
||||
--with-ld-opt="-Wl,-z,relro,-z,now -pie"
|
||||
%else
|
||||
--with-cc-opt="%{optflags}"
|
||||
%endif
|
||||
|
||||
%make_build
|
||||
%if %{with systemd}
|
||||
%sysusers_generate_pre %{SOURCE9} nginx
|
||||
@ -319,18 +247,9 @@ copydocs() {
|
||||
popd
|
||||
}
|
||||
|
||||
copydocs %{ngx_fancyindex_module_path} \
|
||||
template* LICENSE *.rst
|
||||
|
||||
copydocs %{headers_more_nginx_module_path} \
|
||||
README.markdown
|
||||
|
||||
copydocs %{nginx_upstream_check_module_path} \
|
||||
doc/*
|
||||
|
||||
copydocs %{nginx_rtmp_module_path} \
|
||||
AUTHORS LICENSE README.md stat.xsl
|
||||
|
||||
%post
|
||||
%if %{with systemd}
|
||||
%service_add_post nginx.service
|
||||
@ -386,19 +305,11 @@ copydocs %{nginx_rtmp_module_path} \
|
||||
%{ngx_sbin_path}
|
||||
%dir %{_libdir}/nginx/
|
||||
%dir %{ngx_module_dir}/
|
||||
%{ngx_module_dir}/ngx_http_geoip2_module.so
|
||||
%{ngx_module_dir}/ngx_http_image_filter_module.so
|
||||
%{ngx_module_dir}/ngx_http_perl_module.so
|
||||
%{ngx_module_dir}/ngx_http_xslt_filter_module.so
|
||||
%{ngx_module_dir}/ngx_mail_module.so
|
||||
%{ngx_module_dir}/ngx_stream_module.so
|
||||
%{ngx_module_dir}/ngx_stream_geoip2_module.so
|
||||
# external modules
|
||||
%if %{with extra_modules}
|
||||
%{ngx_module_dir}/ngx_http_fancyindex_module.so
|
||||
%{ngx_module_dir}/ngx_http_headers_more_filter_module.so
|
||||
%{ngx_module_dir}/ngx_rtmp_module.so
|
||||
%endif
|
||||
%{_mandir}/man3/nginx.3pm*
|
||||
/srv/www/htdocs/50x.html
|
||||
%if 0%{?suse_version} && 0%{?suse_version} < 1140
|
||||
|
@ -1,3 +0,0 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:8327150864ca267b735d550d3304030efbbd863fdddfe0a94e970f249a8827ee
|
||||
size 22047
|
@ -1,3 +0,0 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:41378438c833e313a18869d0c4a72704b4835c30acaf7fd68013ab6732ff78a7
|
||||
size 8509
|
Loading…
Reference in New Issue
Block a user