aboutsummaryrefslogtreecommitdiffstats
path: root/main/apache2/APKBUILD
blob: 7e8ac0aaa815b5d171f1364e6cc7f7f4874871cf (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
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=apache2
pkgver=2.4.4
pkgrel=1
pkgdesc="A high performance Unix-based HTTP server"
url="http://httpd.apache.org/"
arch="all"
license="APACHE"
depends=""
pkgusers="apache"
pkggroups="apache"
makedepends="openssl-dev zlib-dev apr-util-dev apr-dev pcre-dev sed lua-dev
	autoconf automake"
subpackages="$pkgname-dev $pkgname-doc $pkgname-utils $pkgname-ssl
	$pkgname-ldap $pkgname-webdav
	$pkgname-proxy-html:proxy_html
	$pkgname-proxy
	$pkgname-lua:_lua"
source="http://archive.apache.org/dist/httpd/httpd-$pkgver.tar.bz2
	apache2.confd
	apache2.logrotate
	apache2.initd
	httpd.conf
	ssl.conf
	ldap.conf
	proxy-html.conf
	proxy.conf
	lua.conf
	alpine.layout
	"
_builddir="$srcdir"/httpd-$pkgver

prepare() {
	cd "$srcdir"/httpd-$pkgver
	cat "$srcdir/alpine.layout" >> config.layout
}

build() {
	cd "$srcdir"/httpd-$pkgver
	./configure --prefix=/usr \
		--enable-layout=Alpine \
		--enable-so \
		--enable-suexec \
		--with-suexec-caller=http \
		--with-suexec-docroot=/var/www/localhost/htdocs \
		--with-suexec-logfile=/var/log/httpd/suexec.log \
		--with-suexec-bin=/usr/sbin/suexec \
		--with-suexec-uidmin=99 \
		--with-suexec-gidmin=99 \
		--with-apr=/usr/bin/apr-1-config \
		--with-apr-util=/usr/bin/apu-1-config \
		--with-pcre=/usr \
		--enable-mods-shared=all \
		--enable-mpms-shared=all \
		--enable-ssl --with-ssl \
		--enable-proxy \
		--enable-cache \
		--enable-disk-cache \
		--enable-mem-cache \
		--enable-file-cache \
		--enable-ldap --enable-authnz-ldap \
		--enable-cgid --enable-cgi \
		--enable-authn-anon --enable-authn-alias \
		--disable-imagemap \
		--enable-proxy-connect \
		--enable-proxy-http \
		--enable-proxy-ftp \
		--enable-deflate \
		--enable-dbd \
		--enable-exception-hook \
		--enable-dav \
		--enable-dav-fs \
		--enable-dav-lock \
		|| return 1
	make || return 1
}

package() {
	cd "$srcdir"/httpd-$pkgver
	make -j1 DESTDIR="$pkgdir" install || return 1
	# config
	rm -r "$pkgdir"/etc/apache2/httpd.conf \
		"$pkgdir"/etc/apache2/extra
	install -D -m644 "$srcdir"/httpd.conf "$pkgdir"/etc/apache2/httpd.conf \
		|| return 1
	install -d "$pkgdir"/etc/apache2/conf.d || return 1

	# init scripts and logrotate
	install -D -m755 "$srcdir"/apache2.initd \
		"$pkgdir"/etc/init.d/apache2 || return 1
	install -D -m644 "$srcdir"/apache2.logrotate \
		"$pkgdir"/etc/logrotate.d/apache2 || return 1
	install -D -m644 "$srcdir"/apache2.confd \
		"$pkgdir"/etc/conf.d/apache2 || return 1

	install -d "$pkgdir"/var/www || return 1
	ln -fs /var/log/apache2 "$pkgdir"/var/www/logs
	ln -fs /var/run/apache2 "$pkgdir"/var/www/run
	ln -fs /usr/lib/apache2 "$pkgdir"/var/www/modules
	ln -fs /etc/apache2/conf.d "$pkgdir"/var/www/conf.d
}

# include the builddir and apxs in -dev package
dev() {
	local _mpm
	local _file
	default_dev
	depends="$depends perl apr-util-dev"
	arch="noarch"

	# install apxs utility
	install -d "$subpkgdir"/usr/bin || return 1
	mv "$pkgdir"/usr/bin/apxs \
		"$subpkgdir"/usr/bin/apxs || return 1


	install -d "$subpkgdir"/usr/share/apache2/build
	mv "$pkgdir"/usr/share/apache2/build/* \
		"$subpkgdir"/usr/share/apache2/build/ || return 1
}

utils() {
	local _bin
	pkgdesc="Apache utility programs for webservers"
	install -d "$subpkgdir"/usr/sbin || return 1
	mv "$pkgdir"/usr/bin "$subpkgdir"/usr/
	for i in checkgid htcacheclean rotatelogs; do
		mv "$pkgdir"/usr/sbin/$i "$subpkgdir"/usr/sbin/ || return 1
	done
}

ssl() {
	pkgdesc="SSL/TLS module for the Apache HTTP Server"
	install="apache2-ssl.post-install"
	depends="apache2 openssl"

	install -d "$subpkgdir"/usr/lib/apache2 || return 1
	mv "$pkgdir"/usr/lib/apache2/mod_ssl.so \
		"$subpkgdir"/usr/lib/apache2/mod_ssl.so || return 1
	install -D -m644 "$srcdir"/ssl.conf \
		"$subpkgdir"/etc/apache2/conf.d/ssl.conf || return 1
	install -d "$subpkgdir"/etc/ssl/apache2 || return 1
}

ldap() {
	pkgdesc="LDAP authentication/authorization module for the Apache HTTP Server"
	url="http://httpd.apache.org/docs/2.4/mod/mod_authnz_ldap.html"
	depends="apache2 apr-util-ldap"

	install -d "$subpkgdir"/usr/lib/apache2 || return 1
	mv "$pkgdir"/usr/lib/apache2/mod_*ldap.so \
		"$subpkgdir"/usr/lib/apache2/ || return 1
	install -D -m644 "$srcdir"/ldap.conf \
		"$subpkgdir"/etc/apache2/conf.d/ldap.conf || return 1
}

webdav() {
	pkgdesc="WebDAV support for the Apache HTTP Server"
	depends="apache2"
	replaces="apache2"

	install -d "$subpkgdir"/usr/lib/apache2 || return 1
	mv "$pkgdir"/usr/lib/apache2/mod_*dav.so \
		"$pkgdir"/usr/lib/apache2/mod_dav_*.so \
		"$subpkgdir"/usr/lib/apache2/ || return 1
	install -D -m644 "$_builddir"/docs/conf/extra/httpd-dav.conf \
		"$subpkgdir"/etc/apache2/conf.d/http-dav.conf || return 1
}

proxy_html() {
	pkgdesc="HTML and XML content filters for the Apache HTTP Server"
	depends="apache2"
	install -d "$subpkgdir"/usr/lib/apache2 || return 1
	mv "$pkgdir"/usr/lib/apache2/*_proxy_html.so \
		"$pkgdir"/usr/lib/apache2/*xml2enc*.so \
		"$subpkgdir"/usr/lib/apache2/ || return 1
	install -D -m644 "$srcdir"/proxy-html.conf \
		"$subpkgdir"/etc/apache2/conf.d/proxy-html.conf || return 1
}

proxy() {
	pkgdesc="Proxy modules for the Apache HTTP Server"
	depends="apache2"
	install -d "$subpkgdir"/usr/lib/apache2 || return 1
	mv "$pkgdir"/usr/lib/apache2/*_proxy*.so \
		"$pkgdir"/usr/lib/apache2/*_lbmethod*.so \
		"$subpkgdir"/usr/lib/apache2/ || return 1
	install -D -m644 "$srcdir"/proxy.conf \
		"$subpkgdir"/etc/apache2/conf.d/proxy.conf || return 1
}

_lua() {
	pkgdesc="Lua support for the Apache HTTP server"
	depends="apache2"
	install -d "$subpkgdir"/usr/lib/apache2 || return 1
	mv "$pkgdir"/usr/lib/apache2/*_lua.so \
		"$subpkgdir"/usr/lib/apache2/ || return 1
	install -D -m644 "$srcdir"/lua.conf \
		"$subpkgdir"/etc/apache2/conf.d/lua.conf || return 1
}


md5sums="0e712ee2119cd798c8ae39d5f11a9206  httpd-2.4.4.tar.bz2
e322b5211e49511cac6e40c86af1b1da  apache2.confd
75fe4138b98fcffd01b8c8c077b944f3  apache2.logrotate
7105fc70298b24bfca6dba517f7486d7  apache2.initd
cceb6f5c3949326b48e0fcf196a2495d  httpd.conf
5d0d024ca43571b863874ab871b2c109  ssl.conf
b70fe826486043e3953cfe21f9e6fa16  ldap.conf
fe26a0a70f572eb256a3c6c183a62223  proxy-html.conf
96eddccfca1ec0349f844e2460cf655b  proxy.conf
449a4aea60473ac4a16f025fca4463e3  lua.conf
c66ff5f70260d5266e6803a59b39bd7f  alpine.layout"
sha256sums="92aabddeca76a4ac7330b143df1407bbf35574c7291c15172238ac598d97655c  httpd-2.4.4.tar.bz2
8b0ce62fc4e7cea3801744969d0b2390e28e4d11dd533816eb91e9d7af225500  apache2.confd
dabf43e11c941125c771d2f4f5dadd1038906420716b747dfc8f5a946a0bdad5  apache2.logrotate
3ee9541be1a60bd3577e5469e46d83625e7d01f4cf9df058f8b1408df61d4db3  apache2.initd
c64fd8078d9905b4a2ad758b1bef3365642dc846178dfaa8704b63b27382c78f  httpd.conf
5c97ba711b062427682c342e233bb81a8c1b62f714ca25143e856a47f3f0c031  ssl.conf
25771023d7c921a13c792607d47bd716c92698b20af21c018f0922eaf79a9604  ldap.conf
2511d6ea64c0f253b219670c445ed4f403f94caba5fb05e0b9600f0d107e1dda  proxy-html.conf
00c42b7806eaa73e732be9d9e92c3e841b20c6d91a9920be47f19db8aee3513e  proxy.conf
edf701795137566c7cf4b9c0c95ecd5f8c58269f5600217a0a4d289d2bf15384  lua.conf
cf0033a245d1d7752539613b6c92beaea9c0a755e7a877c8d41a2d4fd0f3eb22  alpine.layout"
sha512sums="d68789e1e585b4acf26e4e32d063fa512525f8fcc2077b1dbf573dd9f4b47667772d94bb65fefb354fbfae331e87b3fdea422a732838c86d8887eed4b3a76af0  httpd-2.4.4.tar.bz2
e0a0b87889eff01e8a1ee21853d26c0307ceb87428727e60819d29644d8e54e9bfc08c197924567bed26befc904f8384af19516aea849f3cd6859d76b175b742  apache2.confd
566a8c469ef148dfbb9449e91d6fb93baf85d06a31a52c283a7e402aef7bfa8b46c34ebed91c76b3e5a2cc606660145e8fc63fa41bdb22574c7efc4fc4d993e5  apache2.logrotate
9d6b9de14435acbdbb9526f7dfa9b190a36442a8b7b7cf1875f76a6b340d90551ffe0441b51c2909d5f6914a771a09d4b1436607fc5fc56a7e0314e7f4ca298b  apache2.initd
3f146155bd4fe03d3d3a66c1dc7ebdf5830d633158b457381ea65d82d1f15a506953cfde09a7306daa455d0beadb8a60952e889ffd5c4bc803c5a933ea3316e5  httpd.conf
07493965ba04d29ad9bc94bf21cf9bdad74947952c61a1050f1f9ff60d8d08d6b4f9de107ca01b9c3f2764b9bc55ce0777cfaf9005dbbfa050a423b513acfda9  ssl.conf
fbdc28ea4b94af91640794945ac4e1f45e4200e54d5bdf64c0c03fc8bdb589e444cc4f7dd0b70b696c0e5e033c8489b8bd8f8fd090906c4379651c7d032c2449  ldap.conf
263149f4a0b515e3b6d162ff282ffa90f8a448c10eb7185aec0caf75af7691b5486fa74ebe4fd46ae0ccdcf226a227705b4be4c23ed12b6d0c0aedd94a348810  proxy-html.conf
aabbe171219f15efe47f8e972fc1a43f98b48977aae91b597b65bb447027992bf81757bde68b26a67e5e3b9f2e748d94b3c85d5c07433627b6048d60a51d400b  proxy.conf
f2950005ac0d8c7a5e34958f1274c9ed0f5f634a5bc766e12834917937df9db901c5fc2460da70e1a62f17440d4719163cd4213496dbf579c80a789b8e18f65c  lua.conf
30faedf3683e1600d9505dc593b0193359eed7e3d925da772ba795b1354171821233072293105d0da41376b2561823fa48c2406f07276648a87b858dcf323c5e  alpine.layout"