a project to simplify installation of open source software
on Mac OS X and Darwin
# $Id: Portfile 22478 2007-03-02 05:16:40Z pipping@macports.org $
PortSystem 1.0
name apache
version 1.3.37
categories www
platforms darwin freebsd
maintainers nomaintainer@macports.org
description The extremely popular Apache http server
long_description \
Apache is an HTTP server designed as a plug-in replacement for \
the NCSA server version 1.3 (or 1.4). It fixes numerous bugs in \
the NCSA server and includes many frequently requested new \
features, and has an API which allows it to be extended to meet \
users' needs more easily.
homepage http://httpd.apache.org/
master_sites apache:httpd/ \
http://archive.apache.org/dist/httpd/old/
distname ${name}_${version}
checksums md5 b278f0969a9ccadeb781316e79e3520f
variant darwin {
if { ![variant_isset apache_layout] } {
configure.args-append --with-layout=FreeBSD --logfiledir=${prefix}/var/log/httpd --runtimedir=${prefix}/var/run
}
}
variant apache_layout {
configure.pre_args --prefix=${prefix}/apache
configure.args-append --with-layout=Apache --logfiledir=${prefix}/apache/var/log/httpd --runtimedir=${prefix}/apache/var/run
}
set stdargs "--server-uid=www --server-gid=www --enable-module=most --enable-shared=max --disable-rule=expat"
configure.pre_args --prefix=${prefix} --datadir=${prefix}/var/www/data --cgidir=${prefix}/var/www/cgi-bin --iconsdir=${prefix}/var/www/icons --mandir=${prefix}/share/man
configure.args ${stdargs}
destroot.args root=${destroot}
startupitem.create yes
if { [variant_isset apache_layout] } {
startupitem.init \
"CTL=${prefix}/apache/bin/apachectl\nPID=${prefix}/apache/run/httpd.pid"
} else {
startupitem.init \
"CTL=${prefix}/sbin/apachectl\nPID=${prefix}/var/run/httpd.pid"
}
startupitem.start \
"\[ -x \${CTL} \] && \${CTL} start >/dev/null"
startupitem.stop \
"\[ -r \${PID} \] && \${CTL} stop >/dev/null"
startupitem.restart \
"\[ -x \${CTL} \] && \${CTL} restart >/dev/null"
post-destroot {
if { [variant_isset apache_layout] } {
xinstall -m 755 -d ${destroot}${prefix}/apache/log \
${destroot}${prefix}/apache/run
destroot.keepdirs ${destroot}${prefix}/apache/log \
${destroot}${prefix}/apache/run
} else {
xinstall -m 755 -d ${destroot}${prefix}/var/log/httpd \
${destroot}${prefix}/var/run
destroot.keepdirs ${destroot}${prefix}/var/log/httpd \
${destroot}${prefix}/var/run
}
}