summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 920f08ceb42a1cb10fdebd795c54b134987de164 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
# Maintainer: Repentinus <aur at repentinus dot eu>
# SPDX-License-Identifier: CC0-1.0

pkgname='nginx-mainline-mod-http-xslt-filter'
pkgver=1.25.3
pkgrel=1
pkgdesc='Transform nginx XML responses using XSLT stylesheets'
arch=('x86_64')
url='https://nginx.org/en/docs/http/ngx_http_xslt_module.html'
license=('BSD-2-Clause')
depends=('nginx-mainline' 'libxml2' 'libxslt')
makedepends=("nginx-mainline-src=$pkgver")

prepare() {
	cp -r /usr/src/nginx/ ./
}

build() {
	cd 'nginx'
	_options=$(nginx -V |&
	           sed -nE 's/^configure arguments: ([^\n]*)$/\1/p' |
	           sed -nE 's/([^'"'"' \t\n]+('"'"'([^'"'"'\]|\\'"'"'?)*'"'"'|"([^"\\]|\\"?)*")?) ?/\1\n/gp')
	xargs ./configure --with-http_xslt_module=dynamic <<< ${_options}
	make modules
}

package() {
	cd 'nginx/objs'
	install -Dm644 -t "$pkgdir/usr/lib/nginx/modules/$f" *.so
	install -dm755 "$pkgdir/usr/share/licenses/"
	ln -s '/usr/share/licenses/nginx/' "$pkgdir/usr/share/licenses/$pkgname"
}