Gentoo Archives: gentoo-commits

From: "Michał Górny" <mgorny@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: net-irc/atheme-services/, net-irc/atheme-services/files/
Date: Sat, 02 Sep 2017 08:45:32
Message-Id: 1504341921.bd0cdb2fe6e110d38bd00ee32265433960edda69.mgorny@gentoo
1 commit: bd0cdb2fe6e110d38bd00ee32265433960edda69
2 Author: Wade Cline <wadecline <AT> hotmail <DOT> com>
3 AuthorDate: Fri Jun 23 02:56:55 2017 +0000
4 Commit: Michał Górny <mgorny <AT> gentoo <DOT> org>
5 CommitDate: Sat Sep 2 08:45:21 2017 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=bd0cdb2f
7
8 net-irc/atheme-services: New package.
9
10 Bug: https://bugs.gentoo.org/454840
11 Bug: https://bugs.gentoo.org/520490
12 Bug: https://bugs.gentoo.org/574062
13 Bug: https://bugs.gentoo.org/581960
14 Closes: https://github.com/gentoo/gentoo/pull/5014
15
16 net-irc/atheme-services/Manifest | 1 +
17 .../atheme-services/atheme-services-7.2.9.ebuild | 89 ++++++++++++++++++++++
18 .../atheme-services-7.2.9-configure-logdir.patch | 25 ++++++
19 .../files/atheme-services-7.2.9-fix-docdir.patch | 13 ++++
20 .../atheme-services/files/atheme-services.initd | 27 +++++++
21 net-irc/atheme-services/metadata.xml | 18 +++++
22 6 files changed, 173 insertions(+)
23
24 diff --git a/net-irc/atheme-services/Manifest b/net-irc/atheme-services/Manifest
25 new file mode 100644
26 index 00000000000..bb730b17086
27 --- /dev/null
28 +++ b/net-irc/atheme-services/Manifest
29 @@ -0,0 +1 @@
30 +DIST atheme-services-7.2.9.tar.bz2 1179582 SHA256 a87a046aa73fc4a97a11d41cc08c60b835135ba20bb173ca888b40e0d6b54b27 SHA512 8852bcf4746ad3b8814e2e7ae8b435c538b442f26f6cf8479087d115c0c4d6877ea864f9e19ccaa9ae93ea8a116cfa53d1f22846fffb783f78bfad8e95fd26f7 WHIRLPOOL 2b5ceb38b196567eb64ac11d0866b209b5f0ed00f1ee4c387dde2214bb3ff540996822d9843d7b32c6f0d908b80ca4c5edab7d1ee96e89a0ed59ab9333baf84b
31
32 diff --git a/net-irc/atheme-services/atheme-services-7.2.9.ebuild b/net-irc/atheme-services/atheme-services-7.2.9.ebuild
33 new file mode 100644
34 index 00000000000..70684a5915f
35 --- /dev/null
36 +++ b/net-irc/atheme-services/atheme-services-7.2.9.ebuild
37 @@ -0,0 +1,89 @@
38 +# Copyright 1999-2017 Gentoo Foundation
39 +# Distributed under the terms of the GNU General Public License v2
40 +
41 +EAPI=6
42 +
43 +inherit flag-o-matic perl-functions user
44 +
45 +DESCRIPTION="A portable and secure set of open-source and modular IRC services"
46 +HOMEPAGE="https://github.com/atheme/atheme"
47 +SRC_URI="https://github.com/atheme/atheme/releases/download/v${PV}/atheme-${PV}.tar.bz2 -> ${P}.tar.bz2"
48 +
49 +LICENSE="BSD"
50 +SLOT="0"
51 +KEYWORDS="~amd64"
52 +IUSE="cracklib largenet ldap nls +pcre perl profile ssl"
53 +S="${WORKDIR}/atheme-${PV}"
54 +
55 +RDEPEND=">=dev-libs/libmowgli-2.1.0:0
56 + cracklib? ( sys-libs/cracklib )
57 + ldap? ( net-nds/openldap )
58 + perl? ( dev-lang/perl )
59 + pcre? ( dev-libs/libpcre )
60 + ssl? ( dev-libs/openssl:0= )"
61 +DEPEND="${RDEPEND}
62 + virtual/pkgconfig"
63 +
64 +PATCHES=( "${FILESDIR}"/${P}-fix-docdir.patch
65 + "${FILESDIR}"/${P}-configure-logdir.patch)
66 +
67 +pkg_setup() {
68 + enewgroup ${PN}
69 + enewuser ${PN} -1 -1 /var/lib/atheme ${PN}
70 +}
71 +
72 +src_configure() {
73 + # perl scriping module support is also broken in 7.0.0. Yay for QA failures.
74 + econf \
75 + --sysconfdir="${EPREFIX}"/etc/${PN} \
76 + --localstatedir="${EPREFIX}"/var \
77 + --enable-fhs-paths \
78 + --disable-warnings \
79 + --enable-contrib \
80 + $(use_enable largenet large-net) \
81 + $(use_with cracklib) \
82 + $(use_with ldap) \
83 + $(use_enable nls) \
84 + $(use_enable profile) \
85 + $(use_with pcre) \
86 + $(use_with perl) \
87 + $(use_enable ssl)
88 +}
89 +
90 +src_compile() {
91 + emake V=1
92 +}
93 +
94 +src_install() {
95 + default
96 +
97 + insinto /etc/${PN}
98 + for conf in dist/*.example; do
99 + # The .cron file isn't meant to live in /etc/${PN}, so only
100 + # install a .example version.
101 + [[ ${conf} == *cron* ]] && continue
102 +
103 + local confdest=${conf##*/}
104 + newins ${conf} ${confdest%.example}
105 + done
106 +
107 + fowners -R 0:${PN} /etc/${PN}
108 + keepdir /var/{lib,log}/atheme
109 + fowners ${PN}:${PN} /var/{lib,log}/atheme
110 + fperms -R go-w,o-rx /etc/${PN}
111 + fperms 750 /etc/${PN} /var/{lib,log}/atheme
112 +
113 + newinitd "${FILESDIR}"/${PN}.initd ${PN}
114 + mv "${ED}"/usr/bin/{,atheme-}dbverify || die
115 +
116 + # contributed scripts and such:
117 + docinto contrib
118 + dodoc contrib/*.{c,pl,php,py,rb}
119 +
120 + use perl && perl_domodule -r contrib/Atheme{,.pm}
121 +
122 + rm "${ED%/}/usr/share/doc/${PF}/WINDOWS" || die
123 +
124 + # Bug #454840 #520490
125 + rm -rf "${ED%/}/var/run" || die
126 +}
127
128 diff --git a/net-irc/atheme-services/files/atheme-services-7.2.9-configure-logdir.patch b/net-irc/atheme-services/files/atheme-services-7.2.9-configure-logdir.patch
129 new file mode 100644
130 index 00000000000..d57af2d9f44
131 --- /dev/null
132 +++ b/net-irc/atheme-services/files/atheme-services-7.2.9-configure-logdir.patch
133 @@ -0,0 +1,25 @@
134 +diff --git a/dist/atheme.conf.example b/dist/atheme.conf.example
135 +index ac3ed54dd..be1c2db50 100644
136 +--- a/dist/atheme.conf.example
137 ++++ b/dist/atheme.conf.example
138 +@@ -1909,17 +1909,17 @@ ldap {
139 + * This block logs all account and channel registrations and drops,
140 + * and account and channel setting changes to var/account.log.
141 + */
142 +-logfile "var/account.log" { register; set; };
143 ++logfile "/var/log/atheme/account.log" { register; set; };
144 +
145 + /*
146 + * This block logs all command use to var/commands.log.
147 + */
148 +-logfile "var/commands.log" { commands; };
149 ++logfile "/var/log/atheme/commands.log" { commands; };
150 +
151 + /*
152 + * This block logs all security auditing information.
153 + */
154 +-logfile "var/audit.log" { denycmd; };
155 ++logfile "/var/log/atheme/audit.log" { denycmd; };
156 +
157 + /*
158 + * You can log to IRC channels, and even split it by category, too.
159
160 diff --git a/net-irc/atheme-services/files/atheme-services-7.2.9-fix-docdir.patch b/net-irc/atheme-services/files/atheme-services-7.2.9-fix-docdir.patch
161 new file mode 100644
162 index 00000000000..e7d4bb2695f
163 --- /dev/null
164 +++ b/net-irc/atheme-services/files/atheme-services-7.2.9-fix-docdir.patch
165 @@ -0,0 +1,13 @@
166 +diff --git a/extra.mk.in b/extra.mk.in
167 +index 39053e48a..e47b27246 100644
168 +--- a/extra.mk.in
169 ++++ b/extra.mk.in
170 +@@ -82,7 +82,7 @@ libdir ?= @libdir@
171 + CFLAGS ?= @CFLAGS@
172 + INSTALL_LIB ?= @INSTALL_LIB@
173 + RUNDIR ?= @RUNDIR@
174 +-DOCDIR ?= @DOCDIR@
175 ++DOCDIR ?= @docdir@
176 + localstatedir ?= @localstatedir@
177 + docdir ?= @docdir@
178 + GREP ?= @GREP@
179
180 diff --git a/net-irc/atheme-services/files/atheme-services.initd b/net-irc/atheme-services/files/atheme-services.initd
181 new file mode 100644
182 index 00000000000..46a868380aa
183 --- /dev/null
184 +++ b/net-irc/atheme-services/files/atheme-services.initd
185 @@ -0,0 +1,27 @@
186 +#!/sbin/openrc-run
187 +# Copyright 1999-2017 Gentoo Foundation
188 +# Distributed under the terms of the GNU General Public License v2
189 +
190 +extra_started_commands="reload"
191 +
192 +command="/usr/bin/atheme-services"
193 +command_user="atheme-services"
194 +pidfile="/var/run/atheme/atheme.pid"
195 +
196 +name="Atheme IRC Services"
197 +
198 +depend() {
199 + need net
200 + use ircd
201 + provide irc-services
202 +}
203 +
204 +start_pre() {
205 + checkpath -d "/var/run/atheme" -o atheme-services
206 +}
207 +
208 +reload() {
209 + ebegin "Reloading ${SVCNAME}"
210 + start-stop-daemon --signal HUP --pidfile "${pidfile}"
211 + eend $?
212 +}
213
214 diff --git a/net-irc/atheme-services/metadata.xml b/net-irc/atheme-services/metadata.xml
215 new file mode 100644
216 index 00000000000..1056f0f4fb2
217 --- /dev/null
218 +++ b/net-irc/atheme-services/metadata.xml
219 @@ -0,0 +1,18 @@
220 +<?xml version="1.0" encoding="UTF-8"?>
221 +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
222 +<pkgmetadata>
223 + <use>
224 + <flag name="cracklib">Enable nickserv/cracklib module for enforcing strong account passwords</flag>
225 + <flag name="largenet">Enable support/tweaks for large networks</flag>
226 + <flag name="ldap">Enable ldap-backed authentication module</flag>
227 + <flag name="perl">Install a perl module which wraps around the services' XML-RPC interface</flag>
228 + </use>
229 + <maintainer type="person">
230 + <email>wadecline@×××××××.com</email>
231 + <name>Wade Cline</name>
232 + </maintainer>
233 + <maintainer type="project">
234 + <email>proxy-maint@g.o</email>
235 + <name>Proxy Maintainers</name>
236 + </maintainer>
237 +</pkgmetadata>