diff --git a/srcpkgs/nginx-mod-http-geoip b/srcpkgs/nginx-mod-http-geoip new file mode 120000 index 00000000000..da70e2081bc --- /dev/null +++ b/srcpkgs/nginx-mod-http-geoip @@ -0,0 +1 @@ +nginx \ No newline at end of file diff --git a/srcpkgs/nginx-mod-http-xslt-filter b/srcpkgs/nginx-mod-http-xslt-filter new file mode 120000 index 00000000000..da70e2081bc --- /dev/null +++ b/srcpkgs/nginx-mod-http-xslt-filter @@ -0,0 +1 @@ +nginx \ No newline at end of file diff --git a/srcpkgs/nginx-mod-stream b/srcpkgs/nginx-mod-stream new file mode 120000 index 00000000000..da70e2081bc --- /dev/null +++ b/srcpkgs/nginx-mod-stream @@ -0,0 +1 @@ +nginx \ No newline at end of file diff --git a/srcpkgs/nginx-mod-stream-geoip b/srcpkgs/nginx-mod-stream-geoip new file mode 120000 index 00000000000..da70e2081bc --- /dev/null +++ b/srcpkgs/nginx-mod-stream-geoip @@ -0,0 +1 @@ +nginx \ No newline at end of file diff --git a/srcpkgs/nginx/template b/srcpkgs/nginx/template index a4324dd75df..1a6142d49fc 100644 --- a/srcpkgs/nginx/template +++ b/srcpkgs/nginx/template @@ -6,7 +6,46 @@ _tests_commit=18ac4d9e5a2a create_wrksrc=yes build_wrksrc="nginx-${version}" build_style=gnu-makefile -hostmakedepends="openssl-devel pcre2-devel $(vopt_if geoip geoip-devel)" +_cfgdir=/etc/nginx +_tmpdir=/var/lib/nginx/tmp +configure_args="--prefix=${_cfgdir} \ + --conf-path=${_cfgdir}/nginx.conf \ + --sbin-path=/usr/bin/nginx \ + --modules-path=/usr/lib/nginx/modules \ + --pid-path=/run/nginx.pid \ + --lock-path=/var/lock/nginx.lock \ + --user=nginx \ + --group=nginx \ + --http-log-path=/var/log/nginx/access.log \ + --error-log-path=/var/log/nginx/error.log \ + --http-client-body-temp-path=${tmpdir}/client-body \ + --http-proxy-temp-path=${tmpdir}/proxy \ + --http-fastcgi-temp-path=${tmpdir}/fastcgi \ + --http-scgi-temp-path=${tmpdir}/scgi \ + --http-uwsgi-temp-path=${tmpdir}/uwsgi \ + --with-compat \ + --with-file-aio \ + --with-http_dav_module \ + --with-http_gunzip_module \ + --with-http_gzip_static_module \ + --with-http_realip_module \ + --with-http_ssl_module \ + --with-http_slice_module \ + --with-http_stub_status_module \ + --with-http_sub_module \ + --with-http_v2_module \ + --with-http_xslt_module=dynamic \ + --with-http_geoip_module=dynamic \ + --with-stream=dynamic \ + --with-stream_geoip_module=dynamic \ + --with-stream_realip_module \ + --with-stream_ssl_module \ + --with-stream_ssl_preread_module \ + --with-mail \ + --with-mail_ssl_module \ + --with-pcre-jit \ + --with-threads" +hostmakedepends="geoip geoip-devel openssl-devel pcre2-devel libxslt-devel" makedepends="${hostmakedepends}" checkdepends="perl perl-IO-Socket-SSL perl-GD perl-FCGI which" short_desc="High performance web and reverse proxy server" @@ -34,64 +73,18 @@ conf_files="/etc/nginx/fastcgi.conf /etc/nginx/uwsgi_params /etc/nginx/win-utf" system_accounts="nginx" -nginx_homedir="/var/tmp/nginx" +nginx_homedir="/var/lib/nginx" make_dirs="/var/log/nginx 0750 root root - /var/tmp 1777 root root - /var/tmp/nginx 0750 nginx root" - -build_options="geoip stream slice" -desc_option_stream="Enable support for stream proxies" -desc_option_slice="Enable support for slice filters" -build_options_default="geoip stream slice" + /var/lib/nginx 1777 root root + /var/lib/nginx/tmp 0750 nginx root" do_configure() { - local cfgdir=/etc/nginx - local tmpdir=/var/tmp/nginx - if [ "$CROSS_BUILD" ]; then # fake configure run on host unset CC CPP LD CFLAGS CPPFLAGS LDFLAGS fi - local stream_modules="\ - --with-stream \ - --with-stream_realip_module \ - --with-stream_ssl_module \ - --with-stream_ssl_preread_module \ - $(vopt_if geoip --with-stream_geoip_module) \ - " - - ./configure --prefix=${cfgdir} \ - --conf-path=${cfgdir}/nginx.conf \ - --sbin-path=/usr/bin/nginx \ - --pid-path=/run/nginx.pid \ - --lock-path=/var/lock/nginx.lock \ - --user=nginx --group=nginx \ - --http-log-path=/var/log/nginx/access.log \ - --error-log-path=/var/log/nginx/error.log \ - --http-client-body-temp-path=${tmpdir}/client-body \ - --http-proxy-temp-path=${tmpdir}/proxy \ - --http-fastcgi-temp-path=${tmpdir}/fastcgi \ - --http-scgi-temp-path=${tmpdir}/scgi \ - --http-uwsgi-temp-path=${tmpdir}/uwsgi \ - --with-compat \ - --with-file-aio \ - --with-http_dav_module \ - --with-http_gunzip_module \ - --with-http_gzip_static_module \ - --with-http_realip_module \ - --with-http_ssl_module \ - --with-http_stub_status_module \ - --with-http_sub_module \ - --with-http_v2_module \ - --with-mail \ - --with-mail_ssl_module \ - --with-pcre-jit \ - --with-threads \ - $(vopt_if geoip --with-http_geoip_module) \ - $(vopt_if stream "$stream_modules") \ - $(vopt_if slice --with-http_slice_module) - + ./configure ${configure_args} } pre_build() { @@ -103,6 +96,8 @@ pre_build() { fi sed -i 's/-lcrypt/$(LDFLAGS) &/' objs/Makefile + + export LD="$CC" } do_check() { @@ -125,3 +120,35 @@ post_install() { vlicense LICENSE vsv nginx } + +nginx-mod-http-geoip_package() { + short_desc+=" - HTTP GeoIP module" + depends="${sourcepkg}>=${version}_${revision}" + pkg_install() { + vmove usr/lib/nginx/modules/ngx_http_geoip_module.so + } +} + +nginx-mod-http-xslt-filter_package() { + short_desc+=" - XSLT filter module" + depends="${sourcepkg}>=${version}_${revision}" + pkg_install() { + vmove usr/lib/nginx/modules/ngx_http_xslt_filter_module.so + } +} + +nginx-mod-stream_package() { + short_desc+=" - Stream module" + depends="${sourcepkg}>=${version}_${revision}" + pkg_install() { + vmove usr/lib/nginx/modules/ngx_stream_module.so + } +} + +nginx-mod-stream-geoip_package() { + short_desc+=" - Stream GeoIP module" + depends="${sourcepkg}>=${version}_${revision}" + pkg_install() { + vmove usr/lib/nginx/modules/ngx_stream_geoip_module.so + } +}