Gentoo Archives: gentoo-commits

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