summaryrefslogtreecommitdiff
path: root/user/nginx/APKBUILD
blob: fd5cfb86ffb883960cfc95ceb1a84f388fecdb20 (plain) (blame)
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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
# Contributor: Síle Ekaterin Liszka <sheila@vulpine.house>
# Maintainer: Síle Ekaterin Liszka <sheila@vulpine.house>
pkgname=nginx
pkgver=1.24.0
pkgrel=0
_testsuite_rev=24482e311749
pkgdesc="High-performance HTTP server"
url="https://nginx.org"
arch="all"
options=""
license="BSD-2-Clause"
depends=""
makedepends="openssl-dev pcre2-dev zlib-dev"
checkdepends="openssl cmd:which"
install="nginx.pre-install"
pkgusers="nginx"
pkggroups="nginx"
subpackages="$pkgname-openrc"
source="https://nginx.org/download/nginx-$pkgver.tar.gz
	$pkgname-tests-${_testsuite_rev}.tar.gz::https://hg.nginx.org/nginx-tests/archive/${_testsuite_rev}.tar.gz

	CVE-2023-44487.patch
	fix-pcre2-reload-memory-leak.patch
	merge-sort.patch
	http2-buffer-management.patch

	nginx.initd
	nginx.conf
	"

build() {
	./configure \
		--build=$CBUILD \
		--prefix=/usr \
		--modules-path=/usr/libexec/nginx \
		--conf-path=/etc/nginx/ \
		--pid-path=/run/nginx \
		--lock-path=/run/nginx \
		--user=nginx \
		--group=nginx \
		--with-poll_module \
		--with-threads \
		--with-file-aio \
		--with-http_ssl_module \
		--with-http_v2_module \
		--with-http_realip_module \
		--with-http_dav_module \
		--with-http_auth_request_module \
		--without-http_ssi_module \
		--without-http_empty_gif_module \
		--without-http_geo_module \
		--with-stream=dynamic \
		--with-stream_ssl_module \
		--with-stream_realip_module \
		--with-stream_ssl_preread_module
	make
}

check() {
	cd "$srcdir"/nginx-tests-${_testsuite_rev}

	TEST_NGINX_BINARY="$builddir/objs/nginx" prove -j ${JOBS} .
}

package() {
	mkdir -p "$pkgdir"/usr/sbin
	install -Dm755 objs/nginx "$pkgdir"/usr/sbin/nginx

	mkdir -p "$pkgdir"/etc/init.d
	install -Dm755 "$srcdir"/nginx.initd "$pkgdir"/etc/init.d/nginx

	mkdir -p "$pkgdir"/etc/nginx
	for i in koi-win koi-utf win-utf mime.types; do
		install -Dm644 conf/$i "$pkgdir"/etc/nginx
	done
	install -Dm644 "$srcdir"/nginx.conf "$pkgdir"/etc/nginx

	mkdir -p "$pkgdir"/etc/nginx/conf.d
	for i in fastcgi scgi uwsgi; do
		install -Dm644 conf/${i}_params "$pkgdir"/etc/nginx/conf.d/"$i".conf
	done

	mkdir -p "$pkgdir"/usr/libexec/nginx
	for i in objs/ngx_*_module.so; do
		install -Dm755 "$i" "$pkgdir"/usr/libexec/nginx
	done

	mkdir -p "$pkgdir"/var/www/nginx/localhost
	for i in html/*.html; do
		install -Dm644 "$i" "$pkgdir"/var/www/nginx/localhost
	done
}

sha512sums="1114e37de5664a8109c99cfb2faa1f42ff8ac63c932bcf3780d645e5ed32c0b2ac446f80305b4465994c8f9430604968e176ae464fd80f632d1cb2c8f6007ff3  nginx-1.24.0.tar.gz
80d163226bdbfcf4bd8556316a1dcc5b048fa87357f83f5cac3b13917043dad0c96b9bc67ac886b421cc4954ddf7603256fe77d85fda406f8ed8c9231fc1cf3e  nginx-tests-24482e311749.tar.gz
828ec84b675b6849cf53bee42176cc0a5d3b043f0c5781f7d030d6fcd7ba95dcee36928909e66e305b0fbf10ce7cdee5a4d640ca4d40a59a674fb284c6126509  CVE-2023-44487.patch
d7e0433666783605b52d1567860a05dcac880250188e83f0d82ce27530e5c9b272c63b19a522d45bb375bb81ffd5570bbc330bb9206260df3bc777fac5f2de42  fix-pcre2-reload-memory-leak.patch
fccc503f2cb284ad75d661b2238eeef36f54f3b33badddbcf449c2ec6daa2910e2a7a8809c87234917b6880935fd5d221683cca331599206c92303daf5a10304  merge-sort.patch
edd733a56d8de7b13998e75b95d7016398b1ae3f041df49edb38bbde3e514395c684096ff45986b0ca259ac9e3ea7c0ad1aee1013c9bb26c6c281df5062ad419  http2-buffer-management.patch
eb183860cd511361346e4079c1fcf470985e1c3b2a034a57f8b2a92ba851fed99256261f9b779770a5f57e3750e9e71bd1550a9d19ad9bf3a4d288864f0374a2  nginx.initd
9f0583ebccf265d7fd5eac6afbe2bb8f6364e399b0ca9edc09f0c51996bf2b60348bddd8d8f7600a52a56e930d496a36c178b9f16cde30843417858bb613c850  nginx.conf"