PKGBUILDs/extra/lighttpd/PKGBUILD

70 lines
2.3 KiB
Bash

# Maintainer: Pierre Schmitz <pierre@archlinux.de>
pkgname=lighttpd
pkgver=1.4.23
pkgrel=2
pkgdesc='a secure, fast, compliant and very flexible web-server'
license=('custom')
arch=('arm')
url="http://www.lighttpd.net/"
depends=('pcre' 'openssl' 'zlib' 'bzip2' 'attr' 'libldap')
makedepends=('fcgi' 'libmysqlclient' 'lua' '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')
source=(http://www.lighttpd.net/download/lighttpd-${pkgver}.tar.bz2
lighttpd.rc.d
lighttpd.logrotate.d)
md5sums=('0ab6bb7b17bf0f515ce7dce68e5e215a'
'789ed1b4521e72e591e09d5dfb99235a'
'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 \
--with-ldap \
--with-attr \
--with-openssl \
--with-kerberos5 \
--without-fam \
--with-webdav-props \
--with-webdav-locks \
--with-gdbm \
--with-memcache \
--with-lua
make
make DESTDIR=$pkgdir install
install -D -m755 $srcdir/lighttpd.rc.d $pkgdir/etc/rc.d/lighttpd
install -D -m644 $srcdir/lighttpd.logrotate.d $pkgdir/etc/logrotate.d/lighttpd
install -d -m755 -o http -g http $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
install -D -m644 COPYING $pkgdir/usr/share/licenses/$pkgname/COPYING
}