1 |
commit: 3e159f6d68a7e279192c252665810469d2313c13 |
2 |
Author: Sam James <sam <AT> gentoo <DOT> org> |
3 |
AuthorDate: Tue Apr 5 03:49:18 2022 +0000 |
4 |
Commit: Sam James <sam <AT> gentoo <DOT> org> |
5 |
CommitDate: Tue Apr 5 03:49:46 2022 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=3e159f6d |
7 |
|
8 |
net-irc/unrealircd: add 6.0.3 |
9 |
|
10 |
Signed-off-by: Sam James <sam <AT> gentoo.org> |
11 |
|
12 |
net-irc/unrealircd/Manifest | 1 + |
13 |
net-irc/unrealircd/unrealircd-6.0.3.ebuild | 184 +++++++++++++++++++++++++++++ |
14 |
2 files changed, 185 insertions(+) |
15 |
|
16 |
diff --git a/net-irc/unrealircd/Manifest b/net-irc/unrealircd/Manifest |
17 |
index 9dc7cf35c43b..7b816cfc23ee 100644 |
18 |
--- a/net-irc/unrealircd/Manifest |
19 |
+++ b/net-irc/unrealircd/Manifest |
20 |
@@ -1,2 +1,3 @@ |
21 |
DIST unrealircd-5.2.4.tar.gz 7201203 BLAKE2B 06afc8b5e28bbd56971b2ce21da3e000e39366444472786891bfe000754f5fed37b59850f9539b4f01914d6b33c1f9f17a15fe69569620ba5213f39fce1cfcad SHA512 b6784d011bc56b0b8253d61fb1edddb2133e791e9ce4ae978f90059563d11f3f7b3ebca1cf13765b4077ebc39f0699e101bdfc71cbb0c5cf51d508c5a5fdacb3 |
22 |
DIST unrealircd-6.0.2.tar.gz 8672255 BLAKE2B d52f2984f32331c489528b429f4671189713e4e308a7a7fd2f70933bfd606a938a9b6a6e581170b41fa9a948d1cc04c0cd8bb90c595c01c39b473cf341494a27 SHA512 041f97ad82d89222ad49bdc7db83869fc5133a049dd5354c34759c33c16307b9d60c25d3ef4e19a549059e3a0030699d061bd03fa8118428ded1f1e79d483398 |
23 |
+DIST unrealircd-6.0.3.tar.gz 8673998 BLAKE2B 64a5f8bfa6e19abb5cf5434134b2729d460cd4564ad2ca395241f27aab26113f85249d43b8e9a14245354868f767d07e399ff1f28c606bb7b75c4955048e03ae SHA512 be3b823eee42e5ecf7ffbdcac0d56cf4ff4cde8aa082affa8c2f78518a3c54a2d8bb3956cf2b95060958d7c3382ca8da00e6f7b816670cf3ba48e3b8588adba3 |
24 |
|
25 |
diff --git a/net-irc/unrealircd/unrealircd-6.0.3.ebuild b/net-irc/unrealircd/unrealircd-6.0.3.ebuild |
26 |
new file mode 100644 |
27 |
index 000000000000..275c8a7ffa4b |
28 |
--- /dev/null |
29 |
+++ b/net-irc/unrealircd/unrealircd-6.0.3.ebuild |
30 |
@@ -0,0 +1,184 @@ |
31 |
+# Copyright 1999-2022 Gentoo Authors |
32 |
+# Distributed under the terms of the GNU General Public License v2 |
33 |
+ |
34 |
+EAPI=8 |
35 |
+ |
36 |
+SSL_CERT_MANDATORY=1 |
37 |
+inherit autotools ssl-cert systemd tmpfiles |
38 |
+ |
39 |
+DESCRIPTION="An advanced Internet Relay Chat daemon" |
40 |
+HOMEPAGE="https://www.unrealircd.org/" |
41 |
+SRC_URI="https://www.unrealircd.org/downloads/${P}.tar.gz" |
42 |
+ |
43 |
+LICENSE="GPL-2" |
44 |
+SLOT="0" |
45 |
+KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~ppc64 ~x86 ~amd64-linux" |
46 |
+IUSE="class-nofakelag curl geoip +operoverride operoverride-verify" |
47 |
+ |
48 |
+RDEPEND="acct-group/unrealircd |
49 |
+ acct-user/unrealircd |
50 |
+ >=app-crypt/argon2-20171227-r1:= |
51 |
+ dev-libs/libpcre2 |
52 |
+ dev-libs/libsodium:= |
53 |
+ dev-libs/openssl:= |
54 |
+ dev-libs/jansson:= |
55 |
+ >=net-dns/c-ares-1.7:= |
56 |
+ virtual/libcrypt:= |
57 |
+ curl? ( net-misc/curl[adns] ) |
58 |
+ geoip? ( dev-libs/libmaxminddb )" |
59 |
+DEPEND="${RDEPEND}" |
60 |
+BDEPEND="virtual/pkgconfig" |
61 |
+ |
62 |
+DOCS=( doc/{Authors,Donation,RELEASE-NOTES.md,tao.of.irc,technical/,translations.txt} ) |
63 |
+ |
64 |
+src_prepare() { |
65 |
+ # QA check against bundled pkgs |
66 |
+ rm -r extras || die |
67 |
+ |
68 |
+ # building third-party modules (which we don't do) cause a sandbox violation |
69 |
+ # bug 704444 |
70 |
+ echo "" > src/buildmod || die |
71 |
+ |
72 |
+ sed -e 's/$(MODULEFLAGS)/$(LDFLAGS) &/' -i src/modules/{,*/}Makefile.in || die |
73 |
+ |
74 |
+ if use class-nofakelag; then |
75 |
+ sed -i -e 's:^//#undef\( FAKELAG_CONFIGURABLE\):#define\1:' include/config.h || die |
76 |
+ fi |
77 |
+ |
78 |
+ # File is missing from the 5.0.9.1 tarball |
79 |
+ sed -i -e '/unrealircd-upgrade-script/d' configure.ac || die |
80 |
+ |
81 |
+ default |
82 |
+ eautoreconf |
83 |
+} |
84 |
+ |
85 |
+src_configure() { |
86 |
+ # Default value for privatelibdir adds a build path to -Wl,-rpath. |
87 |
+ econf \ |
88 |
+ --with-bindir="${EPREFIX}"/usr/bin \ |
89 |
+ --with-cachedir="${EPREFIX}"/var/lib/${PN} \ |
90 |
+ --with-confdir="${EPREFIX}"/etc/${PN} \ |
91 |
+ --with-datadir="${EPREFIX}"/var/lib/${PN} \ |
92 |
+ --with-docdir="${EPREFIX}"/usr/share/doc/${PF} \ |
93 |
+ --with-logdir="${EPREFIX}"/var/log/${PN} \ |
94 |
+ --with-modulesdir="${EPREFIX}/usr/$(get_libdir)"/${PN}/modules \ |
95 |
+ --without-privatelibdir \ |
96 |
+ --with-pidfile="${EPREFIX}"/run/${PN}/ircd.pid \ |
97 |
+ --with-tmpdir="${EPREFIX}"/var/lib/${PN}/tmp \ |
98 |
+ --with-maxconnections=1024 \ |
99 |
+ --with-nick-history=2000 \ |
100 |
+ --with-permissions=0640 \ |
101 |
+ --with-system-argon2 \ |
102 |
+ --with-system-cares \ |
103 |
+ --with-system-pcre2 \ |
104 |
+ --with-system-sodium \ |
105 |
+ --with-system-jansson \ |
106 |
+ --enable-dynamic-linking \ |
107 |
+ --with-controlfile="${EPREFIX}"/run/${PN}/unrealircd.ctl \ |
108 |
+ --enable-ssl="${EPREFIX}"/usr \ |
109 |
+ $(use_enable curl libcurl "${EPREFIX}"/usr) \ |
110 |
+ $(use_with !operoverride no-operoverride) \ |
111 |
+ $(use_with operoverride-verify) \ |
112 |
+ $(use_enable geoip libmaxminddb) |
113 |
+} |
114 |
+ |
115 |
+src_install() { |
116 |
+ keepdir /var/log/${PN} |
117 |
+ keepdir /var/lib/${PN}/tmp |
118 |
+ |
119 |
+ newbin src/ircd ${PN} |
120 |
+ dobin src/unrealircdctl |
121 |
+ |
122 |
+ newtmpfiles "${FILESDIR}"/unrealircd.tmpfiles unrealircd.conf |
123 |
+ |
124 |
+ ( |
125 |
+ cd src/modules || die |
126 |
+ for subdir in $(find . -type d -print); do |
127 |
+ if [[ -n $(shopt -s nullglob; echo ${subdir}/*.so) ]]; then |
128 |
+ exeinto /usr/$(get_libdir)/${PN}/modules/"${subdir}" |
129 |
+ doexe "${subdir}"/*.so |
130 |
+ fi |
131 |
+ done |
132 |
+ ) |
133 |
+ |
134 |
+ insinto /etc/${PN} |
135 |
+ # Purposefully omitting the examples/ and ssl/ subdirectories. ssl |
136 |
+ # is redundant with app-misc/ca-certificates and examples will all |
137 |
+ # be in docs anyway. |
138 |
+ doins -r doc/conf/{aliases,help} |
139 |
+ doins doc/conf/*.conf |
140 |
+ newins doc/conf/examples/example.conf ${PN}.conf |
141 |
+ keepdir /etc/${PN}/tls |
142 |
+ |
143 |
+ einstalldocs |
144 |
+ |
145 |
+ newinitd "${FILESDIR}"/${PN}.initd-r3 ${PN} |
146 |
+ newconfd "${FILESDIR}"/${PN}.confd-r4 ${PN} |
147 |
+ |
148 |
+ # config should be read-only |
149 |
+ fperms -R 0640 /etc/${PN} |
150 |
+ fperms 0750 /etc/${PN}{,/aliases,/help} |
151 |
+ fperms 0750 /etc/${PN}/tls |
152 |
+ # state is editable but not owned by unrealircd directly |
153 |
+ fperms 0770 /var/log/${PN} |
154 |
+ fperms 0770 /var/lib/${PN}{,/tmp} |
155 |
+ fowners -R root:unrealircd /{etc,var/{lib,log}}/${PN} |
156 |
+ |
157 |
+ # By default looks in /etc/unrealircd/ssl/curl-ca-bundle.crt. Fix |
158 |
+ # that to look for ca-certificates-provided file instead. %s is |
159 |
+ # CONFDIR. #618066 |
160 |
+ dosym ../../ssl/certs/ca-certificates.crt /etc/${PN}/tls/curl-ca-bundle.crt |
161 |
+ |
162 |
+ systemd_dounit "${FILESDIR}"/${PN}.service |
163 |
+} |
164 |
+ |
165 |
+pkg_postinst() { |
166 |
+ tmpfiles_process unrealircd.conf |
167 |
+ |
168 |
+ # Move docert call from src_install() to install_cert in pkg_postinst for |
169 |
+ # bug #201682 |
170 |
+ if [[ ! -f "${EROOT}"/etc/${PN}/tls/server.cert.key ]]; then |
171 |
+ if [[ -f "${EROOT}"/etc/${PN}/ssl/server.cert.key ]]; then |
172 |
+ ewarn "The location ${PN} looks for SSL certificates has changed" |
173 |
+ ewarn "from ${EROOT}/etc/${PN}/ssl to ${EROOT}/etc/${PN}/tls." |
174 |
+ ewarn "Please move your existing certificates." |
175 |
+ else |
176 |
+ ( |
177 |
+ umask 0037 |
178 |
+ install_cert /etc/${PN}/tls/server.cert |
179 |
+ chown unrealircd "${EROOT}"/etc/${PN}/tls/server.cert.* |
180 |
+ ln -snf server.cert.key "${EROOT}"/etc/${PN}/tls/server.key.pem |
181 |
+ ) |
182 |
+ fi |
183 |
+ fi |
184 |
+ |
185 |
+ local unrealircd_conf="${EROOT}"/etc/${PN}/${PN}.conf |
186 |
+ # Fix up the default cloak keys. |
187 |
+ if grep -qe '"and another one";$' "${unrealircd_conf}" && grep -qe '"Oozahho1raezoh0iMee4ohvegaifahv5xaepeitaich9tahdiquaid0geecipahdauVaij3zieph4ahi";$' "${unrealircd_conf}"; then |
188 |
+ ebegin "Generating cloak-keys" |
189 |
+ local keys=( |
190 |
+ $(su ${PN} -s /bin/sh -c "${PN} -k 2>&1 | tail -n 6 | head -n 3") |
191 |
+ ) |
192 |
+ [[ -n ${keys[0]} || -n ${keys[1]} || -n ${keys[2]} ]] |
193 |
+ eend $? |
194 |
+ |
195 |
+ ebegin "Substituting cloak-keys into ${unrealircd_conf}" |
196 |
+ sed -i \ |
197 |
+ -e '/cloak-keys/ { |
198 |
+n |
199 |
+s/"Oozahho1raezoh0iMee4ohvegaifahv5xaepeitaich9tahdiquaid0geecipahdauVaij3zieph4ahi";/'${keys[0]}'/ |
200 |
+n |
201 |
+s/"and another one";/'${keys[1]}'/ |
202 |
+n |
203 |
+s/"and another one";/'${keys[2]}'/ |
204 |
+}' \ |
205 |
+ "${unrealircd_conf}" |
206 |
+ eend $? |
207 |
+ fi |
208 |
+ |
209 |
+ elog "UnrealIRCd will not run until you've set up ${EROOT}/etc/unrealircd/unrealircd.conf" |
210 |
+ elog |
211 |
+ elog "You can also configure ${PN} start at boot with rc-update(1)." |
212 |
+ elog "It is recommended to run unrealircd as an unprivileged user." |
213 |
+ elog "The provided init.d script does this for you." |
214 |
+} |