Gentoo Archives: gentoo-commits

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