summaryrefslogtreecommitdiff
path: root/user/nginx/APKBUILD
blob: 32272db05eefb2666eebd9f7ea1cc9450b870ee6 (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
# Contributor: Síle Ekaterin Liszka <sheila@vulpine.house>
# Maintainer: Síle Ekaterin Liszka <sheila@vulpine.house>
pkgname=nginx
pkgver=1.25.3
pkgrel=0
pkgdesc="High-performance HTTP server"
url="https://nginx.org"
arch="all"
options="!check" # No test suite
license="BSD-2-Clause"
depends=""
makedepends="openssl-dev pcre-dev zlib-dev"
install="nginx.pre-install"
pkgusers="nginx"
pkggroups="nginx"
subpackages="$pkgname-openrc"
source="http://nginx.org/download/nginx-$pkgver.tar.gz
	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_v3_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 \
		--http-log-path=/var/log/nginx \
		--error-log-path=/var/log/nginx/errors.log \
		--with-stream=dynamic \
		--with-stream_ssl_module \
		--with-stream_realip_module \
		--with-stream_ssl_preread_module
	make
}

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="46fcbf6b540a2e47f192453b9686a701e3abe5a41a3275e36c9fca6c3f9ef0aa8d705cc5ad63257d662a5432109e4ce125d330cdeb547914bceac19e885dba1f  nginx-1.25.3.tar.gz
eb183860cd511361346e4079c1fcf470985e1c3b2a034a57f8b2a92ba851fed99256261f9b779770a5f57e3750e9e71bd1550a9d19ad9bf3a4d288864f0374a2  nginx.initd
9f0583ebccf265d7fd5eac6afbe2bb8f6364e399b0ca9edc09f0c51996bf2b60348bddd8d8f7600a52a56e930d496a36c178b9f16cde30843417858bb613c850  nginx.conf"