summaryrefslogtreecommitdiffstats
path: root/abs/core-testing/lighttpd/PKGBUILD
blob: 2c0132b318771994323af789c02f87609c22d73c (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
# $Id: PKGBUILD 13948 2008-09-30 12:03:07Z douglas $
# Maintainer: Pierre Schmitz <pierre@archlinux.de>

pkgname=lighttpd
pkgver=1.4.20
pkgrel=1
pkgdesc='a secure, fast, compliant and very flexible web-server'
license=('custom')
arch=('i686' 'x86_64')
url="http://www.lighttpd.net/"
#depends=('pcre' 'openssl' 'zlib' 'bzip2' 'attr' 'libldap')
depends=('pcre' 'openssl' 'zlib' 'bzip2' 'attr' )
makedepends=('fcgi' 'libmysqlclient'  'libxml2' 'e2fsprogs' 'sqlite3' 'gdbm' 'pkgconfig')
optdepends=('libxml2: mod_webdav' \
            'e2fsprogs: mod_webdav' \
            'lua: mod_cml/mod_magnet' \
            'libmysqlclient: mod_mysql_vhost' \
            'sqlite3: mod_webdav' \
            'gdbm: mod_trigger_b4_dl' \
            )
backup=('etc/lighttpd/lighttpd.conf' 'etc/logrotate.d/lighttpd')
options=('!libtool' 'emptydirs')
install='lighttpd.install'
source=("http://www.lighttpd.net/download/lighttpd-${pkgver}.tar.bz2" \
        'lighttpd.rc.d' 'lighttpd.logrotate.d')

md5sums=('ed6ee0bb714f393219a32768d86984d8'
         'bd690eee0d9e51857448770a151023b0'
         '857e174643fd7761a2f0d8431a679f6c')

build() {
	cd $srcdir/$pkgname-$pkgver
	./configure --prefix=/usr \
		--libexecdir=/usr/lib/lighttpd/modules \
		--sysconfdir=/etc/lighttpd \
		--sharedstatedir=/usr/var \
		--localstatedir=/var \
		--libdir=/usr/lib/lighttpd \
		--includedir=/usr/include/lighttpd \
		--with-mysql --without-sqlite3 \
		--without-ldap \
		--with-attr \
		--with-openssl \
		--with-kerberos5 \
		--without-fam \
		--with-webdav-props \
		--with-webdav-locks \
		--with-gdbm \
		--with-memcache \
		--without-lua || return 1
	make || return 1
	make DESTDIR=$pkgdir install || return 1

	install -D -m755 ../lighttpd.rc.d $pkgdir/etc/rc.d/lighttpd
	install -D -m644 ../lighttpd.logrotate.d $pkgdir/etc/logrotate.d/lighttpd
	install -d -m755 $pkgdir/var/run/lighttpd/
	install -d -m755 -o http -g http $pkgdir/var/log/lighttpd/

	install -D -m644 doc/lighttpd.conf $pkgdir/etc/lighttpd/lighttpd.conf

	# set sane defaults
	sed -e 's|/srv/www/htdocs/|/srv/http/|' \
	    -e 's|/srv/www/|/srv/http/|' \
	    -e 's|#server.username            = "wwwrun"|server.username            = "http"|' \
	    -e 's|#server.groupname           = "wwwrun"|server.groupname           = "http"|' \
	    -e 's|#server.pid-file            = "/var/run/lighttpd.pid"|server.pid-file            = "/var/run/lighttpd/lighttpd.pid"|' \
	    -e 's|/usr/local/bin/php-cgi|/usr/bin/php-cgi|' \
	    -i ${pkgdir}/etc/lighttpd/lighttpd.conf || return 1

	install -D -m644 COPYING $pkgdir/usr/share/licenses/$pkgname/COPYING
}