APKBUILD 2.29 KB
Newer Older
1
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
Natanael Copa's avatar
Natanael Copa committed
2
pkgname=lighttpd
3 4
pkgver=1.4.24
pkgrel=0
Natanael Copa's avatar
Natanael Copa committed
5 6 7
pkgdesc="a secure, fast, compliant and very flexible web-server"
url="http://www.lighttpd.net/"
license="custom"
8
install="$pkgname.pre-install $pkgname.post-install"
9
depends=
Natanael Copa's avatar
Natanael Copa committed
10 11 12 13
makedepends="flex pcre-dev openssl-dev zlib-dev bzip2-dev lua-dev pkgconfig"
source="http://www.$pkgname.net/download/$pkgname-$pkgver.tar.bz2
	$pkgname.initd
	$pkgname.confd
14 15 16 17 18 19 20 21
	$pkgname.logrotate
	spawn-fcgi.confd
	spawn-fcgi.initd
	lighttpd.conf
	mime-types.conf
	mod_cgi.conf
	mod_fastcgi.conf
	"
Natanael Copa's avatar
Natanael Copa committed
22 23
subpackages="$pkgname-dev $pkgname-doc"

24 25
build() { 
	local i
26
	cd "$srcdir"/$pkgname-$pkgver
Natanael Copa's avatar
Natanael Copa committed
27 28 29 30 31 32 33 34 35 36 37 38 39 40 41
	./configure --prefix=/usr \
		--enable-lfs \
		--libdir=/usr/lib/lighttpd \
		--without-mysql \
		--without-ldap \
		--without-attr \
		--without-kerberos5 \
		--without-fam \
		--without-webdav-props \
		--without-webdav-locks \
		--without-gdbm \
		--without-memcache \
		--with-bzip2 \
		--with-openssl \
		--with-lua || return 1
42

43 44 45 46 47
	make
}

package() {
	cd "$srcdir"/$pkgname-$pkgver
Natanael Copa's avatar
Natanael Copa committed
48
	make DESTDIR="$pkgdir" install || return 1
49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71

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

	# 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
	
	# spawn-fcgi
	install -D -m755 "$srcdir"/spawn-fcgi.initd \
		"$pkgdir"/etc/init.d/spawn-fcgi
	install -D -m644 "$srcdir"/spawn-fcgi.confd \
		"$pkgdir"/etc/conf.d/spawn-fcgi

	# config files
	for i in lighttpd.conf mime-types.conf mod_cgi.conf mod_fastcgi.conf; do
		install -m644 "$srcdir"/$i "$pkgdir"/etc/lighttpd/$i
	done
Natanael Copa's avatar
Natanael Copa committed
72
}
73
md5sums="e2324a24e4a5bce74663c21c58ddd200  lighttpd-1.4.24.tar.bz2
74
36c4ddbc266017dc193fcb0cdd1d84e1  lighttpd.initd
Natanael Copa's avatar
Natanael Copa committed
75
0dede109282bfe685bdec6b35f0e4b6b  lighttpd.confd
76 77
ad091c9157134890499f26d170352c9f  lighttpd.logrotate
1d925aed297ec4541fb230dd19e11bc1  spawn-fcgi.confd
78
2f177ba0a35fd1c683edef3453c20bc8  spawn-fcgi.initd
79 80 81 82
df5b2360ea380d988bf16905ab214286  lighttpd.conf
fef397e7bcf1b741dea211a555e1803c  mime-types.conf
9c1407e95f62ed22da66c4ef5f69c3b5  mod_cgi.conf
f3363e39832f1b6678468b482d121afb  mod_fastcgi.conf"