source: trunk/dports/www/lighttpd-devel/Portfile @ 58230

Last change on this file since 58230 was 58230, checked in by ryandesign@…, 11 years ago

rewrite mysql5 dependency so mysql5-devel can satisfy it

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 3.8 KB
Line 
1# $Id: Portfile 58230 2009-09-24 16:45:22Z ryandesign@macports.org $
2
3PortSystem 1.0
4name              lighttpd-devel
5version           1.5.0-r1691
6categories        www
7platforms         darwin
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. \
14                  This is the 1.5.x pre-release version.
15homepage          http://www.lighttpd.net/
16master_sites      ${homepage}assets/2007/2/23/
17distname          lighttpd-${version}
18worksrcdir        lighttpd-1.5.0
19checksums         ${distname}.tar.gz \
20                    md5 529909adbafee7e2c26bb427226f1457 \
21                    sha1 afe4ce968fc898404cd9e61e8e48b2ea3f6db5ca \
22                    rmd160 fc3bb80265e0090fce622822d4658568a5aa536c
23depends_lib       port:pcre \
24                  port:zlib \
25                  port:glib2
26patchfiles        patch-doc-lighttpd.conf \
27                  patch-src-settings.h
28
29post-patch {
30        reinplace "s|__PREFIX|${prefix}|g" "${worksrcpath}/doc/lighttpd.conf"
31}
32
33configure.args    --mandir=${prefix}/share/man
34
35# Startup item.
36set lighttpd_config_name   lighttpd.conf
37set lighttpd_config        ${prefix}/etc/${name}/${lighttpd_config_name}
38set lighttpd_pidfile_name  lighttpd.pid
39set lighttpd_pidfile       ${prefix}/var/run/${lighttpd_pidfile_name}
40
41startupitem.create  yes
42startupitem.init    "PIDFILE=${lighttpd_pidfile}"
43startupitem.start   "${prefix}/sbin/lighttpd -f ${lighttpd_config}"
44startupitem.stop    "kill \$(cat \$PIDFILE)"
45
46post-destroot {
47   file mkdir "${destroot}${prefix}/etc/${name}/"
48   xinstall -m 644 -v "${worksrcpath}/doc/lighttpd.conf" \
49                      "${destroot}${lighttpd_config}.default"
50}
51
52post-install {
53  ui_msg "\n Before starting lighttpd it must be configured.\n\
54    Lighttpd is configured by editing ${lighttpd_config}\n\
55    There's a sample config file at ${lighttpd_config}.default.\n\
56    Please note that the launchd daemon relies on the PID being at\n\
57    ${lighttpd_pidfile}."
58}
59
60variant mysql4 conflicts mysql5 {
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 conflicts mysql4 {
71   depends_lib-append    path:bin/mysql_config5: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=${prefix} \
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}
102
103variant bzip2 {
104   depends_lib-append   port:bzip2
105                       
106   configure.args-append --with-bzip2
107}
108
109variant attr {
110   configure.args-append --with-attr
111}
112
113default_variants        +bzip2
114
115livecheck.type  regex
116livecheck.url   http://www.lighttpd.net/2007/2/3/lighttpd-1-5-0-pre
117livecheck.regex {<a href="http://www.lighttpd.net/assets/.*/lighttpd-(.*?).tar.gz">lighttpd-\1.tar.gz</a>}
Note: See TracBrowser for help on using the repository browser.