1 |
commit: 8b92817a6168637698d7b3b61f16b93d60c3ceda |
2 |
Author: Mikle Kolyada <zlogene <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sat Apr 28 19:41:59 2018 +0000 |
4 |
Commit: Mikle Kolyada <zlogene <AT> gentoo <DOT> org> |
5 |
CommitDate: Sat Apr 28 19:42:21 2018 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8b92817a |
7 |
|
8 |
www-servers/lighttpd: revbump (switch stable to memcached + cosmetic fixes) |
9 |
|
10 |
Package-Manager: Portage-2.3.24, Repoman-2.3.6 |
11 |
|
12 |
www-servers/lighttpd/lighttpd-1.4.45-r1.ebuild | 219 +++++++++++++++++++++++++ |
13 |
1 file changed, 219 insertions(+) |
14 |
|
15 |
diff --git a/www-servers/lighttpd/lighttpd-1.4.45-r1.ebuild b/www-servers/lighttpd/lighttpd-1.4.45-r1.ebuild |
16 |
new file mode 100644 |
17 |
index 00000000000..6bf3425fb4a |
18 |
--- /dev/null |
19 |
+++ b/www-servers/lighttpd/lighttpd-1.4.45-r1.ebuild |
20 |
@@ -0,0 +1,219 @@ |
21 |
+# Copyright 1999-2018 Gentoo Foundation |
22 |
+# Distributed under the terms of the GNU General Public License v2 |
23 |
+ |
24 |
+EAPI=6 |
25 |
+ |
26 |
+inherit autotools readme.gentoo-r1 systemd user |
27 |
+ |
28 |
+DESCRIPTION="Lightweight high-performance web server" |
29 |
+HOMEPAGE="http://www.lighttpd.net/" |
30 |
+SRC_URI="http://download.lighttpd.net/lighttpd/releases-1.4.x/${P}.tar.xz" |
31 |
+ |
32 |
+LICENSE="BSD GPL-2" |
33 |
+SLOT="0" |
34 |
+KEYWORDS="alpha amd64 arm ~arm64 hppa ia64 ~mips ppc ppc64 ~sh sparc x86 ~x86-fbsd" |
35 |
+IUSE="bzip2 doc fam gdbm ipv6 kerberos ldap libev libressl lua minimal mmap memcached mysql pcre php rrdtool selinux ssl test webdav xattr zlib" |
36 |
+ |
37 |
+REQUIRED_USE="kerberos? ( ssl !libressl )" |
38 |
+ |
39 |
+CDEPEND=" |
40 |
+ bzip2? ( app-arch/bzip2 ) |
41 |
+ fam? ( virtual/fam ) |
42 |
+ gdbm? ( sys-libs/gdbm ) |
43 |
+ ldap? ( >=net-nds/openldap-2.1.26 ) |
44 |
+ libev? ( >=dev-libs/libev-4.01 ) |
45 |
+ lua? ( >=dev-lang/lua-5.1:= ) |
46 |
+ memcached? ( dev-libs/libmemcached ) |
47 |
+ mysql? ( >=virtual/mysql-4.0 ) |
48 |
+ pcre? ( >=dev-libs/libpcre-3.1 ) |
49 |
+ php? ( dev-lang/php:*[cgi] ) |
50 |
+ rrdtool? ( net-analyzer/rrdtool ) |
51 |
+ ssl? ( |
52 |
+ !libressl? ( >=dev-libs/openssl-0.9.7:0=[kerberos?] ) |
53 |
+ libressl? ( dev-libs/libressl:= ) |
54 |
+ ) |
55 |
+ webdav? ( |
56 |
+ dev-libs/libxml2 |
57 |
+ >=dev-db/sqlite-3 |
58 |
+ sys-fs/e2fsprogs |
59 |
+ ) |
60 |
+ xattr? ( kernel_linux? ( sys-apps/attr ) ) |
61 |
+ zlib? ( >=sys-libs/zlib-1.1 )" |
62 |
+ |
63 |
+DEPEND="${CDEPEND} |
64 |
+ virtual/pkgconfig |
65 |
+ doc? ( dev-python/docutils ) |
66 |
+ test? ( |
67 |
+ virtual/perl-Test-Harness |
68 |
+ dev-libs/fcgi |
69 |
+ )" |
70 |
+ |
71 |
+RDEPEND="${CDEPEND} |
72 |
+ selinux? ( sec-policy/selinux-apache ) |
73 |
+" |
74 |
+ |
75 |
+# update certain parts of lighttpd.conf based on conditionals |
76 |
+update_config() { |
77 |
+ local config="${D}/etc/lighttpd/lighttpd.conf" |
78 |
+ |
79 |
+ # enable php/mod_fastcgi settings |
80 |
+ use php && { sed -i -e 's|#.*\(include.*fastcgi.*$\)|\1|' ${config} || die; } |
81 |
+ |
82 |
+ # enable stat() caching |
83 |
+ use fam && { sed -i -e 's|#\(.*stat-cache.*$\)|\1|' ${config} || die; } |
84 |
+ |
85 |
+ # automatically listen on IPv6 if built with USE=ipv6. Bug #234987 |
86 |
+ use ipv6 && { sed -i -e 's|# server.use-ipv6|server.use-ipv6|' ${config} || die; } |
87 |
+} |
88 |
+ |
89 |
+# remove non-essential stuff (for USE=minimal) |
90 |
+remove_non_essential() { |
91 |
+ local libdir="${D}/usr/$(get_libdir)/${PN}" |
92 |
+ |
93 |
+ # text docs |
94 |
+ use doc || rm -fr "${D}"/usr/share/doc/${PF}/txt |
95 |
+ |
96 |
+ # non-essential modules |
97 |
+ rm -f \ |
98 |
+ ${libdir}/mod_{compress,evhost,expire,proxy,scgi,secdownload,simple_vhost,status,setenv,trigger*,usertrack}.* || die |
99 |
+ |
100 |
+ # allow users to keep some based on USE flags |
101 |
+ use pcre || rm -f ${libdir}/mod_{ssi,re{direct,write}}.* |
102 |
+ use webdav || rm -f ${libdir}/mod_webdav.* |
103 |
+ use mysql || rm -f ${libdir}/mod_mysql_vhost.* |
104 |
+ use lua || rm -f ${libdir}/mod_{cml,magnet}.* |
105 |
+ use rrdtool || rm -f ${libdir}/mod_rrdtool.* |
106 |
+ use zlib || rm -f ${libdir}/mod_compress.* |
107 |
+} |
108 |
+ |
109 |
+pkg_setup() { |
110 |
+ if ! use pcre ; then |
111 |
+ ewarn "It is highly recommended that you build ${PN}" |
112 |
+ ewarn "with perl regular expressions support via USE=pcre." |
113 |
+ ewarn "Otherwise you lose support for some core options such" |
114 |
+ ewarn "as conditionals and modules such as mod_re{write,direct}" |
115 |
+ ewarn "and mod_ssi." |
116 |
+ fi |
117 |
+ if use mmap; then |
118 |
+ ewarn "You have enabled the mmap option. This option may allow" |
119 |
+ ewarn "local users to trigger SIGBUG crashes. Use this option" |
120 |
+ ewarn "with EXTRA care." |
121 |
+ fi |
122 |
+ enewgroup lighttpd |
123 |
+ enewuser lighttpd -1 -1 /var/www/localhost/htdocs lighttpd |
124 |
+ |
125 |
+ DOC_CONTENTS="IPv6 migration guide:\n |
126 |
+ http://redmine.lighttpd.net/projects/lighttpd/wiki/IPv6-Config" |
127 |
+} |
128 |
+ |
129 |
+src_prepare() { |
130 |
+ default |
131 |
+ #dev-python/docutils installs rst2html.py not rst2html |
132 |
+ sed -i -e 's|\(rst2html\)|\1.py|g' doc/outdated/Makefile.am || \ |
133 |
+ die "sed doc/Makefile.am failed" |
134 |
+ eautoreconf |
135 |
+} |
136 |
+ |
137 |
+src_configure() { |
138 |
+ econf --libdir=/usr/$(get_libdir)/${PN} \ |
139 |
+ --enable-lfs \ |
140 |
+ $(use_enable ipv6) \ |
141 |
+ $(use_enable mmap) \ |
142 |
+ $(use_with bzip2) \ |
143 |
+ $(use_with fam) \ |
144 |
+ $(use_with gdbm) \ |
145 |
+ $(use_with kerberos krb5) \ |
146 |
+ $(use_with ldap) \ |
147 |
+ $(use_with libev) \ |
148 |
+ $(use_with lua) \ |
149 |
+ $(use_with memcached) \ |
150 |
+ $(use_with mysql) \ |
151 |
+ $(use_with pcre) \ |
152 |
+ $(use_with ssl openssl) \ |
153 |
+ $(use_with webdav webdav-props) \ |
154 |
+ $(use_with webdav webdav-locks) \ |
155 |
+ $(use_with xattr attr) \ |
156 |
+ $(use_with zlib) |
157 |
+} |
158 |
+ |
159 |
+src_compile() { |
160 |
+ emake |
161 |
+ |
162 |
+ if use doc ; then |
163 |
+ einfo "Building HTML documentation" |
164 |
+ cd doc || die |
165 |
+ emake html |
166 |
+ fi |
167 |
+} |
168 |
+ |
169 |
+src_test() { |
170 |
+ if [[ ${EUID} -eq 0 ]]; then |
171 |
+ default_src_test |
172 |
+ else |
173 |
+ ewarn "test skipped, please re-run as root if you wish to test ${PN}" |
174 |
+ fi |
175 |
+} |
176 |
+ |
177 |
+src_install() { |
178 |
+ default |
179 |
+ |
180 |
+ find "${D}" -name '*.la' -delete || die |
181 |
+ |
182 |
+ # init script stuff |
183 |
+ newinitd "${FILESDIR}"/lighttpd.initd lighttpd |
184 |
+ newconfd "${FILESDIR}"/lighttpd.confd lighttpd |
185 |
+ use fam && has_version app-admin/fam && \ |
186 |
+ { sed -i 's/after famd/need famd/g' "${D}"/etc/init.d/lighttpd || die; } |
187 |
+ |
188 |
+ # configs |
189 |
+ insinto /etc/lighttpd |
190 |
+ doins "${FILESDIR}"/conf/lighttpd.conf |
191 |
+ doins "${FILESDIR}"/conf/mime-types.conf |
192 |
+ doins "${FILESDIR}"/conf/mod_cgi.conf |
193 |
+ doins "${FILESDIR}"/conf/mod_fastcgi.conf |
194 |
+ |
195 |
+ # update lighttpd.conf directives based on conditionals |
196 |
+ update_config |
197 |
+ |
198 |
+ # docs |
199 |
+ dodoc AUTHORS README NEWS doc/scripts/*.sh |
200 |
+ newdoc doc/config//lighttpd.conf lighttpd.conf.distrib |
201 |
+ use ipv6 && readme.gentoo_create_doc |
202 |
+ |
203 |
+ use doc && dodoc -r doc |
204 |
+ |
205 |
+ docinto txt |
206 |
+ dodoc doc/outdated/*.txt |
207 |
+ |
208 |
+ # logrotate |
209 |
+ insinto /etc/logrotate.d |
210 |
+ newins "${FILESDIR}"/lighttpd.logrotate-r1 lighttpd |
211 |
+ |
212 |
+ keepdir /var/l{ib,og}/lighttpd /var/www/localhost/htdocs |
213 |
+ fowners lighttpd:lighttpd /var/l{ib,og}/lighttpd |
214 |
+ fperms 0750 /var/l{ib,og}/lighttpd |
215 |
+ |
216 |
+ #spawn-fcgi may optionally be installed via www-servers/spawn-fcgi |
217 |
+ rm -f "${D}"/usr/bin/spawn-fcgi "${D}"/usr/share/man/man1/spawn-fcgi.* || die |
218 |
+ |
219 |
+ use minimal && remove_non_essential |
220 |
+ |
221 |
+ systemd_dounit "${FILESDIR}/${PN}.service" |
222 |
+ systemd_dotmpfilesd "${FILESDIR}/${PN}.tmpfiles.conf" |
223 |
+} |
224 |
+ |
225 |
+pkg_postinst () { |
226 |
+ use ipv6 && readme.gentoo_print_elog |
227 |
+ |
228 |
+ if [[ -f ${ROOT}etc/conf.d/spawn-fcgi.conf ]] ; then |
229 |
+ einfo "spawn-fcgi is now provided by www-servers/spawn-fcgi." |
230 |
+ einfo "spawn-fcgi's init script configuration is now located" |
231 |
+ einfo "at /etc/conf.d/spawn-fcgi." |
232 |
+ fi |
233 |
+ |
234 |
+ if [[ -f ${ROOT}etc/lighttpd.conf ]] ; then |
235 |
+ elog "Gentoo has a customized configuration," |
236 |
+ elog "which is now located in /etc/lighttpd. Please migrate your" |
237 |
+ elog "existing configuration." |
238 |
+ fi |
239 |
+} |