Gentoo Archives: gentoo-commits

From: William Hubbs <williamh@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: www-servers/boa/, www-servers/boa/files/
Date: Fri, 29 Jan 2016 17:15:57
Message-Id: 1454087465.d853297bef8a0f8b816863f7584b9a5d243bc188.williamh@gentoo
1 commit: d853297bef8a0f8b816863f7584b9a5d243bc188
2 Author: William Hubbs <williamh <AT> gentoo <DOT> org>
3 AuthorDate: Fri Jan 29 17:08:59 2016 +0000
4 Commit: William Hubbs <williamh <AT> gentoo <DOT> org>
5 CommitDate: Fri Jan 29 17:11:05 2016 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d853297b
7
8 www-servers/boa: revision bump to fix OpenRC script
9
10 https://bugs.gentoo.org/show_bug.cgi?id=571448
11
12 www-servers/boa/boa-0.94.14_rc21-r2.ebuild | 63 ++++++++++++++++++++++++++++++
13 www-servers/boa/files/boa.conf | 6 +++
14 www-servers/boa/files/boa.initd | 29 ++++++++++++++
15 3 files changed, 98 insertions(+)
16
17 diff --git a/www-servers/boa/boa-0.94.14_rc21-r2.ebuild b/www-servers/boa/boa-0.94.14_rc21-r2.ebuild
18 new file mode 100644
19 index 0000000..9c9a390
20 --- /dev/null
21 +++ b/www-servers/boa/boa-0.94.14_rc21-r2.ebuild
22 @@ -0,0 +1,63 @@
23 +# Copyright 1999-2013 Gentoo Foundation
24 +# Distributed under the terms of the GNU General Public License v2
25 +# $Id$
26 +
27 +EAPI=5
28 +inherit eutils systemd
29 +
30 +MY_P=${P/_/}
31 +DESCRIPTION="A very small and very fast http daemon"
32 +SRC_URI="http://www.boa.org/${MY_P}.tar.gz"
33 +HOMEPAGE="http://www.boa.org/"
34 +
35 +KEYWORDS="~amd64 ~mips ~ppc ~sparc ~x86"
36 +LICENSE="GPL-2"
37 +SLOT="0"
38 +IUSE="doc"
39 +
40 +RDEPEND=""
41 +DEPEND="sys-devel/bison
42 + sys-devel/flex
43 + doc? ( virtual/latex-base )"
44 +
45 +S=${WORKDIR}/${MY_P}
46 +
47 +src_prepare() {
48 + epatch "${FILESDIR}"/${P}-texi.patch
49 + epatch "${FILESDIR}"/${P}-ENOSYS.patch
50 +}
51 +
52 +src_compile() {
53 + default
54 +
55 + use doc || sed -i -e '/^all:/s/boa.dvi //' docs/Makefile
56 + emake docs
57 +}
58 +
59 +src_install() {
60 + dosbin src/boa
61 + doman docs/boa.8
62 + doinfo docs/boa.info
63 + if use doc; then
64 + dodoc docs/boa.html
65 + dodoc docs/boa_banner.png
66 + dodoc docs/boa.dvi
67 + fi
68 +
69 + keepdir /var/log/boa
70 + keepdir /var/www/localhost/htdocs
71 + keepdir /var/www/localhost/cgi-bin
72 + keepdir /var/www/localhost/icons
73 +
74 + newinitd "${FILESDIR}"/boa.initd boa
75 + newconfd "${FILESDIR}"/boa.conf.d boa
76 +
77 + systemd_dounit "${FILESDIR}"/boa.service
78 +
79 + exeinto /usr/lib/boa
80 + doexe src/boa_indexer
81 +
82 + insinto /etc/boa
83 + doins "${FILESDIR}"/boa.conf
84 + doins "${FILESDIR}"/mime.types
85 +}
86
87 diff --git a/www-servers/boa/files/boa.conf b/www-servers/boa/files/boa.conf
88 index 186fcfa..7402deb 100644
89 --- a/www-servers/boa/files/boa.conf
90 +++ b/www-servers/boa/files/boa.conf
91 @@ -185,3 +185,9 @@ Alias /icons /var/www/localhost/icons
92
93 ScriptAlias /cgi-bin/ /var/www/localhost/cgi-bin/
94
95 +# Do not remove this line if you are using sys-apps/OpenRC to manage the
96 +# boa server.
97 +# A PidFile setting is needed in order for OpenRC to stop boa, and it
98 +# must match the setting in the service script.
99 +
100 +PidFile /run/boa.pid
101
102 diff --git a/www-servers/boa/files/boa.initd b/www-servers/boa/files/boa.initd
103 new file mode 100644
104 index 0000000..dd0242a
105 --- /dev/null
106 +++ b/www-servers/boa/files/boa.initd
107 @@ -0,0 +1,29 @@
108 +#!/sbin/openrc-run
109 +# Copyright 1999-2004 Gentoo Foundation
110 +# Distributed under the terms of the GNU General Public License v2
111 +# $Id$
112 +
113 +# NB: Standard config is in /etc/boa/boa.conf
114 +# NB: Arguments to pass to boa are in /etc/conf.d/boa
115 +
116 +command=/usr/sbin/boa
117 +command_args="${BOA_OPTS}"
118 +pidfile="/run/boa.pid"
119 +
120 +depend() {
121 + need net
122 +}
123 +
124 +start_pre() {
125 + if [ -e /etc/conf.d/boa ] && [ -n "${BOA_OPTS}" ]; then
126 + SR="$(echo ${BOA_OPTS} | awk '{ FS = " " } { print $2 }')"
127 + else
128 + SR=/etc/boa
129 + fi
130 +
131 + if [ ! -e ${SR}/boa.conf ] ; then
132 + eerror "You need a ${SR}/boa.conf to run Boa"
133 + eerror "There is a sample file in /usr/share/docs/boa"
134 + return 1
135 + fi
136 +}