Lines 2-10
Link Here
|
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.20.ebuild,v 1.8 2009/02/03 12:46:51 betelgeuse Exp $ |
3 |
# $Header: /var/cvsroot/gentoo-x86/www-servers/lighttpd/lighttpd-1.4.20.ebuild,v 1.8 2009/02/03 12:46:51 betelgeuse Exp $ |
4 |
|
4 |
|
5 |
WANT_AUTOCONF=latest |
5 |
EAPI="2" |
6 |
WANT_AUTOMAKE=latest |
6 |
|
7 |
inherit eutils autotools depend.php |
7 |
inherit eutils autotools |
8 |
|
8 |
|
9 |
DESCRIPTION="Lightweight high-performance web server" |
9 |
DESCRIPTION="Lightweight high-performance web server" |
10 |
HOMEPAGE="http://www.lighttpd.net/" |
10 |
HOMEPAGE="http://www.lighttpd.net/" |
Lines 12-24
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 ~sparc-fbsd x86 ~x86-fbsd" |
15 |
KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sh ~sparc ~sparc-fbsd ~x86 ~x86-fbsd" |
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 lua minimal memcache mysql pcre php rrdtool ssl test webdav xattr" |
17 |
|
17 |
|
18 |
# cherokee block should be resolved properly |
|
|
19 |
# http://bugs.gentoo.org/show_bug.cgi?id=224781 |
20 |
RDEPEND=" |
18 |
RDEPEND=" |
21 |
!www-servers/cherokee |
|
|
22 |
>=sys-libs/zlib-1.1 |
19 |
>=sys-libs/zlib-1.1 |
23 |
bzip2? ( app-arch/bzip2 ) |
20 |
bzip2? ( app-arch/bzip2 ) |
24 |
fam? ( virtual/fam ) |
21 |
fam? ( virtual/fam ) |
Lines 28-35
Link Here
|
28 |
memcache? ( dev-libs/libmemcache ) |
25 |
memcache? ( dev-libs/libmemcache ) |
29 |
mysql? ( >=virtual/mysql-4.0 ) |
26 |
mysql? ( >=virtual/mysql-4.0 ) |
30 |
pcre? ( >=dev-libs/libpcre-3.1 ) |
27 |
pcre? ( >=dev-libs/libpcre-3.1 ) |
31 |
php? ( virtual/httpd-php ) |
28 |
php? ( virtual/httpd-php[cgi] ) |
32 |
rrdtool? ( net-analyzer/rrdtool ) |
29 |
rrdtool? ( net-analyzer/rrdtool ) |
|
|
30 |
fastcgi? ( www-servers/spawn-fcgi ) |
33 |
ssl? ( >=dev-libs/openssl-0.9.7 ) |
31 |
ssl? ( >=dev-libs/openssl-0.9.7 ) |
34 |
webdav? ( |
32 |
webdav? ( |
35 |
dev-libs/libxml2 |
33 |
dev-libs/libxml2 |
Lines 77-84
Link Here
|
77 |
use rrdtool || rm -f ${libdir}/mod_rrdtool.* |
75 |
use rrdtool || rm -f ${libdir}/mod_rrdtool.* |
78 |
|
76 |
|
79 |
if ! use fastcgi ; then |
77 |
if ! use fastcgi ; then |
80 |
rm -f ${libdir}/mod_fastcgi.* "${D}"/usr/bin/spawn-fcgi \ |
78 |
rm -f ${libdir}/mod_fastcgi.* |
81 |
"${D}"/usr/share/man/man1/spawn-fcgi.* |
|
|
82 |
fi |
79 |
fi |
83 |
} |
80 |
} |
84 |
|
81 |
|
Lines 92-121
Link Here
|
92 |
ebeep 5 |
89 |
ebeep 5 |
93 |
fi |
90 |
fi |
94 |
|
91 |
|
95 |
use php && require_php_with_use cgi |
|
|
96 |
|
97 |
enewgroup lighttpd |
92 |
enewgroup lighttpd |
98 |
enewuser lighttpd -1 -1 /var/www/localhost/htdocs lighttpd |
93 |
enewuser lighttpd -1 -1 /var/www/localhost/htdocs lighttpd |
99 |
} |
94 |
} |
100 |
|
95 |
|
101 |
src_unpack() { |
96 |
src_prepare() { |
102 |
unpack ${A} |
|
|
103 |
cd "${S}" |
104 |
|
105 |
EPATCH_SUFFIX="diff" EPATCH_OPTS="-l" epatch "${FILESDIR}"/"${PVR}" || die "Patching failed!" |
106 |
|
107 |
eautoreconf || die |
108 |
|
109 |
# dev-python/docutils installs rst2html.py not rst2html |
97 |
# dev-python/docutils installs rst2html.py not rst2html |
110 |
sed -i -e 's|\(rst2html\)|\1.py|g' doc/Makefile.in || \ |
98 |
sed -i -e 's|\(rst2html\)|\1.py|g' doc/Makefile.in || \ |
111 |
die "sed doc/Makefile.in failed" |
99 |
die "sed doc/Makefile.in failed" |
112 |
|
100 |
|
113 |
# fix typo |
101 |
eautoreconf || die |
114 |
sed -i -e 's|\(output_content\)_\(type\)|\1\2|' doc/cml.txt || \ |
|
|
115 |
die "sed doc/cml.txt failed" |
116 |
} |
102 |
} |
117 |
|
103 |
|
118 |
src_compile() { |
104 |
src_configure() { |
119 |
econf --libdir=/usr/$(get_libdir)/${PN} \ |
105 |
econf --libdir=/usr/$(get_libdir)/${PN} \ |
120 |
--enable-lfs \ |
106 |
--enable-lfs \ |
121 |
$(use_enable ipv6) \ |
107 |
$(use_enable ipv6) \ |
Lines 132-138
Link Here
|
132 |
$(use_with webdav webdav-locks) \ |
118 |
$(use_with webdav webdav-locks) \ |
133 |
$(use_with xattr attr) \ |
119 |
$(use_with xattr attr) \ |
134 |
|| die "econf failed" |
120 |
|| die "econf failed" |
|
|
121 |
} |
135 |
|
122 |
|
|
|
123 |
src_compile() { |
136 |
emake || die "emake failed" |
124 |
emake || die "emake failed" |
137 |
|
125 |
|
138 |
if use doc ; then |
126 |
if use doc ; then |
Lines 146-167
Link Here
|
146 |
make DESTDIR="${D}" install || die "make install failed" |
134 |
make DESTDIR="${D}" install || die "make install failed" |
147 |
|
135 |
|
148 |
# init script stuff |
136 |
# init script stuff |
149 |
newinitd "${FILESDIR}"/lighttpd.initd-1.4.13-r3 lighttpd || die |
137 |
newinitd "${FILESDIR}"/lighttpd.initd lighttpd || die |
150 |
newconfd "${FILESDIR}"/lighttpd.confd lighttpd || die |
138 |
newconfd "${FILESDIR}"/lighttpd.confd lighttpd || die |
151 |
use fam && has_version app-admin/fam && \ |
139 |
use fam && has_version app-admin/fam && \ |
152 |
sed -i 's/after famd/need famd/g' "${D}"/etc/init.d/lighttpd |
140 |
sed -i 's/after famd/need famd/g' "${D}"/etc/init.d/lighttpd |
153 |
|
141 |
|
154 |
if use php || use fastcgi ; then |
|
|
155 |
newinitd "${FILESDIR}"/spawn-fcgi.initd spawn-fcgi || die |
156 |
newconfd "${FILESDIR}"/spawn-fcgi.confd spawn-fcgi || die |
157 |
fi |
158 |
|
159 |
# configs |
142 |
# configs |
160 |
insinto /etc/lighttpd |
143 |
insinto /etc/lighttpd |
161 |
doins "${FILESDIR}"/conf/lighttpd.conf |
144 |
doins "${FILESDIR}"/conf/lighttpd.conf |
162 |
doins "${FILESDIR}"/conf/mime-types.conf |
145 |
doins "${FILESDIR}"/conf/mime-types.conf |
163 |
doins "${FILESDIR}"/conf/mod_cgi.conf |
146 |
doins "${FILESDIR}"/conf/mod_cgi.conf |
164 |
newins "${FILESDIR}"/conf/mod_fastcgi.conf-1.4.13-r2 mod_fastcgi.conf |
147 |
doins "${FILESDIR}"/conf/mod_fastcgi.conf |
165 |
# Secure directory for fastcgi sockets |
148 |
# Secure directory for fastcgi sockets |
166 |
keepdir /var/run/lighttpd/ |
149 |
keepdir /var/run/lighttpd/ |
167 |
fperms 0750 /var/run/lighttpd/ |
150 |
fperms 0750 /var/run/lighttpd/ |
Lines 187-199
Link Here
|
187 |
fowners lighttpd:lighttpd /var/l{ib,og}/lighttpd |
170 |
fowners lighttpd:lighttpd /var/l{ib,og}/lighttpd |
188 |
fperms 0750 /var/l{ib,og}/lighttpd |
171 |
fperms 0750 /var/l{ib,og}/lighttpd |
189 |
|
172 |
|
|
|
173 |
#spawn-fcgi is installed by a separate package |
174 |
rm -f "${D}"/usr/bin/spawn-fcgi "${D}"/usr/share/man/man1/spawn-fcgi.* |
175 |
|
190 |
use minimal && remove_non_essential |
176 |
use minimal && remove_non_essential |
191 |
} |
177 |
} |
192 |
|
178 |
|
193 |
pkg_postinst () { |
179 |
pkg_postinst () { |
194 |
echo |
180 |
echo |
195 |
if [[ -f ${ROOT}etc/conf.d/spawn-fcgi.conf ]] ; then |
181 |
if [[ -f ${ROOT}etc/conf.d/spawn-fcgi.conf ]] ; then |
196 |
einfo "spawn-fcgi is now included with lighttpd" |
182 |
einfo "spawn-fcgi is now provided by www-servers/spawn-fcgi." |
197 |
einfo "spawn-fcgi's init script configuration is now located" |
183 |
einfo "spawn-fcgi's init script configuration is now located" |
198 |
einfo "at /etc/conf.d/spawn-fcgi." |
184 |
einfo "at /etc/conf.d/spawn-fcgi." |
199 |
echo |
185 |
echo |
Lines 206-214
Link Here
|
206 |
ebeep 5 |
192 |
ebeep 5 |
207 |
fi |
193 |
fi |
208 |
|
194 |
|
209 |
if use fam ; then |
195 |
if use fastcgi; then |
210 |
einfo "Remember to re-emerge lighttpd should you switch from" |
196 |
ewarn "As of lighttpd-1.4.22, spawn-fcgi is provided by the separate" |
211 |
einfo "app-admin/famd to app-admin/gamin or vice versa." |
197 |
ewarn " www-servers/spawn-fcgi package." |
|
|
198 |
ewarn "It features a new more featurefull init script - please migrate" |
199 |
ewarn "your configuration if you have used spawn-fcgi!" |
212 |
fi |
200 |
fi |
213 |
echo |
201 |
|
|
|
202 |
ewarn "The logging-to-pipe patch has been rejected by upstream and has" |
203 |
ewarn "consequently been dropped from the Gentoo ebuild. Please adjust" |
204 |
ewarn "your configuration, if you used pipe logging." |
214 |
} |
205 |
} |