source: trunk/dports/www/lighttpd/Portfile @ 55776

Last change on this file since 55776 was 55776, checked in by snc@…, 10 years ago

ensure default configuration's directories exist, ticket #13450. rename patches.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 3.5 KB
Line 
1# -*- coding: utf-8; mode: tcl; tab-width: 4; truncate-lines: t; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:et:sw=4:ts=4:sts=4
2# $Id: Portfile 55776 2009-08-18 18:03:55Z snc@macports.org $
3
4PortSystem 1.0
5name              lighttpd
6version           1.4.22
7categories        www
8maintainers       kallisys.net:pguyot
9description       A secure, fast, compliant and flexible web-server
10long_description  lighttpd is a secure, fast, compliant and very flexible\
11                  web-server which has been optimized for high-performance\
12                  environments. It has a very low memory footprint\
13                  compared to other webservers and takes care of cpu-load.
14homepage          http://www.lighttpd.net/
15master_sites      ${homepage}/download/
16checksums         md5     949c33a81e83f7718a47280bef21b90c \
17                  sha1    e5268929dff832c7786e3b623ca67e6bb0c2913e \
18                  rmd160  0762e55c52cbc8e5c20faecc45817db5885462d4
19depends_lib       port:pcre \
20                  port:zlib
21patchfiles        patch-doc-lighttpd.conf.diff
22
23post-patch {
24    reinplace "s|__PREFIX|${prefix}|g" "${worksrcpath}/doc/lighttpd.conf"
25}
26
27configure.args    --mandir=${prefix}/share/man
28
29# Startup item.
30set lighttpd_config_name   lighttpd.conf
31set lighttpd_config        ${prefix}/etc/${name}/${lighttpd_config_name}
32set lighttpd_pidfile_name  lighttpd.pid
33set lighttpd_pidfile       ${prefix}/var/run/${lighttpd_pidfile_name}
34
35startupitem.create  yes
36startupitem.init    "PIDFILE=${lighttpd_pidfile}"
37startupitem.start   "${prefix}/sbin/lighttpd -f ${lighttpd_config}"
38startupitem.stop    "kill \$(cat \$PIDFILE)"
39
40destroot.keepdirs   ${destroot}${prefix}/var/log/lighttpd \
41                    ${destroot}${prefix}/www/htdocs \
42                    ${destroot}${prefix}/var/run/lighttpd \
43                    ${destroot}${prefix}/var/lib/lighttpd \
44                    ${destroot}${prefix}/var/cache/lighttpd/compress
45post-destroot {
46   file mkdir "${destroot}${prefix}/etc/${name}/"
47   xinstall -m 644 -v "${worksrcpath}/doc/lighttpd.conf" \
48                      "${destroot}${lighttpd_config}.default"
49}
50
51post-install {
52  ui_msg "\n Before starting lighttpd it must be configured.\n\
53    Lighttpd is configured by editing ${lighttpd_config}\n\
54    There's a sample config file at ${lighttpd_config}.default.\n\
55    Please note that the launchd daemon relies on the PID being at\n\
56    ${lighttpd_pidfile}."
57}
58
59
60variant mysql4 {
61   depends_lib-append    port:mysql4
62   configure.args-append --with-mysql=${prefix}/bin/mysql_config
63
64   post-configure {
65      reinplace "s|<mysql/mysql.h>|\"${prefix}/include/mysql/mysql.h\"|g" \
66                "${worksrcpath}/src/mod_mysql_vhost.c"
67   }
68}
69
70variant mysql5 {
71   depends_lib-append    port:mysql5
72   configure.args-append --with-mysql=${prefix}/bin/mysql_config5
73
74   post-configure {
75      reinplace "s|<mysql/mysql.h>|\"${prefix}/include/mysql5/mysql/mysql.h\"|g" \
76                "${worksrcpath}/src/mod_mysql_vhost.c"
77   }
78}
79
80variant ssl {
81   depends_lib-append   port:openssl
82   configure.args-append --with-openssl=${prefix}/include/openssl
83}
84
85variant cml {
86   depends_lib-append   port:lua \
87                        port:libmemcache \
88                        port:memcached \
89                        port:pkgconfig
90                       
91   configure.args-append --with-lua \
92                         --with-memcache
93}
94
95variant davprops {
96   depends_lib-append   port:libxml2 \
97                        port:sqlite3 \
98                        port:pkgconfig
99                       
100   configure.args-append --with-webdav-props
101}
Note: See TracBrowser for help on using the repository browser.