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