35 lines
1 KiB
Bash
35 lines
1 KiB
Bash
# Maintainer: George Rawlinson <george@rawlinson.net.nz>
|
|
# Contributor: Massimiliano Torromeo <massimiliano.torromeo@gmail.com>
|
|
|
|
_ngx_ver=1.25.4
|
|
pkgname=nginx-mainline-mod-brotli
|
|
pkgver=1.0.0rc
|
|
pkgrel=23
|
|
pkgdesc='Brotli compression filter module'
|
|
arch=('x86_64')
|
|
url='https://github.com/google/ngx_brotli'
|
|
_modname="${url##*/}"
|
|
license=('BSD')
|
|
depends=("nginx-mainline=$_ngx_ver" 'brotli')
|
|
makedepends=('nginx-mainline-src')
|
|
source=("$pkgname-$pkgver.tar.gz::$url/archive/v$pkgver.tar.gz")
|
|
b2sums=('450d0ea693bd98d4a1b615f2cdcaad41ccd28266f6d80beec7fe77fe750ab8c5d1bb55aabe15161b9b6d819d2b4d99a7774f2706f2f6fd084b52a7c7dddbc00c')
|
|
|
|
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
|
|
|
|
# license
|
|
install -vDm644 -t "$pkgdir/usr/share/licenses/$pkgname" "$_modname-$pkgver/LICENSE"
|
|
}
|