45 lines
1.2 KiB
Bash
45 lines
1.2 KiB
Bash
# Maintainer: George Rawlinson <george@rawlinson.net.nz>
|
|
# Contributor: Massimiliano Torromeo <massimiliano.torromeo@gmail.com>
|
|
|
|
_ngx_ver=1.27.1
|
|
pkgname=nginx-mainline-mod-headers-more
|
|
pkgver=0.34
|
|
pkgrel=12
|
|
pkgdesc='Set and clear input and output headers'
|
|
arch=('x86_64')
|
|
url='https://github.com/openresty/headers-more-nginx-module'
|
|
_modname="${url##*/}"
|
|
license=('BSD')
|
|
depends=("nginx-mainline=$_ngx_ver")
|
|
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
|
|
}
|