From 732525d3c5aa8be03e8c35e966a347d3126a855a Mon Sep 17 00:00:00 2001 From: AluminumTank Date: Thu, 15 Apr 2021 20:51:13 -0400 Subject: [PATCH] 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..d8992595ab2a --- /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" +makedepends="pcre-devel" +depends="nginx" +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 +}