Gentoo Archives: gentoo-commits

From: "Pacho Ramos (pacho)" <pacho@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in www-servers/lighttpd: lighttpd-1.4.35-r1.ebuild ChangeLog
Date: Fri, 02 May 2014 10:58:03
Message-Id: 20140502105757.D5D8C2004C@flycatcher.gentoo.org
1 pacho 14/05/02 10:57:57
2
3 Modified: ChangeLog
4 Added: lighttpd-1.4.35-r1.ebuild
5 Log:
6 Handle systemd in logrotate file (#508526 by SN)
7
8 (Portage version: 2.2.10/cvs/Linux x86_64, signed Manifest commit with key A188FBD4)
9
10 Revision Changes Path
11 1.330 www-servers/lighttpd/ChangeLog
12
13 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/www-servers/lighttpd/ChangeLog?rev=1.330&view=markup
14 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/www-servers/lighttpd/ChangeLog?rev=1.330&content-type=text/plain
15 diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/www-servers/lighttpd/ChangeLog?r1=1.329&r2=1.330
16
17 Index: ChangeLog
18 ===================================================================
19 RCS file: /var/cvsroot/gentoo-x86/www-servers/lighttpd/ChangeLog,v
20 retrieving revision 1.329
21 retrieving revision 1.330
22 diff -u -r1.329 -r1.330
23 --- ChangeLog 21 Apr 2014 10:50:09 -0000 1.329
24 +++ ChangeLog 2 May 2014 10:57:57 -0000 1.330
25 @@ -1,6 +1,12 @@
26 # ChangeLog for www-servers/lighttpd
27 # Copyright 1999-2014 Gentoo Foundation; Distributed under the GPL v2
28 -# $Header: /var/cvsroot/gentoo-x86/www-servers/lighttpd/ChangeLog,v 1.329 2014/04/21 10:50:09 ago Exp $
29 +# $Header: /var/cvsroot/gentoo-x86/www-servers/lighttpd/ChangeLog,v 1.330 2014/05/02 10:57:57 pacho Exp $
30 +
31 +*lighttpd-1.4.35-r1 (02 May 2014)
32 +
33 + 02 May 2014; Pacho Ramos <pacho@g.o> +files/lighttpd.logrotate-r1,
34 + +lighttpd-1.4.35-r1.ebuild, files/lighttpd.service:
35 + Handle systemd in logrotate file (#508526 by SN)
36
37 21 Apr 2014; Agostino Sarubbo <ago@g.o> lighttpd-1.4.35.ebuild:
38 Stable for alpha, wrt bug #504330
39
40
41
42 1.1 www-servers/lighttpd/lighttpd-1.4.35-r1.ebuild
43
44 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/www-servers/lighttpd/lighttpd-1.4.35-r1.ebuild?rev=1.1&view=markup
45 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/www-servers/lighttpd/lighttpd-1.4.35-r1.ebuild?rev=1.1&content-type=text/plain
46
47 Index: lighttpd-1.4.35-r1.ebuild
48 ===================================================================
49 # Copyright 1999-2014 Gentoo Foundation
50 # Distributed under the terms of the GNU General Public License v2
51 # $Header: /var/cvsroot/gentoo-x86/www-servers/lighttpd/lighttpd-1.4.35-r1.ebuild,v 1.1 2014/05/02 10:57:57 pacho Exp $
52
53 EAPI="5"
54 inherit base autotools eutils depend.php readme.gentoo user systemd
55
56 DESCRIPTION="Lightweight high-performance web server"
57 HOMEPAGE="http://www.lighttpd.net/"
58 SRC_URI="http://download.lighttpd.net/lighttpd/releases-1.4.x/${P}.tar.bz2"
59
60 LICENSE="BSD GPL-2"
61 SLOT="0"
62 KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sh ~sparc ~x86 ~sparc-fbsd ~x86-fbsd"
63 IUSE="bzip2 doc fam gdbm ipv6 kerberos ldap libev lua minimal mmap memcache mysql pcre php rrdtool selinux ssl test uploadprogress webdav xattr zlib"
64
65 REQUIRED_USE="kerberos? ( ssl )"
66
67 RDEPEND="
68 bzip2? ( app-arch/bzip2 )
69 fam? ( virtual/fam )
70 gdbm? ( sys-libs/gdbm )
71 ldap? ( >=net-nds/openldap-2.1.26 )
72 libev? ( >=dev-libs/libev-4.01 )
73 lua? ( >=dev-lang/lua-5.1 )
74 memcache? ( dev-libs/libmemcache )
75 mysql? ( >=virtual/mysql-4.0 )
76 pcre? ( >=dev-libs/libpcre-3.1 )
77 php? ( dev-lang/php[cgi] )
78 rrdtool? ( net-analyzer/rrdtool )
79 selinux? ( sec-policy/selinux-apache )
80 ssl? ( >=dev-libs/openssl-0.9.7[kerberos?] )
81 webdav? (
82 dev-libs/libxml2
83 >=dev-db/sqlite-3
84 sys-fs/e2fsprogs
85 )
86 xattr? ( kernel_linux? ( sys-apps/attr ) )
87 zlib? ( >=sys-libs/zlib-1.1 )"
88
89 DEPEND="${RDEPEND}
90 virtual/pkgconfig
91 doc? ( dev-python/docutils )
92 test? (
93 virtual/perl-Test-Harness
94 dev-libs/fcgi
95 )"
96
97 # update certain parts of lighttpd.conf based on conditionals
98 update_config() {
99 local config="${D}/etc/lighttpd/lighttpd.conf"
100
101 # enable php/mod_fastcgi settings
102 use php && { sed -i -e 's|#.*\(include.*fastcgi.*$\)|\1|' ${config} || die; }
103
104 # enable stat() caching
105 use fam && { sed -i -e 's|#\(.*stat-cache.*$\)|\1|' ${config} || die; }
106
107 # automatically listen on IPv6 if built with USE=ipv6. Bug #234987
108 use ipv6 && { sed -i -e 's|# server.use-ipv6|server.use-ipv6|' ${config} || die; }
109 }
110
111 # remove non-essential stuff (for USE=minimal)
112 remove_non_essential() {
113 local libdir="${D}/usr/$(get_libdir)/${PN}"
114
115 # text docs
116 use doc || rm -fr "${D}"/usr/share/doc/${PF}/txt
117
118 # non-essential modules
119 rm -f \
120 ${libdir}/mod_{compress,evhost,expire,proxy,scgi,secdownload,simple_vhost,status,setenv,trigger*,usertrack}.*
121
122 # allow users to keep some based on USE flags
123 use pcre || rm -f ${libdir}/mod_{ssi,re{direct,write}}.*
124 use webdav || rm -f ${libdir}/mod_webdav.*
125 use mysql || rm -f ${libdir}/mod_mysql_vhost.*
126 use lua || rm -f ${libdir}/mod_{cml,magnet}.*
127 use rrdtool || rm -f ${libdir}/mod_rrdtool.*
128 use zlib || rm -f ${libdir}/mod_compress.*
129 }
130
131 pkg_setup() {
132 if ! use pcre ; then
133 ewarn "It is highly recommended that you build ${PN}"
134 ewarn "with perl regular expressions support via USE=pcre."
135 ewarn "Otherwise you lose support for some core options such"
136 ewarn "as conditionals and modules such as mod_re{write,direct}"
137 ewarn "and mod_ssi."
138 fi
139 if use mmap; then
140 ewarn "You have enabled the mmap option. This option may allow"
141 ewarn "local users to trigger SIGBUG crashes. Use this option"
142 ewarn "with EXTRA care."
143 fi
144 enewgroup lighttpd
145 enewuser lighttpd -1 -1 /var/www/localhost/htdocs lighttpd
146
147 DOC_CONTENTS="IPv6 migration guide:\n
148 http://redmine.lighttpd.net/projects/lighttpd/wiki/IPv6-Config"
149 }
150
151 src_prepare() {
152 base_src_prepare
153 #dev-python/docutils installs rst2html.py not rst2html
154 sed -i -e 's|\(rst2html\)|\1.py|g' doc/outdated/Makefile.am || \
155 die "sed doc/Makefile.am failed"
156 # Experimental patch for progress bar. Bug #380093
157 if use uploadprogress; then
158 epatch "${FILESDIR}"/${PN}-1.4.29-mod_uploadprogress.patch
159 fi
160 eautoreconf
161 }
162
163 src_configure() {
164 econf --libdir=/usr/$(get_libdir)/${PN} \
165 --enable-lfs \
166 $(use_enable ipv6) \
167 $(use_enable mmap) \
168 $(use_with bzip2) \
169 $(use_with fam) \
170 $(use_with gdbm) \
171 $(use_with kerberos kerberos5) \
172 $(use_with ldap) \
173 $(use_with libev) \
174 $(use_with lua) \
175 $(use_with memcache) \
176 $(use_with mysql) \
177 $(use_with pcre) \
178 $(use_with ssl openssl) \
179 $(use_with webdav webdav-props) \
180 $(use_with webdav webdav-locks) \
181 $(use_with xattr attr) \
182 $(use_with zlib)
183 }
184
185 src_compile() {
186 emake
187
188 if use doc ; then
189 einfo "Building HTML documentation"
190 cd doc || die
191 emake html
192 fi
193 }
194
195 src_test() {
196 if [[ ${EUID} -eq 0 ]]; then
197 default_src_test
198 else
199 ewarn "test skipped, please re-run as root if you wish to test ${PN}"
200 fi
201 }
202
203 src_install() {
204 emake DESTDIR="${D}" install
205
206 # init script stuff
207 newinitd "${FILESDIR}"/lighttpd.initd lighttpd
208 newconfd "${FILESDIR}"/lighttpd.confd lighttpd
209 use fam && has_version app-admin/fam && \
210 { sed -i 's/after famd/need famd/g' "${D}"/etc/init.d/lighttpd || die; }
211
212 # configs
213 insinto /etc/lighttpd
214 doins "${FILESDIR}"/conf/lighttpd.conf
215 doins "${FILESDIR}"/conf/mime-types.conf
216 doins "${FILESDIR}"/conf/mod_cgi.conf
217 doins "${FILESDIR}"/conf/mod_fastcgi.conf
218
219 # update lighttpd.conf directives based on conditionals
220 update_config
221
222 # docs
223 dodoc AUTHORS README NEWS doc/scripts/*.sh
224 newdoc doc/config//lighttpd.conf lighttpd.conf.distrib
225 use ipv6 && readme.gentoo_create_doc
226
227 use doc && dohtml -r doc/*
228
229 docinto txt
230 dodoc doc/outdated/*.txt
231
232 # logrotate
233 insinto /etc/logrotate.d
234 newins "${FILESDIR}"/lighttpd.logrotate-r1 lighttpd
235
236 keepdir /var/l{ib,og}/lighttpd /var/www/localhost/htdocs
237 fowners lighttpd:lighttpd /var/l{ib,og}/lighttpd
238 fperms 0750 /var/l{ib,og}/lighttpd
239
240 #spawn-fcgi may optionally be installed via www-servers/spawn-fcgi
241 rm -f "${D}"/usr/bin/spawn-fcgi "${D}"/usr/share/man/man1/spawn-fcgi.*
242
243 use minimal && remove_non_essential
244
245 systemd_dounit "${FILESDIR}/${PN}.service"
246 systemd_dotmpfilesd "${FILESDIR}/${PN}.tmpfiles.conf"
247 }
248
249 pkg_postinst () {
250 use ipv6 && readme.gentoo_print_elog
251
252 if [[ -f ${ROOT}etc/conf.d/spawn-fcgi.conf ]] ; then
253 einfo "spawn-fcgi is now provided by www-servers/spawn-fcgi."
254 einfo "spawn-fcgi's init script configuration is now located"
255 einfo "at /etc/conf.d/spawn-fcgi."
256 fi
257
258 if [[ -f ${ROOT}etc/lighttpd.conf ]] ; then
259 elog "Gentoo has a customized configuration,"
260 elog "which is now located in /etc/lighttpd. Please migrate your"
261 elog "existing configuration."
262 fi
263
264 if use uploadprogress; then
265 elog "WARNING! mod_uploadprogress is a backported module from the"
266 elog "1.5x-branch, which is not considered stable yet. Please go to"
267 elog "http://redmine.lighttpd.net/wiki/1/Docs:ModUploadProgress"
268 elog "for more information. This configuration also is NOT supported"
269 elog "by upstream, so please refrain from reporting bugs. You have"
270 elog "been warned!"
271 fi
272 }