aboutsummaryrefslogtreecommitdiffstats
path: root/main/lighttpd/APKBUILD
blob: 6a60ae789184b85a01df4fd004531b545c27e71b (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
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
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=lighttpd
pkgver=1.4.36
_streamver=2.2.0
pkgrel=0
pkgdesc="a secure, fast, compliant and very flexible web-server"
url="http://www.lighttpd.net/"
arch="all"
license="custom"
install="$pkgname.pre-install $pkgname.pre-upgrade"
depends=
pkgusers="lighttpd"
pkggroups="lighttpd"
makedepends="flex pcre-dev openssl-dev zlib-dev bzip2-dev lua-dev
	automake autoconf openldap-dev libxml2-dev sqlite-dev libev-dev"
source="http://download.lighttpd.net/lighttpd/releases-1.4.x/$pkgname-$pkgver.tar.xz
	http://h264.code-shop.com/download/lighttpd-1.4.18_mod_h264_streaming-$_streamver.tar.gz

	$pkgname.initd
	$pkgname.confd
	$pkgname.logrotate
	lighttpd.conf
	mime-types.conf
	mod_cgi.conf
	mod_fastcgi.conf
	mod_fastcgi_fpm.conf
	"
subpackages="$pkgname-doc $pkgname-dbg $pkgname-mod_auth $pkgname-mod_h264_streaming
	$pkgname-mod_webdav"

prepare() {
	cd "$srcdir"/$pkgname-$pkgver
	for i in $source; do
		case $i in
		*.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
		esac
	done

	# copy over the mod-h264-streaming mod
	# http://h264.code-shop.com/trac/wiki/Mod-H264-Streaming-Lighttpd-Version2#DownloadLighttpd1.4.191.4.20andother1.4.x
	cp "$srcdir"/lighttpd-1.4.18/src/moov.* src/
	cp "$srcdir"/lighttpd-1.4.18/src/mod_h264_streaming.c src/

	cat >> src/Makefile.am <<__EOF__

lib_LTLIBRARIES += mod_h264_streaming.la
mod_h264_streaming_la_SOURCES = mod_h264_streaming.c moov.c
mod_h264_streaming_la_LDFLAGS = -module -export-dynamic -avoid-version -no-undefined
mod_h264_streaming_la_LIBADD = \$(common_libadd)
__EOF__
	aclocal -I m4 && autoconf && automake --add-missing
}

build() { 
	local i
	cd "$srcdir"/$pkgname-$pkgver
	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr \
		--disable-dependency-tracking \
		--enable-lfs \
		--libdir=/usr/lib/lighttpd \
		--without-mysql \
		--without-attr \
		--without-kerberos5 \
		--without-fam \
		--with-webdav-props \
		--with-webdav-locks \
		--without-gdbm \
		--without-memcache \
		--with-bzip2 \
		--with-ldap \
		--with-openssl \
		--with-libev \
		--with-lua \
		|| return 1

	make
}

package() {
	cd "$srcdir"/$pkgname-$pkgver
	make DESTDIR="$pkgdir" install || return 1
	rm "$pkgdir"/usr/lib/lighttpd/*.la || return 1

	# create dirs
	install -d -m755 -o lighttpd -g lighttpd \
		"$pkgdir"/var/run/lighttpd/ \
		"$pkgdir"/var/log/lighttpd/ || return 1 
	install -d -m755 \
		"$pkgdir"/etc/lighttpd/ \
		"$pkgdir"/var/www/localhost/htdocs || return 1

	# lighttpd
	install -D -m755 "$srcdir"/lighttpd.initd "$pkgdir"/etc/init.d/lighttpd
	install -D -m644 "$srcdir"/lighttpd.confd "$pkgdir"/etc/conf.d/lighttpd
	install -D -m644 "$srcdir"/lighttpd.logrotate \
		"$pkgdir"/etc/logrotate.d/lighttpd
	
	# config files
	for i in lighttpd.conf mime-types.conf mod_cgi.conf mod_fastcgi.conf mod_fastcgi_fpm.conf; do
		install -m644 "$srcdir"/$i "$pkgdir"/etc/lighttpd/$i
	done
}

_mv_mod() {
	mkdir -p "$subpkgdir"/usr/lib/lighttpd
	while [ $# -gt 0 ]; do
		mv "$pkgdir"/usr/lib/lighttpd/$1.so \
			"$subpkgdir"/usr/lib/lighttpd/ || return 1
		shift
	done
}

mod_h264_streaming() {
	pkgdesc="H264 Streaming Module for lighttpd"
	url="http://h264.code-shop.com/trac"
	license="CCPL-nc-sa-3.0"
	replaces="lighttpd-h264_streaming"
	_mv_mod mod_h264_streaming
}

mod_auth() {
	pkgdesc="Authentication module for lighttpd"
	_mv_mod mod_auth
}

mod_webdav() {
	pkgdesc="WebDAV module for lighttpd"
	_mv_mod mod_webdav
}


md5sums="1843daffcb018aa528f6d15d43544654  lighttpd-1.4.36.tar.xz
ac37885c881a058194405232e7737a7a  lighttpd-1.4.18_mod_h264_streaming-2.2.0.tar.gz
b3f7106fa5dcdadf3b0e1bb98bba5e3a  lighttpd.initd
0dede109282bfe685bdec6b35f0e4b6b  lighttpd.confd
ad091c9157134890499f26d170352c9f  lighttpd.logrotate
268bf5dd2c370ee5e119246775ac5640  lighttpd.conf
f3353baa4577703ec3a30c03482df986  mime-types.conf
9c1407e95f62ed22da66c4ef5f69c3b5  mod_cgi.conf
f3363e39832f1b6678468b482d121afb  mod_fastcgi.conf
aee5947a1abf380b0685a534ca384b42  mod_fastcgi_fpm.conf"
sha256sums="897ab6b1cc7bd51671f8af759e7846245fbbca0685c30017e93a5882a9ac1a53  lighttpd-1.4.36.tar.xz
732cf98d823f2c7ddc96a3130a3c88d588b02ed20a0e7f8c9be25a265fbea2d6  lighttpd-1.4.18_mod_h264_streaming-2.2.0.tar.gz
097a4df1a6470e2e9fd2097c7c1daa7b1ee6341faddc35a65e975af019beaebd  lighttpd.initd
94f69a173dc26610a43532474230537b9bc31ec846fb9f94cb72765f125edf87  lighttpd.confd
503ee1cd454e2c0f9a212ef60dc8321893eda06ccf721ecbe94d189a09e0bc6c  lighttpd.logrotate
7dad7aca511f77cb0a4562e5b3280772b56570bd778d35493494a6118e5841e4  lighttpd.conf
75a6fce072250ebccde2320996fdace0ebfeb525b03322f0b454f8f4e0e29a85  mime-types.conf
322656b4cfd22ca9f1f8ab160e0b932f1646622422fd49c6fc82ab416223eecf  mod_cgi.conf
d1adc1358b5d9e85353caa2e706bfa231d145dd59c075cdcb3f818b3cb5d722e  mod_fastcgi.conf
e7eb047360e09d1a2b693f08d4a912b99954090c5bdea706f46a33554e867043  mod_fastcgi_fpm.conf"
sha512sums="97aaea65fef2db5c310f849842ed40e66f50b857c28f5f8c073be9d5daa58b2be049a987d958a0fdfb98c9c5b8e5344ee57c1fa7eed3a2d18e20f2447f0ceab0  lighttpd-1.4.36.tar.xz
12e1b7c8146cccfa78678ce56cd2f704423559b23b90996dff00602634f110512146386086ac234293a3c28900a06c2bec1c97e680e7eed5173372f88177b351  lighttpd-1.4.18_mod_h264_streaming-2.2.0.tar.gz
69b7574a8d4384bcbbca587aa643aeb55c2b237e726093d1443982d8ec1d085b15c3891a273f7901a9554df4d0842a586d59cc6062b8347e72dad8c6c37bc39a  lighttpd.initd
93a05dddab14ba6355a0345f1da2fe900c8b55fed8f98506295dc12d96c7cef803c4aca77f016b8acea7bbde485be1e09a57d31fdca6f91023fbeb4db9a90a8b  lighttpd.confd
e1284fe9ab4b9a53c21b40a5ac3e77e66343e187321b8a2f7464db64747f3a99f7e17a9e7c0e298db84a24fa1286cfe344dbff182eddd9de5c0605f5397a6972  lighttpd.logrotate
c945a9d5d8ab8404344e4a8a0018bf940071ff8ca9b611e686d328a26b50f25cecc72d3a0a2ff9f7ee9e91339692e8794ea46b3d6f1529c8d977ea226872d041  lighttpd.conf
a3f2f5763885d7e4f510491b24164e34aaf62bb02daa12991575dc64335c12668355af5bb8d6ce191eb4e9cce95324b1f7c9ba61b323b4e7b50a1e03e021afcf  mime-types.conf
27cc638d8068dcf47bd9db44943d1db6c6f4e8e6abd6b42af7cea004b1c093440068541d98c68f8bea70b956713adaf8ed59a4b642dea826ee8620a05f8cfde5  mod_cgi.conf
1f7ca06b3501326f204bfa4de2694b1552fddfac5af52357a5cea5861c20204069adf6f92ea0c267968e5e2dc02804e34a61eb710026c213e3523a490254b3aa  mod_fastcgi.conf
f9efc4b70d825600f5356c30e57d0b6cac11c01739337f7192c09c2cfd96cb76c8328b11d818ea4c2addc1a6d253975b84700106ae75854d55d0df73e220bd2b  mod_fastcgi_fpm.conf"