1 |
commit: 63e21e282f012837f026dc15f26474fa9fb509c3 |
2 |
Author: Sam James <sam <AT> gentoo <DOT> org> |
3 |
AuthorDate: Fri Jun 11 00:40:31 2021 +0000 |
4 |
Commit: Sam James <sam <AT> gentoo <DOT> org> |
5 |
CommitDate: Fri Jun 11 00:40:31 2021 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=63e21e28 |
7 |
|
8 |
net-irc/unrealircd: drop 5.0.7, 5.0.7-r1, 5.0.7-r2 |
9 |
|
10 |
Signed-off-by: Sam James <sam <AT> gentoo.org> |
11 |
|
12 |
net-irc/unrealircd/Manifest | 1 - |
13 |
net-irc/unrealircd/unrealircd-5.0.7-r1.ebuild | 172 -------------------------- |
14 |
net-irc/unrealircd/unrealircd-5.0.7-r2.ebuild | 171 ------------------------- |
15 |
net-irc/unrealircd/unrealircd-5.0.7.ebuild | 172 -------------------------- |
16 |
4 files changed, 516 deletions(-) |
17 |
|
18 |
diff --git a/net-irc/unrealircd/Manifest b/net-irc/unrealircd/Manifest |
19 |
index 94582480d27..4d6fe34f8b4 100644 |
20 |
--- a/net-irc/unrealircd/Manifest |
21 |
+++ b/net-irc/unrealircd/Manifest |
22 |
@@ -1,4 +1,3 @@ |
23 |
DIST unrealircd-5.0.6.tar.gz 4975195 BLAKE2B 3ba459e0ec932e9f240825ba9f1fa40e300fe7958f999de86d5653f2e6e4940be8b8da9c885c97bd738abefef601d61da6c4e6c7199c7052d29a74fcf5048828 SHA512 7532e9ab2e039f21796ae813881aec9d34b502ab64efc4323c938232c8901ce882dbcce497ad93df270e4b5fa2e9633c0971f2a6b3213ad458756aea92aa1612 |
24 |
-DIST unrealircd-5.0.7.tar.gz 4995220 BLAKE2B a2996f62b3fe943f9af2cd570866101a501d24f7966378d8e651cf84b9b9d0981fad441b785c6293f4a0668a914cdf191dec52cc6b1e86aac2a51640ca32dbfe SHA512 0b851af26da2ea5d3a04d2ef324d7bd3d3fc820f24d7dfd7e975d6bf1f3954884eb98dc348d291a118d98a214922d3ca1132800381e6f025264856aa06498779 |
25 |
DIST unrealircd-5.0.8.tar.gz 5013231 BLAKE2B 57365a06b8108239ab10f6cff7d4553b08aa428acb5c635c4b9241c3f82459a5aac18c916a4534f3a8fc9ac1fd4c1d9418c7395233603e576eda40c56d81b110 SHA512 45fc0758a870dbb9c3ff55fc7029d1ecff9dcf65680f31ff331f012efbf9c9bffa60a6fe27b9bab69302d26b8293a1089cfaf1c550a3f2802a549f25e4644770 |
26 |
DIST unrealircd-5.0.9.1.tar.gz 5210836 BLAKE2B 1b71c54106a038501782004b183bfc4b148c381150cd293bdbf74f33dd8a244083e7ce55adcf16aee5cd344707d6b1d1843bbf3d83fea0749532f68a954da950 SHA512 1d45be1904c415a60bd5b7e279ee528e0f559207fe763ea8b10a9809a253b0e10d781b8624c85600206a8484bde0ba162c62dc96e12d581d904d483b0b89193a |
27 |
|
28 |
diff --git a/net-irc/unrealircd/unrealircd-5.0.7-r1.ebuild b/net-irc/unrealircd/unrealircd-5.0.7-r1.ebuild |
29 |
deleted file mode 100644 |
30 |
index 5f185b99654..00000000000 |
31 |
--- a/net-irc/unrealircd/unrealircd-5.0.7-r1.ebuild |
32 |
+++ /dev/null |
33 |
@@ -1,172 +0,0 @@ |
34 |
-# Copyright 1999-2021 Gentoo Authors |
35 |
-# Distributed under the terms of the GNU General Public License v2 |
36 |
- |
37 |
-EAPI=7 |
38 |
- |
39 |
-SSL_CERT_MANDATORY=1 |
40 |
-inherit ssl-cert systemd |
41 |
- |
42 |
-DESCRIPTION="An advanced Internet Relay Chat daemon" |
43 |
-HOMEPAGE="https://www.unrealircd.org/" |
44 |
-SRC_URI="https://www.unrealircd.org/downloads/${P}.tar.gz" |
45 |
- |
46 |
-LICENSE="GPL-2" |
47 |
-SLOT="0" |
48 |
-KEYWORDS="~amd64 ~ppc ~x86 ~amd64-linux" |
49 |
-IUSE="class-nofakelag curl +operoverride operoverride-verify +prefixaq showlistmodes" |
50 |
- |
51 |
-RDEPEND=" |
52 |
- acct-group/unrealircd |
53 |
- acct-user/unrealircd |
54 |
- >=app-crypt/argon2-20171227-r1:= |
55 |
- dev-libs/libpcre2 |
56 |
- >=net-dns/c-ares-1.7:= |
57 |
- dev-libs/openssl:0= |
58 |
- curl? ( net-misc/curl[adns] ) |
59 |
-" |
60 |
-DEPEND="${RDEPEND}" |
61 |
-BDEPEND="virtual/pkgconfig" |
62 |
- |
63 |
-DOCS=( doc/{Authors,Donation,RELEASE-NOTES.md,tao.of.irc,technical/,translations.txt} ) |
64 |
- |
65 |
-src_prepare() { |
66 |
- # QA check against bundled pkgs |
67 |
- rm -r extras || die |
68 |
- |
69 |
- # building third-party modules (which we don't do) cause a sandbox violation |
70 |
- # bug 704444 |
71 |
- echo "" > src/buildmod || die |
72 |
- |
73 |
- sed -e 's/$(MODULEFLAGS)/$(LDFLAGS) &/' -i src/modules/{,*/}Makefile.in || die |
74 |
- |
75 |
- if use class-nofakelag; then |
76 |
- sed -i -e 's:^//#undef\( FAKELAG_CONFIGURABLE\):#define\1:' include/config.h || die |
77 |
- fi |
78 |
- |
79 |
- eapply_user |
80 |
-} |
81 |
- |
82 |
-src_configure() { |
83 |
- # Default value for privatelibdir adds a build path to -Wl,-rpath. |
84 |
- econf \ |
85 |
- --with-bindir="${EPREFIX}"/usr/bin \ |
86 |
- --with-cachedir="${EPREFIX}"/var/lib/${PN} \ |
87 |
- --with-confdir="${EPREFIX}"/etc/${PN} \ |
88 |
- --with-datadir="${EPREFIX}"/var/lib/${PN} \ |
89 |
- --with-docdir="${EPREFIX}"/usr/share/doc/${PF} \ |
90 |
- --with-logdir="${EPREFIX}"/var/log/${PN} \ |
91 |
- --with-modulesdir="${EPREFIX}"/usr/"$(get_libdir)"/${PN}/modules \ |
92 |
- --without-privatelibdir \ |
93 |
- --with-pidfile="${EPREFIX}"/run/${PN}/ircd.pid \ |
94 |
- --with-tmpdir="${EPREFIX}"/var/lib/${PN}/tmp \ |
95 |
- --with-maxconnections=1024 \ |
96 |
- --with-nick-history=2000 \ |
97 |
- --with-permissions=0640 \ |
98 |
- --with-system-argon2 \ |
99 |
- --with-system-cares \ |
100 |
- --with-system-pcre2 \ |
101 |
- --enable-dynamic-linking \ |
102 |
- --enable-ssl="${EPREFIX}"/usr \ |
103 |
- $(use_enable curl libcurl "${EPREFIX}"/usr) \ |
104 |
- $(use_enable prefixaq) \ |
105 |
- $(use_with showlistmodes) \ |
106 |
- $(use_with !operoverride no-operoverride) \ |
107 |
- $(use_with operoverride-verify) |
108 |
-} |
109 |
- |
110 |
-src_install() { |
111 |
- keepdir /var/log/${PN} |
112 |
- keepdir /var/lib/${PN}/tmp |
113 |
- |
114 |
- newbin src/ircd ${PN} |
115 |
- |
116 |
- ( |
117 |
- cd src/modules || die |
118 |
- for subdir in $(find . -type d -print); do |
119 |
- if [[ -n $(shopt -s nullglob; echo ${subdir}/*.so) ]]; then |
120 |
- exeinto /usr/$(get_libdir)/${PN}/modules/"${subdir}" |
121 |
- doexe "${subdir}"/*.so |
122 |
- fi |
123 |
- done |
124 |
- ) |
125 |
- |
126 |
- insinto /etc/${PN} |
127 |
- # Purposefully omitting the examples/ and ssl/ subdirectories. ssl |
128 |
- # is redundant with app-misc/ca-certificates and examples will all |
129 |
- # be in docs anyway. |
130 |
- doins -r doc/conf/{aliases,help} |
131 |
- doins doc/conf/*.conf |
132 |
- newins doc/conf/examples/example.conf ${PN}.conf |
133 |
- keepdir /etc/${PN}/tls |
134 |
- |
135 |
- einstalldocs |
136 |
- |
137 |
- newinitd "${FILESDIR}"/${PN}.initd-r2 ${PN} |
138 |
- newconfd "${FILESDIR}"/${PN}.confd-r3 ${PN} |
139 |
- |
140 |
- # config should be read-only |
141 |
- fperms -R 0640 /etc/${PN} |
142 |
- fperms 0750 /etc/${PN}{,/aliases,/help} |
143 |
- fperms 0750 /etc/${PN}/tls |
144 |
- # state is editable but not owned by unrealircd directly |
145 |
- fperms 0770 /var/log/${PN} |
146 |
- fperms 0770 /var/lib/${PN}{,/tmp} |
147 |
- fowners -R root:unrealircd /{etc,var/{lib,log}}/${PN} |
148 |
- |
149 |
- # By default looks in /etc/unrealircd/ssl/curl-ca-bundle.crt. Fix |
150 |
- # that to look for ca-certificates-provided file instead. %s is |
151 |
- # CONFDIR. #618066 |
152 |
- dosym ../../ssl/certs/ca-certificates.crt /etc/${PN}/tls/curl-ca-bundle.crt |
153 |
- |
154 |
- insinto $(systemd_get_systemunitdir) |
155 |
- doins "${FILESDIR}"/${PN}.service |
156 |
-} |
157 |
- |
158 |
-pkg_postinst() { |
159 |
- # Move docert call from src_install() to install_cert in pkg_postinst for |
160 |
- # bug #201682 |
161 |
- if [[ ! -f "${EROOT}"/etc/${PN}/tls/server.cert.key ]]; then |
162 |
- if [[ -f "${EROOT}"/etc/${PN}/ssl/server.cert.key ]]; then |
163 |
- ewarn "The location ${PN} looks for SSL certificates has changed" |
164 |
- ewarn "from ${EROOT}/etc/${PN}/ssl to ${EROOT}/etc/${PN}/tls." |
165 |
- ewarn "Please move your existing certificates." |
166 |
- else |
167 |
- ( |
168 |
- umask 0037 |
169 |
- install_cert /etc/${PN}/tls/server.cert |
170 |
- chown unrealircd "${EROOT}"/etc/${PN}/tls/server.cert.* |
171 |
- ln -snf server.cert.key "${EROOT}"/etc/${PN}/tls/server.key.pem |
172 |
- ) |
173 |
- fi |
174 |
- fi |
175 |
- |
176 |
- local unrealircd_conf="${EROOT}"/etc/${PN}/${PN}.conf |
177 |
- # Fix up the default cloak keys. |
178 |
- if grep -qe '"and another one";$' "${unrealircd_conf}" && grep -qe '"aoAr1HnR6gl3sJ7hVz4Zb7x4YwpW";$' "${unrealircd_conf}"; then |
179 |
- ebegin "Generating cloak-keys" |
180 |
- local keys=( |
181 |
- $(su ${PN} -s /bin/sh -c "${PN} -k 2>&1 | tail -n 3") |
182 |
- ) |
183 |
- [[ -n ${keys[0]} || -n ${keys[1]} || -n ${keys[2]} ]] |
184 |
- eend $? |
185 |
- |
186 |
- ebegin "Substituting cloak-keys into ${unrealircd_conf}" |
187 |
- sed -i \ |
188 |
- -e '/cloak-keys/ { |
189 |
-n |
190 |
-s/"aoAr1HnR6gl3sJ7hVz4Zb7x4YwpW";/"'"${keys[0]}"'";/ |
191 |
-n |
192 |
-s/"and another one";/"'"${keys[1]}"'";/ |
193 |
-n |
194 |
-s/"and another one";/"'"${keys[2]}"'";/ |
195 |
-}' \ |
196 |
- "${unrealircd_conf}" |
197 |
- eend $? |
198 |
- fi |
199 |
- |
200 |
- elog "UnrealIRCd will not run until you've set up /etc/unrealircd/unrealircd.conf" |
201 |
- elog |
202 |
- elog "You can also configure ${PN} start at boot with rc-update(1)." |
203 |
- elog "It is recommended to run unrealircd as an unprivileged user." |
204 |
- elog "The provided init.d script does this for you." |
205 |
-} |
206 |
|
207 |
diff --git a/net-irc/unrealircd/unrealircd-5.0.7-r2.ebuild b/net-irc/unrealircd/unrealircd-5.0.7-r2.ebuild |
208 |
deleted file mode 100644 |
209 |
index 759107f92ff..00000000000 |
210 |
--- a/net-irc/unrealircd/unrealircd-5.0.7-r2.ebuild |
211 |
+++ /dev/null |
212 |
@@ -1,171 +0,0 @@ |
213 |
-# Copyright 1999-2021 Gentoo Authors |
214 |
-# Distributed under the terms of the GNU General Public License v2 |
215 |
- |
216 |
-EAPI=7 |
217 |
- |
218 |
-SSL_CERT_MANDATORY=1 |
219 |
-inherit ssl-cert systemd |
220 |
- |
221 |
-DESCRIPTION="An advanced Internet Relay Chat daemon" |
222 |
-HOMEPAGE="https://www.unrealircd.org/" |
223 |
-SRC_URI="https://www.unrealircd.org/downloads/${P}.tar.gz" |
224 |
- |
225 |
-LICENSE="GPL-2" |
226 |
-SLOT="0" |
227 |
-KEYWORDS="~amd64 ~ppc ~x86 ~amd64-linux" |
228 |
-IUSE="class-nofakelag curl +operoverride operoverride-verify +prefixaq showlistmodes" |
229 |
- |
230 |
-RDEPEND=" |
231 |
- acct-group/unrealircd |
232 |
- acct-user/unrealircd |
233 |
- >=app-crypt/argon2-20171227-r1:= |
234 |
- dev-libs/libpcre2 |
235 |
- >=net-dns/c-ares-1.7:= |
236 |
- dev-libs/openssl:0= |
237 |
- curl? ( net-misc/curl[adns] ) |
238 |
-" |
239 |
-DEPEND="${RDEPEND}" |
240 |
-BDEPEND="virtual/pkgconfig" |
241 |
- |
242 |
-DOCS=( doc/{Authors,Donation,RELEASE-NOTES.md,tao.of.irc,technical/,translations.txt} ) |
243 |
- |
244 |
-src_prepare() { |
245 |
- # QA check against bundled pkgs |
246 |
- rm -r extras || die |
247 |
- |
248 |
- # building third-party modules (which we don't do) cause a sandbox violation |
249 |
- # bug 704444 |
250 |
- echo "" > src/buildmod || die |
251 |
- |
252 |
- sed -e 's/$(MODULEFLAGS)/$(LDFLAGS) &/' -i src/modules/{,*/}Makefile.in || die |
253 |
- |
254 |
- if use class-nofakelag; then |
255 |
- sed -i -e 's:^//#undef\( FAKELAG_CONFIGURABLE\):#define\1:' include/config.h || die |
256 |
- fi |
257 |
- |
258 |
- eapply_user |
259 |
-} |
260 |
- |
261 |
-src_configure() { |
262 |
- # Default value for privatelibdir adds a build path to -Wl,-rpath. |
263 |
- econf \ |
264 |
- --with-bindir="${EPREFIX}"/usr/bin \ |
265 |
- --with-cachedir="${EPREFIX}"/var/lib/${PN} \ |
266 |
- --with-confdir="${EPREFIX}"/etc/${PN} \ |
267 |
- --with-datadir="${EPREFIX}"/var/lib/${PN} \ |
268 |
- --with-docdir="${EPREFIX}"/usr/share/doc/${PF} \ |
269 |
- --with-logdir="${EPREFIX}"/var/log/${PN} \ |
270 |
- --with-modulesdir="${EPREFIX}"/usr/"$(get_libdir)"/${PN}/modules \ |
271 |
- --without-privatelibdir \ |
272 |
- --with-pidfile="${EPREFIX}"/run/${PN}/ircd.pid \ |
273 |
- --with-tmpdir="${EPREFIX}"/var/lib/${PN}/tmp \ |
274 |
- --with-maxconnections=1024 \ |
275 |
- --with-nick-history=2000 \ |
276 |
- --with-permissions=0640 \ |
277 |
- --with-system-argon2 \ |
278 |
- --with-system-cares \ |
279 |
- --with-system-pcre2 \ |
280 |
- --enable-dynamic-linking \ |
281 |
- --enable-ssl="${EPREFIX}"/usr \ |
282 |
- $(use_enable curl libcurl "${EPREFIX}"/usr) \ |
283 |
- $(use_enable prefixaq) \ |
284 |
- $(use_with showlistmodes) \ |
285 |
- $(use_with !operoverride no-operoverride) \ |
286 |
- $(use_with operoverride-verify) |
287 |
-} |
288 |
- |
289 |
-src_install() { |
290 |
- keepdir /var/log/${PN} |
291 |
- keepdir /var/lib/${PN}/tmp |
292 |
- |
293 |
- newbin src/ircd ${PN} |
294 |
- |
295 |
- ( |
296 |
- cd src/modules || die |
297 |
- for subdir in $(find . -type d -print); do |
298 |
- if [[ -n $(shopt -s nullglob; echo ${subdir}/*.so) ]]; then |
299 |
- exeinto /usr/$(get_libdir)/${PN}/modules/"${subdir}" |
300 |
- doexe "${subdir}"/*.so |
301 |
- fi |
302 |
- done |
303 |
- ) |
304 |
- |
305 |
- insinto /etc/${PN} |
306 |
- # Purposefully omitting the examples/ and ssl/ subdirectories. ssl |
307 |
- # is redundant with app-misc/ca-certificates and examples will all |
308 |
- # be in docs anyway. |
309 |
- doins -r doc/conf/{aliases,help} |
310 |
- doins doc/conf/*.conf |
311 |
- newins doc/conf/examples/example.conf ${PN}.conf |
312 |
- keepdir /etc/${PN}/tls |
313 |
- |
314 |
- einstalldocs |
315 |
- |
316 |
- newinitd "${FILESDIR}"/${PN}.initd-r2 ${PN} |
317 |
- newconfd "${FILESDIR}"/${PN}.confd-r3 ${PN} |
318 |
- |
319 |
- # config should be read-only |
320 |
- fperms -R 0640 /etc/${PN} |
321 |
- fperms 0750 /etc/${PN}{,/aliases,/help} |
322 |
- fperms 0750 /etc/${PN}/tls |
323 |
- # state is editable but not owned by unrealircd directly |
324 |
- fperms 0770 /var/log/${PN} |
325 |
- fperms 0770 /var/lib/${PN}{,/tmp} |
326 |
- fowners -R root:unrealircd /{etc,var/{lib,log}}/${PN} |
327 |
- |
328 |
- # By default looks in /etc/unrealircd/ssl/curl-ca-bundle.crt. Fix |
329 |
- # that to look for ca-certificates-provided file instead. %s is |
330 |
- # CONFDIR. #618066 |
331 |
- dosym ../../ssl/certs/ca-certificates.crt /etc/${PN}/tls/curl-ca-bundle.crt |
332 |
- |
333 |
- systemd_dounit "${FILESDIR}"/${PN}.service |
334 |
-} |
335 |
- |
336 |
-pkg_postinst() { |
337 |
- # Move docert call from src_install() to install_cert in pkg_postinst for |
338 |
- # bug #201682 |
339 |
- if [[ ! -f "${EROOT}"/etc/${PN}/tls/server.cert.key ]]; then |
340 |
- if [[ -f "${EROOT}"/etc/${PN}/ssl/server.cert.key ]]; then |
341 |
- ewarn "The location ${PN} looks for SSL certificates has changed" |
342 |
- ewarn "from ${EROOT}/etc/${PN}/ssl to ${EROOT}/etc/${PN}/tls." |
343 |
- ewarn "Please move your existing certificates." |
344 |
- else |
345 |
- ( |
346 |
- umask 0037 |
347 |
- install_cert /etc/${PN}/tls/server.cert |
348 |
- chown unrealircd "${EROOT}"/etc/${PN}/tls/server.cert.* |
349 |
- ln -snf server.cert.key "${EROOT}"/etc/${PN}/tls/server.key.pem |
350 |
- ) |
351 |
- fi |
352 |
- fi |
353 |
- |
354 |
- local unrealircd_conf="${EROOT}"/etc/${PN}/${PN}.conf |
355 |
- # Fix up the default cloak keys. |
356 |
- if grep -qe '"and another one";$' "${unrealircd_conf}" && grep -qe '"aoAr1HnR6gl3sJ7hVz4Zb7x4YwpW";$' "${unrealircd_conf}"; then |
357 |
- ebegin "Generating cloak-keys" |
358 |
- local keys=( |
359 |
- $(su ${PN} -s /bin/sh -c "${PN} -k 2>&1 | tail -n 3") |
360 |
- ) |
361 |
- [[ -n ${keys[0]} || -n ${keys[1]} || -n ${keys[2]} ]] |
362 |
- eend $? |
363 |
- |
364 |
- ebegin "Substituting cloak-keys into ${unrealircd_conf}" |
365 |
- sed -i \ |
366 |
- -e '/cloak-keys/ { |
367 |
-n |
368 |
-s/"aoAr1HnR6gl3sJ7hVz4Zb7x4YwpW";/"'"${keys[0]}"'";/ |
369 |
-n |
370 |
-s/"and another one";/"'"${keys[1]}"'";/ |
371 |
-n |
372 |
-s/"and another one";/"'"${keys[2]}"'";/ |
373 |
-}' \ |
374 |
- "${unrealircd_conf}" |
375 |
- eend $? |
376 |
- fi |
377 |
- |
378 |
- elog "UnrealIRCd will not run until you've set up /etc/unrealircd/unrealircd.conf" |
379 |
- elog |
380 |
- elog "You can also configure ${PN} start at boot with rc-update(1)." |
381 |
- elog "It is recommended to run unrealircd as an unprivileged user." |
382 |
- elog "The provided init.d script does this for you." |
383 |
-} |
384 |
|
385 |
diff --git a/net-irc/unrealircd/unrealircd-5.0.7.ebuild b/net-irc/unrealircd/unrealircd-5.0.7.ebuild |
386 |
deleted file mode 100644 |
387 |
index bfc04f2575f..00000000000 |
388 |
--- a/net-irc/unrealircd/unrealircd-5.0.7.ebuild |
389 |
+++ /dev/null |
390 |
@@ -1,172 +0,0 @@ |
391 |
-# Copyright 1999-2021 Gentoo Authors |
392 |
-# Distributed under the terms of the GNU General Public License v2 |
393 |
- |
394 |
-EAPI=7 |
395 |
- |
396 |
-SSL_CERT_MANDATORY=1 |
397 |
-inherit ssl-cert systemd |
398 |
- |
399 |
-DESCRIPTION="An advanced Internet Relay Chat daemon" |
400 |
-HOMEPAGE="https://www.unrealircd.org/" |
401 |
-SRC_URI="https://www.unrealircd.org/downloads/${P}.tar.gz" |
402 |
- |
403 |
-LICENSE="GPL-2" |
404 |
-SLOT="0" |
405 |
-KEYWORDS="~amd64 ~ppc ~x86 ~amd64-linux" |
406 |
-IUSE="class-nofakelag curl +operoverride operoverride-verify +prefixaq showlistmodes" |
407 |
- |
408 |
-RDEPEND=" |
409 |
- acct-group/unrealircd |
410 |
- acct-user/unrealircd |
411 |
- >=app-crypt/argon2-20171227-r1:= |
412 |
- dev-libs/libpcre2 |
413 |
- >=net-dns/c-ares-1.7:= |
414 |
- dev-libs/openssl:0= |
415 |
- curl? ( net-misc/curl[adns] ) |
416 |
-" |
417 |
-DEPEND="${RDEPEND}" |
418 |
-BDEPEND="virtual/pkgconfig" |
419 |
- |
420 |
-DOCS=( doc/{Authors,Donation,RELEASE-NOTES.md,tao.of.irc,technical/,translations.txt} ) |
421 |
- |
422 |
-src_prepare() { |
423 |
- # QA check against bundled pkgs |
424 |
- rm -r extras || die |
425 |
- |
426 |
- # building third-party modules (which we don't do) cause a sandbox violation |
427 |
- # bug 704444 |
428 |
- echo "" > src/buildmod || die |
429 |
- |
430 |
- sed -e 's/$(MODULEFLAGS)/$(LDFLAGS) &/' -i src/modules/{,*/}Makefile.in || die |
431 |
- |
432 |
- if use class-nofakelag; then |
433 |
- sed -i -e 's:#undef\( FAKELAG_CONFIGURABLE\):#define\1:' include/config.h || die |
434 |
- fi |
435 |
- |
436 |
- eapply_user |
437 |
-} |
438 |
- |
439 |
-src_configure() { |
440 |
- # Default value for privatelibdir adds a build path to -Wl,-rpath. |
441 |
- econf \ |
442 |
- --with-bindir="${EPREFIX}"/usr/bin \ |
443 |
- --with-cachedir="${EPREFIX}"/var/lib/${PN} \ |
444 |
- --with-confdir="${EPREFIX}"/etc/${PN} \ |
445 |
- --with-datadir="${EPREFIX}"/var/lib/${PN} \ |
446 |
- --with-docdir="${EPREFIX}"/usr/share/doc/${PF} \ |
447 |
- --with-logdir="${EPREFIX}"/var/log/${PN} \ |
448 |
- --with-modulesdir="${EPREFIX}"/usr/"$(get_libdir)"/${PN}/modules \ |
449 |
- --without-privatelibdir \ |
450 |
- --with-pidfile="${EPREFIX}"/run/${PN}/ircd.pid \ |
451 |
- --with-tmpdir="${EPREFIX}"/var/lib/${PN}/tmp \ |
452 |
- --with-maxconnections=1024 \ |
453 |
- --with-nick-history=2000 \ |
454 |
- --with-permissions=0640 \ |
455 |
- --with-system-argon2 \ |
456 |
- --with-system-cares \ |
457 |
- --with-system-pcre2 \ |
458 |
- --enable-dynamic-linking \ |
459 |
- --enable-ssl="${EPREFIX}"/usr \ |
460 |
- $(use_enable curl libcurl "${EPREFIX}"/usr) \ |
461 |
- $(use_enable prefixaq) \ |
462 |
- $(use_with showlistmodes) \ |
463 |
- $(use_with !operoverride no-operoverride) \ |
464 |
- $(use_with operoverride-verify) |
465 |
-} |
466 |
- |
467 |
-src_install() { |
468 |
- keepdir /var/log/${PN} |
469 |
- keepdir /var/lib/${PN}/tmp |
470 |
- |
471 |
- newbin src/ircd ${PN} |
472 |
- |
473 |
- ( |
474 |
- cd src/modules || die |
475 |
- for subdir in $(find . -type d -print); do |
476 |
- if [[ -n $(shopt -s nullglob; echo ${subdir}/*.so) ]]; then |
477 |
- exeinto /usr/$(get_libdir)/${PN}/modules/"${subdir}" |
478 |
- doexe "${subdir}"/*.so |
479 |
- fi |
480 |
- done |
481 |
- ) |
482 |
- |
483 |
- insinto /etc/${PN} |
484 |
- # Purposefully omitting the examples/ and ssl/ subdirectories. ssl |
485 |
- # is redundant with app-misc/ca-certificates and examples will all |
486 |
- # be in docs anyway. |
487 |
- doins -r doc/conf/{aliases,help} |
488 |
- doins doc/conf/*.conf |
489 |
- newins doc/conf/examples/example.conf ${PN}.conf |
490 |
- keepdir /etc/${PN}/tls |
491 |
- |
492 |
- einstalldocs |
493 |
- |
494 |
- newinitd "${FILESDIR}"/${PN}.initd-r2 ${PN} |
495 |
- newconfd "${FILESDIR}"/${PN}.confd-r3 ${PN} |
496 |
- |
497 |
- # config should be read-only |
498 |
- fperms -R 0640 /etc/${PN} |
499 |
- fperms 0750 /etc/${PN}{,/aliases,/help} |
500 |
- fperms 0750 /etc/${PN}/tls |
501 |
- # state is editable but not owned by unrealircd directly |
502 |
- fperms 0770 /var/log/${PN} |
503 |
- fperms 0770 /var/lib/${PN}{,/tmp} |
504 |
- fowners -R root:unrealircd /{etc,var/{lib,log}}/${PN} |
505 |
- |
506 |
- # By default looks in /etc/unrealircd/ssl/curl-ca-bundle.crt. Fix |
507 |
- # that to look for ca-certificates-provided file instead. %s is |
508 |
- # CONFDIR. #618066 |
509 |
- dosym ../../ssl/certs/ca-certificates.crt /etc/${PN}/tls/curl-ca-bundle.crt |
510 |
- |
511 |
- insinto $(systemd_get_systemunitdir) |
512 |
- doins "${FILESDIR}"/${PN}.service |
513 |
-} |
514 |
- |
515 |
-pkg_postinst() { |
516 |
- # Move docert call from src_install() to install_cert in pkg_postinst for |
517 |
- # bug #201682 |
518 |
- if [[ ! -f "${EROOT}"/etc/${PN}/tls/server.cert.key ]]; then |
519 |
- if [[ -f "${EROOT}"/etc/${PN}/ssl/server.cert.key ]]; then |
520 |
- ewarn "The location ${PN} looks for SSL certificates has changed" |
521 |
- ewarn "from ${EROOT}/etc/${PN}/ssl to ${EROOT}/etc/${PN}/tls." |
522 |
- ewarn "Please move your existing certificates." |
523 |
- else |
524 |
- ( |
525 |
- umask 0037 |
526 |
- install_cert /etc/${PN}/tls/server.cert |
527 |
- chown unrealircd "${EROOT}"/etc/${PN}/tls/server.cert.* |
528 |
- ln -snf server.cert.key "${EROOT}"/etc/${PN}/tls/server.key.pem |
529 |
- ) |
530 |
- fi |
531 |
- fi |
532 |
- |
533 |
- local unrealircd_conf="${EROOT}"/etc/${PN}/${PN}.conf |
534 |
- # Fix up the default cloak keys. |
535 |
- if grep -qe '"and another one";$' "${unrealircd_conf}" && grep -qe '"aoAr1HnR6gl3sJ7hVz4Zb7x4YwpW";$' "${unrealircd_conf}"; then |
536 |
- ebegin "Generating cloak-keys" |
537 |
- local keys=( |
538 |
- $(su ${PN} -s /bin/sh -c "${PN} -k 2>&1 | tail -n 3") |
539 |
- ) |
540 |
- [[ -n ${keys[0]} || -n ${keys[1]} || -n ${keys[2]} ]] |
541 |
- eend $? |
542 |
- |
543 |
- ebegin "Substituting cloak-keys into ${unrealircd_conf}" |
544 |
- sed -i \ |
545 |
- -e '/cloak-keys/ { |
546 |
-n |
547 |
-s/"aoAr1HnR6gl3sJ7hVz4Zb7x4YwpW";/"'"${keys[0]}"'";/ |
548 |
-n |
549 |
-s/"and another one";/"'"${keys[1]}"'";/ |
550 |
-n |
551 |
-s/"and another one";/"'"${keys[2]}"'";/ |
552 |
-}' \ |
553 |
- "${unrealircd_conf}" |
554 |
- eend $? |
555 |
- fi |
556 |
- |
557 |
- elog "UnrealIRCd will not run until you've set up /etc/unrealircd/unrealircd.conf" |
558 |
- elog |
559 |
- elog "You can also configure ${PN} start at boot with rc-update(1)." |
560 |
- elog "It is recommended to run unrealircd as an unprivileged user." |
561 |
- elog "The provided init.d script does this for you." |
562 |
-} |