a project to simplify installation of open source software
on Mac OS X and Darwin
# $Id: Portfile 21400 2007-01-23 03:40:37Z pguyot@kallisys.net $
PortSystem 1.0
name lighttpd
version 1.4.13
categories www
maintainers pguyot@kallisys.net
description A secure, fast, compliant and flexible web-server
long_description lighttpd is a secure, fast, compliant and very flexible\
web-server which has been optimized for high-performance\
environments. It has a very low memory footprint\
compared to other webservers and takes care of cpu-load.
homepage http://www.lighttpd.net/
master_sites ${homepage}/download/
checksums ${distname}.tar.gz \
md5 d775d6478391b95d841a1018c8db0b95 \
sha1 b17553e66609f85baec50263712a4a5aeca50ca5 \
rmd160 4e67e42dc3692d50c044561cc903de7b906f260c
depends_lib port:pcre \
port:zlib
patchfiles patch-doc-lighttpd.conf
post-patch {
reinplace "s|__PREFIX|${prefix}|g" "${worksrcpath}/doc/lighttpd.conf"
}
configure.args --mandir=${prefix}/share/man
# Startup item.
set lighttpd_config_name lighttpd.conf
set lighttpd_config ${prefix}/etc/${name}/${lighttpd_config_name}
set lighttpd_pidfile_name lighttpd.pid
set lighttpd_pidfile ${prefix}/var/run/${lighttpd_pidfile_name}
startupitem.create yes
startupitem.init "PIDFILE=${lighttpd_pidfile}"
startupitem.start "${prefix}/sbin/lighttpd -f ${lighttpd_config}"
startupitem.stop "kill \$(cat \$PIDFILE)"
post-destroot {
file mkdir "${destroot}${prefix}/etc/${name}/"
xinstall -m 644 -v "${worksrcpath}/doc/lighttpd.conf" \
"${destroot}${lighttpd_config}.default"
}
post-install {
ui_msg "\n Before starting lighttpd it must be configured.\n\
Lighttpd is configured by editing ${lighttpd_config}\n\
There's a sample config file at ${lighttpd_config}.default.\n\
Please note that the launchd daemon relies on the PID being at\n\
${lighttpd_pidfile}."
}
platform darwin 8 {
configure.env CC=/usr/bin/gcc-4.0 CPP=/usr/bin/cpp-4.0 CXX=/usr/bin/g++-4.0
}
variant mysql4 {
depends_lib-append port:mysql4
configure.args-append --with-mysql=${prefix}/bin/mysql_config
post-configure {
reinplace "s|
"${worksrcpath}/src/mod_mysql_vhost.c"
}
}
variant mysql5 {
depends_lib-append port:mysql5
configure.args-append --with-mysql=${prefix}/bin/mysql_config5
post-configure {
reinplace "s|
"${worksrcpath}/src/mod_mysql_vhost.c"
}
}
variant ssl {
depends_lib-append port:openssl
configure.args-append --with-openssl=${prefix}/include/openssl
}
variant cml {
depends_lib-append port:lua \
port:libmemcache \
port:memcached \
port:pkgconfig
configure.args-append --with-lua=${prefix} \
--with-memcache
configure.env-append LDFLAGS=-L${prefix}/lib
}
variant davprops {
depends_lib-append port:libxml2 \
port:sqlite3 \
port:pkgconfig
configure.args-append --with-webdav-props
}