blob: be5e5f021cefa5fa1534a9ac99b1d4983eeade4c (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
|
# Created by: k@123.org
# $FreeBSD$
PORTNAME?= lighttpd
PORTVERSION= 1.4.51
PORTREVISION= 1
CATEGORIES?= www
MASTER_SITES?= http://download.lighttpd.net/lighttpd/releases-1.4.x/
MAINTAINER= pkubaj@anongoth.pl
COMMENT?= Secure, fast, compliant, and flexible Web Server
.if !defined(_BUILDING_LIGHTTPD_MODULE)
LICENSE= BSD3CLAUSE
LICENSE_FILE= ${WRKSRC}/COPYING
.endif
LIB_DEPENDS+= libpcre.so:devel/pcre
GNU_CONFIGURE= yes
USES= autoreconf gmake libtool localbase pkgconfig tar:xz
USE_CSTD= gnu99
.if !defined(_BUILDING_LIGHTTPD_MODULE)
USES+= cpe
.endif
CONFIGURE_ARGS+= --libdir=${PREFIX}/lib/lighttpd
INSTALL_TARGET= install-strip
.if !defined(_BUILDING_LIGHTTPD_MODULE)
TEST_TARGET= check
PORTDOCS= AUTHORS COPYING INSTALL NEWS README
USE_RC_SUBR= lighttpd
REQUIRE= DAEMON
OPTIONS_DEFINE= ATTR BZIP2 DOCS FAM GDBM GEOIP IPV6 KRB5 LIBEV LUA MEMCACHED \
MYSQL LDAP OPENSSL SPAWNFCGI VALGRIND WEBDAV
OPTIONS_DEFAULT= LUA OPENSSL
OPTIONS_SUB= yes
ATTR_DESC= extended attributes support
BZIP2_DESC= bzip2 support (mod_compress)
GDBM_DESC= gdbm storage (mod_trigger_b4_dl)
KRB5_DESC= Kerberos authentication (mod_authn_gssapi)
LDAP_DESC= LDAP authentication (mod_authn_ldap)
LIBEV_DESC= Fast events support via libev (disables kqueue)
LUA_DESC= lua support (mod_cml, mod_magnet)
MEMCACHED_DESC= memcached storage (mod_trigger_b4_dl)
MYSQL_DESC= MySQL support (mod_authn_mysql, mod_mysql_vhost)
SPAWNFCGI_DESC= Depend on spawn-fcgi utility
VALGRIND_DESC= valgrind support
WEBDAV_DESC= WebDAV support
ATTR_CONFIGURE_WITH= attr
BZIP2_CONFIGURE_WITH= bzip2
FAM_USES= fam
FAM_CONFIGURE_ON= --with-fam
FAM_CONFIGURE_ENV= FAM_CFLAGS="-I${LOCALBASE}/include" FAM_LIBS="-L${LOCALBASE}/lib"
GDBM_LIB_DEPENDS= libgdbm.so:databases/gdbm
GDBM_CONFIGURE_WITH= gdbm
GEOIP_LIB_DEPENDS= libGeoIP.so:net/GeoIP
GEOIP_CONFIGURE_WITH= geoip
IPV6_CONFIGURE_OFF= --disable-ipv6
KRB5_CONFIGURE_WITH= krb5
KRB5_CPPFLAGS= ${GSSAPICPPFLAGS}
KRB5_LDFLAGS= ${GSSAPILDFLAGS}
KRB5_LIBS= ${GSSAPILIBS}
KRB5_USES= gssapi:mit
LDAP_CONFIGURE_WITH= ldap
LDAP_USE= openldap=yes
LDAP_VARS= REQUIRE+=slapd
LIBEV_CONFIGURE_WITH= libev=${LOCALBASE}
LIBEV_LIB_DEPENDS= libev.so:devel/libev
LUA_USES= lua
LUA_CONFIGURE_WITH= lua
LUA_CONFIGURE_ENV= LUA_CFLAGS="-I${LUA_INCDIR}" LUA_LIBS="-L${LUA_LIBDIR} -llua-${LUA_VER}"
MEMCACHED_LIB_DEPENDS= libmemcached.so:databases/libmemcached
MEMCACHED_CONFIGURE_WITH=memcached
MYSQL_CONFIGURE_WITH= mysql
MYSQL_USES= mysql
MYSQL_VARS= REQUIRE+=mysql
OPENSSL_USES= ssl
OPENSSL_CONFIGURE_WITH= openssl
OPENSSL_CONFIGURE_ON= --with-openssl-includes=${OPENSSLINC} --with-openssl-libs=${OPENSSLLIB}
SPAWNFCGI_RUN_DEPENDS= spawn-fcgi:www/spawn-fcgi
VALGRIND_BUILD_DEPENDS= valgrind:devel/valgrind
VALGRIND_RUN_DEPENDS= valgrind:devel/valgrind
VALGRIND_CONFIGURE_WITH=valgrind
WEBDAV_USE= GNOME=libxml2
WEBDAV_LIB_DEPENDS= libuuid.so:misc/e2fsprogs-libuuid \
libsqlite3.so:databases/sqlite3
WEBDAV_CONFIGURE_WITH= webdav-props webdav-locks
LIGHTTPD_CONF_FILES= lighttpd.conf modules.conf
LIGHTTPD_CONF_D_FILES= access_log.conf \
auth.conf cgi.conf cml.conf \
compress.conf debug.conf dirlisting.conf \
evhost.conf expire.conf fastcgi.conf \
magnet.conf mime.conf mysql_vhost.conf proxy.conf \
rrdtool.conf scgi.conf secdownload.conf \
simple_vhost.conf ssi.conf status.conf \
trigger_b4_dl.conf userdir.conf webdav.conf
USERS= ${WWWOWN}
GROUPS= ${WWWGRP}
CACHEDIR= /var/cache/${PORTNAME}
LOGDIR= /var/log/${PORTNAME}
HOMEDIR= /var/run/${PORTNAME}
PLIST_SUB+= WWWOWN="${WWWOWN}" WWWGRP="${WWWGRP}"
PLIST_SUB+= CACHEDIR="${CACHEDIR}" HOMEDIR="${HOMEDIR}" LOGDIR="${LOGDIR}"
.endif # !defined(_BUILDING_LIGHTTPD_MODULE)
.include <bsd.port.options.mk>
.if !defined(_BUILDING_LIGHTTPD_MODULE)
SUB_LIST= REQUIRE="${REQUIRE}"
post-patch:
@${REINPLACE_CMD} -e 's|-std=gnu99||' \
${WRKSRC}/configure ${WRKSRC}/configure.ac
@${REINPLACE_CMD} -E -e \
's|^(server.document-root.*=).*|\1 "${PREFIX}/www" + "/data"|' \
-e "s|/etc/lighttpd|${ETCDIR}|g" \
-e 's|^(server.event-handler.*=).*|\1 "freebsd-kqueue"|' \
-e 's|^(server.network-backend.*=).*|\1 "writev"|' \
-e "s|^(server.username.*=).*|\1 \"${WWWOWN}\"|" \
-e "s|^(server.groupname.*=).*|\1 \"${WWWGRP}\"|" \
-e "s|^(var.log_root.*=).*|\1 \"${LOGDIR}\"|" \
-e "s|^(var.server_root.*=).*|\1 \"${WWWDIR}\"|" \
-e "s|^(var.home_dir.*=).*|\1 \"${HOMEDIR}\"|" \
-e "s|^(var.cache_dir.*=).*|\1 \"${CACHEDIR}\"|" \
${WRKSRC}/doc/config/lighttpd.conf
@${REINPLACE_CMD} -e "s|/etc/lighttpd|${ETCDIR}|g" \
${WRKSRC}/doc/config/conf.d/auth.conf
@${REINPLACE_CMD} -e "s|/usr/bin/python|${LOCALBASE}/bin/python|" \
${WRKSRC}/doc/config/conf.d/cgi.conf \
${WRKSRC}/tests/*.conf
@${ECHO} >> ${WRKSRC}/doc/config/lighttpd.conf
@${ECHO} "# IPv4 listening socket" >> \
${WRKSRC}/doc/config/lighttpd.conf
@${ECHO} "\$$SERVER[\"socket\"] == \"0.0.0.0:80\" { }" >> \
${WRKSRC}/doc/config/lighttpd.conf
post-install:
@${MKDIR} ${STAGEDIR}${ETCDIR}/conf.d ${STAGEDIR}${ETCDIR}/vhosts.d
.for FILE in ${LIGHTTPD_CONF_FILES}
${INSTALL_DATA} ${WRKSRC}/doc/config/${FILE} \
${STAGEDIR}${ETCDIR}/${FILE}.sample
.endfor
.for FILE in ${LIGHTTPD_CONF_D_FILES}
${INSTALL_DATA} ${WRKSRC}/doc/config/conf.d/${FILE} \
${STAGEDIR}${ETCDIR}/conf.d/${FILE}.sample
.endfor
${INSTALL_DATA} ${WRKSRC}/doc/config/vhosts.d/vhosts.template \
${STAGEDIR}${ETCDIR}/vhosts.d/vhosts.template
@${MKDIR} ${STAGEDIR}${WWWDIR}
@${MKDIR} -m 0700 ${STAGEDIR}${CACHEDIR}
@${MKDIR} -m 0700 ${STAGEDIR}${HOMEDIR}/sockets
@${MKDIR} -m 0700 ${STAGEDIR}${LOGDIR}
post-install-DOCS-on:
@${MKDIR} ${STAGEDIR}${DOCSDIR}
(cd ${WRKSRC} && ${INSTALL_DATA} ${PORTDOCS} ${STAGEDIR}${DOCSDIR})
.endif # !defined(_BUILDING_LIGHTTPD_MODULE)
.include <bsd.port.mk>
|