diff options
-rw-r--r-- | main/nginx/APKBUILD | 20 |
1 files changed, 12 insertions, 8 deletions
diff --git a/main/nginx/APKBUILD b/main/nginx/APKBUILD index d6191d8f6a..846c7ff665 100644 --- a/main/nginx/APKBUILD +++ b/main/nginx/APKBUILD @@ -19,7 +19,7 @@ pkgname=nginx # NOTE: Upgrade only to even-numbered versions (e.g. 1.14.z, 1.16.z)! # Odd-numbered versions are mainline (development) versions. pkgver=1.16.1 -pkgrel=3 +pkgrel=4 # Revision of nginx-tests to use for check(). _tests_hgrev=40e5f2a0a238 _njs_ver=0.3.5 @@ -102,13 +102,16 @@ _add_module() { local name="$1" ver="$2" url="$3" skip="$4" local dirname="${url##*/}-${ver#v}" - # we need to include source even if module is skipped for this architecture, - # due to the static checksums list. - source="$source $dirname.tar.gz::$url/archive/$ver.tar.gz" - if [ -z "$skip" ]; then - subpackages="$subpackages $pkgname-mod-$name:_module" - _extra_flags="$_extra_flags --add-dynamic-module=$srcdir/$dirname" + # Don't add new flag and source if it's already there, i.e. two or more + # modules share the same source (e.g. geoip2 that provides http-geoip2 + # and stream-geoip2). + if ! printf '%s\n' $_extra_flags | grep -qFw "$srcdir/$dirname"; then + [ "$skip" ] || _extra_flags="$_extra_flags --add-dynamic-module=$srcdir/$dirname" + # We need to include source even if module is skipped for this architecture, + # due to the static checksums list. + source="$source $dirname.tar.gz::$url/archive/$ver.tar.gz" fi + [ "$skip" ] || subpackages="$subpackages $pkgname-mod-$name:_module" } _add_module "devel-kit" "v0.3.0" "https://github.com/simpl/ngx_devel_kit" @@ -152,7 +155,8 @@ _rtmp_provides="$pkgname-rtmp" # for backward compatibility _add_module "http-vod" "1.24" "https://github.com/kaltura/nginx-vod-module" _add_module "http-geoip2" "3.2" "https://github.com/leev/ngx_http_geoip2_module" -_http_geoip2_so="ngx_http_geoip2_module.so ngx_stream_geoip2_module.so" +_add_module "stream-geoip2" "3.2" "https://github.com/leev/ngx_http_geoip2_module" +_stream_geoip2_depends="$pkgname-mod-stream" prepare() { local file; for file in $source; do |