* ad nginx-mod-headers-more

This commit is contained in:
Alexander Baldeck 2024-12-16 20:26:25 +01:00
parent f829d4faca
commit a72d231b30
3 changed files with 67 additions and 0 deletions

View File

@ -0,0 +1,14 @@
pkgbase = nginx-mod-headers-more
pkgdesc = Nginx module to set and clear input and output headers
pkgver = 0.37
pkgrel = 6
url = https://github.com/openresty/headers-more-nginx-module
arch = x86_64
license = BSD-2-Clause
makedepends = nginx
makedepends = nginx-src
source = https://github.com/openresty/headers-more-nginx-module/archive/v0.37/headers-more-0.37.tar.gz
sha256sums = cf6e169d6b350c06d0c730b0eaf4973394026ad40094cddd3b3a5b346577019d
pkgname = nginx-mod-headers-more
depends = nginx=

View File

@ -0,0 +1,4 @@
[nginx-mod-headers-more]
source = "git"
git = "https://github.com/openresty/headers-more-nginx-module.git"
prefix = "v"

View File

@ -0,0 +1,49 @@
# POWER Maintainer: Alexander Baldeck <alex.bldck@gmail.com>
# Maintainer: Massimiliano Torromeo <massimiliano.torromeo@gmail.com>
pkgname=nginx-mod-headers-more
pkgver=0.37
pkgrel=6
_modname="${pkgname#nginx-mod-}"
pkgdesc="Nginx module to set and clear input and output headers"
arch=(x86_64 powerpc64le powerpc64 powerpc riscv64)
makedepends=('nginx' 'nginx-src')
url="https://github.com/openresty/headers-more-nginx-module"
license=('BSD-2-Clause')
source=(
https://github.com/openresty/$_modname-nginx-module/archive/v$pkgver/$_modname-$pkgver.tar.gz
)
sha256sums=('cf6e169d6b350c06d0c730b0eaf4973394026ad40094cddd3b3a5b346577019d')
prepare() {
mkdir -p build
cd build
ln -sf /usr/src/nginx/auto
ln -sf /usr/src/nginx/src
}
build() {
cd build
/usr/src/nginx/configure \
--with-ld-opt="$LDFLAGS" \
--with-compat \
--add-dynamic-module=../$_modname-nginx-module-$pkgver
make modules
}
package() {
local _nginx_version=$(nginx -v 2>&1)
_nginx_version=${_nginx_version/* nginx\/}
depends+=("nginx=${_nginx_version}")
cd build/objs
for mod in *.so; do
install -Dm755 $mod "$pkgdir"/usr/lib/nginx/modules/$mod
done
install -Dm644 "$srcdir"/$_modname-nginx-module-$pkgver/README.markdown \
"$pkgdir"/usr/share/licenses/$pkgname/README.markdown
}