arch-pkgs/nginx-mainline-mod-headers-more/PKGBUILD

45 lines
1.2 KiB
Text
Raw Normal View History

# Maintainer: George Rawlinson <george@rawlinson.net.nz>
# Contributor: Massimiliano Torromeo <massimiliano.torromeo@gmail.com>
pkgname=nginx-mainline-mod-headers-more
pkgver=0.34
2023-01-01 08:37:01 +00:00
pkgrel=3
pkgdesc='Set and clear input and output headers'
arch=('x86_64')
url='https://github.com/openresty/headers-more-nginx-module'
_modname="${url##*/}"
license=('BSD')
2023-01-01 08:37:01 +00:00
depends=('nginx-mainline=1.23.3')
makedepends=('nginx-mainline-src')
source=("$pkgname-$pkgver.tar.gz::$url/archive/v$pkgver.tar.gz")
b2sums=('48badf603b93601b11c837057760f768ef2579062786bb366795617635747b654cecafa3a230eec1a3e442ab768fb068867ceb93385b14b6452b621764acfd3f')
prepare() {
mkdir -p build
ln -sf -t build /usr/src/nginx/{auto,src}
}
build() {
cd build
/usr/src/nginx/configure \
--with-compat \
--add-dynamic-module="$srcdir/$_modname-$pkgver"
make modules
}
package() {
# modules
install -vDm755 -t "$pkgdir/usr/lib/nginx/modules" build/objs/*.so
cd "$_modname-$pkgver"
# license
install -d "$pkgdir/usr/share/licenses/$pkgname"
sed -n "507,535p" README.markdown > "$pkgdir/usr/share/licenses/$pkgname/LICENSE.md"
# documentation
install -Dm644 -t "$pkgdir/usr/share/doc/$pkgname" README.markdown
}