From 119da9598d5867846700dec7bae709633d39d0a8 Mon Sep 17 00:00:00 2001 From: AluminumTank Date: Thu, 15 Apr 2021 20:51:13 -0400 Subject: [PATCH 1/2] New package: ngx_headers_more-0.33 --- srcpkgs/ngx_headers_more/INSTALL.msg | 4 +++ srcpkgs/ngx_headers_more/template | 42 ++++++++++++++++++++++++++++ 2 files changed, 46 insertions(+) create mode 100644 srcpkgs/ngx_headers_more/INSTALL.msg create mode 100644 srcpkgs/ngx_headers_more/template diff --git a/srcpkgs/ngx_headers_more/INSTALL.msg b/srcpkgs/ngx_headers_more/INSTALL.msg new file mode 100644 index 000000000000..310e61ebaba6 --- /dev/null +++ b/srcpkgs/ngx_headers_more/INSTALL.msg @@ -0,0 +1,4 @@ +Dynamic modules are loaded into NGINX with the `load_module` directive. Place +the following line at the top of /etc/nginx/nginx.conf: + +load_module "/usr/lib/nginx/ngx_http_headers_more_filter_module.so" diff --git a/srcpkgs/ngx_headers_more/template b/srcpkgs/ngx_headers_more/template new file mode 100644 index 000000000000..515768cbce92 --- /dev/null +++ b/srcpkgs/ngx_headers_more/template @@ -0,0 +1,42 @@ +# Template file for 'ngx_headers_more' +pkgname=ngx_headers_more +version=0.33 +revision=1 +_nginx_version=1.18.0 +wrksrc=nginx-${_nginx_version} +build_style=gnu-makefile +make_build_args="modules" +hostmakedepends="openssl-devel pcre-devel" +makedepends="${hostmakedepends}" +short_desc="Nginx module to set and clear input and output headers" +maintainer="Joel Beckmeyer " +license="BSD-2-Clause" +homepage="https://github.com/openresty/headers-more-nginx-module" +distfiles="https://nginx.org/download/nginx-${_nginx_version}.tar.gz +https://github.com/openresty/headers-more-nginx-module/archive/v${version}.tar.gz" +checksum="4c373e7ab5bf91d34a4f11a0c9496561061ba5eee6020db272a17a7228d35f99 +a3dcbab117a9c103bc1ea5200fc00a7b7d2af97ff7fd525f16f8ac2632e30fbf" + +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 + + ./configure --with-compat \ + --add-dynamic-module=../headers-more-nginx-module-${version} +} + +pre_build() { + sed -i 's/-lcrypt/$(LDFLAGS) &/' objs/Makefile +} + +do_install() { + vmkdir usr/lib/nginx + vinstall objs/ngx_http_headers_more_filter_module.so 644 usr/lib/nginx + + vlicense LICENSE +} From 7eb1c5e921ee7fbc14a0a281b7dce315c5eab445 Mon Sep 17 00:00:00 2001 From: AluminumTank Date: Fri, 16 Apr 2021 17:15:02 -0400 Subject: [PATCH 2/2] [WIP] New package: ngx_brotli-1.0.0rc --- srcpkgs/ngx_brotli/INSTALL.msg | 5 +++++ srcpkgs/ngx_brotli/template | 39 ++++++++++++++++++++++++++++++++++ 2 files changed, 44 insertions(+) create mode 100644 srcpkgs/ngx_brotli/INSTALL.msg create mode 100644 srcpkgs/ngx_brotli/template diff --git a/srcpkgs/ngx_brotli/INSTALL.msg b/srcpkgs/ngx_brotli/INSTALL.msg new file mode 100644 index 000000000000..868789a1f864 --- /dev/null +++ b/srcpkgs/ngx_brotli/INSTALL.msg @@ -0,0 +1,5 @@ +Dynamic modules are loaded into NGINX with the `load_module` directive. Place +the following lines at the top of /etc/nginx/nginx.conf: + +load_module /usr/lib/nginx/ngx_http_brotli_filter_module.so; +load_module /usr/lib/nginx/ngx_http_brotli_static_module.so; diff --git a/srcpkgs/ngx_brotli/template b/srcpkgs/ngx_brotli/template new file mode 100644 index 000000000000..ef8b11fc73ab --- /dev/null +++ b/srcpkgs/ngx_brotli/template @@ -0,0 +1,39 @@ +# Template file for 'ngx_brotli' +pkgname=ngx_brotli +version=1.0.0rc +revision=1 +_nginx_version=1.18.0 +wrksrc=nginx-${_nginx_version} +build_style=gnu-makefile +make_build_args="modules" +makedepends="pcre-devel brotli-devel" +short_desc="Nginx module for Brotli compression" +maintainer="Joel Beckmeyer " +license="BSD-2-Clause" +homepage="https://github.com/google/ngx_brotli" +distfiles="https://nginx.org/download/nginx-${_nginx_version}.tar.gz +https://github.com/google/ngx_brotli/archive/v${version}.tar.gz" +checksum="4c373e7ab5bf91d34a4f11a0c9496561061ba5eee6020db272a17a7228d35f99 +c85cdcfd76703c95aa4204ee4c2e619aa5b075cac18f428202f65552104add3b" + +do_configure() { + if [ "$CROSS_BUILD" ]; then + # fake configure run on host + unset CC CPP LD CFLAGS CPPFLAGS LDFLAGS + fi + + ./configure --with-compat \ + --add-dynamic-module=../ngx_brotli-${version} +} + +pre_build() { + sed -i 's/-lcrypt/$(LDFLAGS) &/' objs/Makefile +} + +do_install() { + vmkdir usr/lib/nginx + ls -alh objs/ + vcopy "objs/*.so" usr/lib/nginx + + vlicense LICENSE +}