Lines 1-6
Link Here
|
1 |
# Copyright 1999-2010 Gentoo Foundation |
1 |
# Copyright 1999-2010 Gentoo Foundation |
2 |
# Distributed under the terms of the GNU General Public License v2 |
2 |
# Distributed under the terms of the GNU General Public License v2 |
3 |
# $Header: /var/cvsroot/gentoo-x86/www-servers/lighttpd/lighttpd-1.4.26-r1.ebuild,v 1.7 2010/05/13 16:18:03 josejx Exp $ |
3 |
# $Header: $ |
4 |
|
4 |
|
5 |
EAPI="2" |
5 |
EAPI="2" |
6 |
|
6 |
|
Lines 12-19
Link Here
|
12 |
|
12 |
|
13 |
LICENSE="BSD" |
13 |
LICENSE="BSD" |
14 |
SLOT="0" |
14 |
SLOT="0" |
15 |
KEYWORDS="alpha amd64 arm hppa ia64 ~mips ppc ppc64 sh sparc x86 ~sparc-fbsd ~x86-fbsd" |
15 |
KEYWORDS="~amd64 ~x86" |
16 |
IUSE="bzip2 doc fam fastcgi gdbm ipv6 ldap lua minimal memcache mysql pcre php rrdtool ssl test webdav xattr" |
16 |
IUSE="bzip2 doc fam fastcgi gdbm ipv6 ldap libev lua memcache minimal mysql pcre php rrdtool ssl test webdav xattr" |
17 |
|
17 |
|
18 |
RDEPEND=" |
18 |
RDEPEND=" |
19 |
>=sys-libs/zlib-1.1 |
19 |
>=sys-libs/zlib-1.1 |
Lines 21-26
Link Here
|
21 |
fam? ( virtual/fam ) |
21 |
fam? ( virtual/fam ) |
22 |
gdbm? ( sys-libs/gdbm ) |
22 |
gdbm? ( sys-libs/gdbm ) |
23 |
ldap? ( >=net-nds/openldap-2.1.26 ) |
23 |
ldap? ( >=net-nds/openldap-2.1.26 ) |
|
|
24 |
libev? ( dev-libs/libev ) |
24 |
lua? ( >=dev-lang/lua-5.1 ) |
25 |
lua? ( >=dev-lang/lua-5.1 ) |
25 |
memcache? ( dev-libs/libmemcache ) |
26 |
memcache? ( dev-libs/libmemcache ) |
26 |
mysql? ( >=virtual/mysql-4.0 ) |
27 |
mysql? ( >=virtual/mysql-4.0 ) |
Lines 43-61
Link Here
|
43 |
dev-libs/fcgi |
44 |
dev-libs/fcgi |
44 |
)" |
45 |
)" |
45 |
|
46 |
|
46 |
# update certain parts of lighttpd.conf based on conditionals |
|
|
47 |
update_config() { |
48 |
local config="/etc/lighttpd/lighttpd.conf" |
49 |
|
50 |
# enable php/mod_fastcgi settings |
51 |
use php && \ |
52 |
dosed 's|#.*\(include.*fastcgi.*$\)|\1|' ${config} |
53 |
|
54 |
# enable stat() caching |
55 |
use fam && \ |
56 |
dosed 's|#\(.*stat-cache.*$\)|\1|' ${config} |
57 |
} |
58 |
|
59 |
# remove non-essential stuff (for USE=minimal) |
47 |
# remove non-essential stuff (for USE=minimal) |
60 |
remove_non_essential() { |
48 |
remove_non_essential() { |
61 |
local libdir="${D}/usr/$(get_libdir)/${PN}" |
49 |
local libdir="${D}/usr/$(get_libdir)/${PN}" |
Lines 100-106
Link Here
|
100 |
sed -i -e 's|\(rst2html\)|\1.py|g' doc/Makefile.am || \ |
88 |
sed -i -e 's|\(rst2html\)|\1.py|g' doc/Makefile.am || \ |
101 |
die "sed doc/Makefile.am failed" |
89 |
die "sed doc/Makefile.am failed" |
102 |
|
90 |
|
103 |
epatch "${FILESDIR}/1.4.26-fix-ssl-return-check-r2716.patch" |
|
|
104 |
eautoreconf |
91 |
eautoreconf |
105 |
} |
92 |
} |
106 |
|
93 |
|
Lines 119-125
Link Here
|
119 |
$(use_with ssl openssl) \ |
106 |
$(use_with ssl openssl) \ |
120 |
$(use_with webdav webdav-props) \ |
107 |
$(use_with webdav webdav-props) \ |
121 |
$(use_with webdav webdav-locks) \ |
108 |
$(use_with webdav webdav-locks) \ |
122 |
$(use_with xattr attr) |
109 |
$(use_with xattr attr) \ |
|
|
110 |
$(use_with libev libev) |
123 |
} |
111 |
} |
124 |
|
112 |
|
125 |
src_compile() { |
113 |
src_compile() { |
Lines 150-171
Link Here
|
150 |
sed -i 's/after famd/need famd/g' "${D}"/etc/init.d/lighttpd |
138 |
sed -i 's/after famd/need famd/g' "${D}"/etc/init.d/lighttpd |
151 |
|
139 |
|
152 |
# configs |
140 |
# configs |
|
|
141 |
epatch "${FILESDIR}/lighttpd_configs.patch" |
153 |
insinto /etc/lighttpd |
142 |
insinto /etc/lighttpd |
154 |
doins "${FILESDIR}"/conf/lighttpd.conf |
143 |
doins "${WORKDIR}"/${P}/doc/config/lighttpd.conf |
155 |
doins "${FILESDIR}"/conf/mime-types.conf |
144 |
doins "${WORKDIR}"/${P}/doc/config/modules.conf |
156 |
doins "${FILESDIR}"/conf/mod_cgi.conf |
145 |
insinto /etc/lighttpd/conf.d |
157 |
doins "${FILESDIR}"/conf/mod_fastcgi.conf |
146 |
doins "${WORKDIR}"/${P}/doc/config/conf.d/*.conf |
|
|
147 |
insinto /etc/lighttpd/vhosts.d |
148 |
doins "${WORKDIR}"/${P}/doc/config/vhosts.d/vhosts.template |
158 |
# Secure directory for fastcgi sockets |
149 |
# Secure directory for fastcgi sockets |
159 |
keepdir /var/run/lighttpd/ |
150 |
keepdir /var/run/lighttpd/ |
160 |
fperms 0750 /var/run/lighttpd/ |
151 |
fperms 0750 /var/run/lighttpd/ |
161 |
fowners lighttpd:lighttpd /var/run/lighttpd/ |
152 |
fowners lighttpd:lighttpd /var/run/lighttpd/ |
162 |
|
153 |
|
163 |
# update lighttpd.conf directives based on conditionals |
|
|
164 |
update_config |
165 |
|
166 |
# docs |
154 |
# docs |
167 |
dodoc AUTHORS README NEWS doc/*.sh |
155 |
dodoc AUTHORS README NEWS doc/scripts/*.sh |
168 |
newdoc doc/lighttpd.conf lighttpd.conf.distrib |
156 |
newdoc doc/config/lighttpd.conf lighttpd.conf.distrib |
169 |
|
157 |
|
170 |
use doc && dohtml -r doc/* |
158 |
use doc && dohtml -r doc/* |
171 |
|
159 |
|
Lines 180-212
Link Here
|
180 |
fowners lighttpd:lighttpd /var/l{ib,og}/lighttpd |
168 |
fowners lighttpd:lighttpd /var/l{ib,og}/lighttpd |
181 |
fperms 0750 /var/l{ib,og}/lighttpd |
169 |
fperms 0750 /var/l{ib,og}/lighttpd |
182 |
|
170 |
|
183 |
#spawn-fcgi may optionally be installed via www-servers/spawn-fcgi |
171 |
# remove non-essential stuff |
184 |
rm -f "${D}"/usr/bin/spawn-fcgi "${D}"/usr/share/man/man1/spawn-fcgi.* |
|
|
185 |
|
186 |
use minimal && remove_non_essential |
172 |
use minimal && remove_non_essential |
187 |
} |
173 |
} |
188 |
|
|
|
189 |
pkg_postinst () { |
190 |
echo |
191 |
if [[ -f ${ROOT}etc/conf.d/spawn-fcgi.conf ]] ; then |
192 |
einfo "spawn-fcgi is now provided by www-servers/spawn-fcgi." |
193 |
einfo "spawn-fcgi's init script configuration is now located" |
194 |
einfo "at /etc/conf.d/spawn-fcgi." |
195 |
echo |
196 |
fi |
197 |
|
198 |
if [[ -f ${ROOT}etc/lighttpd.conf ]] ; then |
199 |
ewarn "Gentoo has a customized configuration," |
200 |
ewarn "which is now located in /etc/lighttpd. Please migrate your" |
201 |
ewarn "existing configuration." |
202 |
ebeep 5 |
203 |
fi |
204 |
|
205 |
if use fastcgi; then |
206 |
ewarn "As of lighttpd-1.4.22, spawn-fcgi is provided by the separate" |
207 |
ewarn "www-servers/spawn-fcgi package. Please install it manually, if" |
208 |
ewarn "you use spawn-fcgi." |
209 |
ewarn "It features a new, more featurefull init script - please migrate" |
210 |
ewarn "your configuration!" |
211 |
fi |
212 |
} |