1 |
commit: c56911a6b10c8088e087046a0fa1cabfcdaed2f0 |
2 |
Author: Michael Palimaka <kensington <AT> gentoo <DOT> org> |
3 |
AuthorDate: Fri Dec 27 09:12:01 2019 +0000 |
4 |
Commit: Michael Palimaka <kensington <AT> gentoo <DOT> org> |
5 |
CommitDate: Fri Dec 27 09:13:24 2019 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c56911a6 |
7 |
|
8 |
net-irc/unrealircd: version bump 5.0.0 |
9 |
|
10 |
Package-Manager: Portage-2.3.79, Repoman-2.3.18 |
11 |
Signed-off-by: Michael Palimaka <kensington <AT> gentoo.org> |
12 |
|
13 |
net-irc/unrealircd/Manifest | 1 + |
14 |
net-irc/unrealircd/unrealircd-5.0.0.ebuild | 164 +++++++++++++++++++++++++++++ |
15 |
2 files changed, 165 insertions(+) |
16 |
|
17 |
diff --git a/net-irc/unrealircd/Manifest b/net-irc/unrealircd/Manifest |
18 |
index efa17e7882e..34b46325804 100644 |
19 |
--- a/net-irc/unrealircd/Manifest |
20 |
+++ b/net-irc/unrealircd/Manifest |
21 |
@@ -1 +1,2 @@ |
22 |
DIST unrealircd-4.2.4.1.tar.gz 6090725 BLAKE2B 817a7c2a13a495944676d08ed90b36f6795fe43ee171efc6661980e6da9a8cc8d98c4fb0eb8221ac6af85ab1a9b5578a2e992d7b41696434430e58918bc30145 SHA512 752573c4af1f92a10739bb2b0cdaade1948207b46d28ae5177e1dfd6b0663044bc22dce5ffe8549882cd70325e3ef7e3296182fffbb84e08d59dbbdd6551a686 |
23 |
+DIST unrealircd-5.0.0.tar.gz 4891870 BLAKE2B f65156e83e2fbdbbf1f843199fded988cf3aa5304de877e1a1804ae2409308aa17ced6ed875f569313026f94fd0fb82d8f23f64b58661912a32de9f17ebadb81 SHA512 48fd93b0edcd3d9489fd9d1c7ea8b60ad3404383ec126df2840be587b087e2f9a6b267e08f616cdd63b3e33f498c552f4cfa5d6b9db820cb73da0fc6ba86e333 |
24 |
|
25 |
diff --git a/net-irc/unrealircd/unrealircd-5.0.0.ebuild b/net-irc/unrealircd/unrealircd-5.0.0.ebuild |
26 |
new file mode 100644 |
27 |
index 00000000000..6a996cec84f |
28 |
--- /dev/null |
29 |
+++ b/net-irc/unrealircd/unrealircd-5.0.0.ebuild |
30 |
@@ -0,0 +1,164 @@ |
31 |
+# Copyright 1999-2019 Gentoo Authors |
32 |
+# Distributed under the terms of the GNU General Public License v2 |
33 |
+ |
34 |
+EAPI=7 |
35 |
+ |
36 |
+SSL_CERT_MANDATORY=1 |
37 |
+inherit ssl-cert |
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 ~ppc ~x86 ~amd64-linux" |
46 |
+IUSE="class-nofakelag curl libressl +operoverride operoverride-verify +prefixaq showlistmodes" |
47 |
+ |
48 |
+RDEPEND=" |
49 |
+ acct-group/unrealircd |
50 |
+ acct-user/unrealircd |
51 |
+ >=app-crypt/argon2-20171227-r1:= |
52 |
+ dev-libs/libpcre2 |
53 |
+ >=net-dns/c-ares-1.7:= |
54 |
+ !libressl? ( dev-libs/openssl:0= ) |
55 |
+ libressl? ( dev-libs/libressl:= ) |
56 |
+ curl? ( net-misc/curl[adns] ) |
57 |
+" |
58 |
+DEPEND="${RDEPEND}" |
59 |
+BDEPEND="virtual/pkgconfig" |
60 |
+ |
61 |
+DOCS=( doc/{Authors,Donation,RELEASE-NOTES.md,tao.of.irc,technical/,translations.txt} ) |
62 |
+ |
63 |
+src_prepare() { |
64 |
+ # QA check against bundled pkgs |
65 |
+ rm -r extras || die |
66 |
+ |
67 |
+ if use class-nofakelag; then |
68 |
+ sed -i -e 's:#undef\( FAKELAG_CONFIGURABLE\):#define\1:' include/config.h || die |
69 |
+ fi |
70 |
+ |
71 |
+ eapply_user |
72 |
+} |
73 |
+ |
74 |
+src_configure() { |
75 |
+ # Default value for privatelibdir adds a build path to -Wl,-rpath. |
76 |
+ econf \ |
77 |
+ --with-bindir="${EPREFIX}"/usr/bin \ |
78 |
+ --with-cachedir="${EPREFIX}"/var/lib/${PN} \ |
79 |
+ --with-confdir="${EPREFIX}"/etc/${PN} \ |
80 |
+ --with-datadir="${EPREFIX}"/var/lib/${PN} \ |
81 |
+ --with-docdir="${EPREFIX}"/usr/share/doc/${PF} \ |
82 |
+ --with-logdir="${EPREFIX}"/var/log/${PN} \ |
83 |
+ --with-modulesdir="${EPREFIX}"/usr/"$(get_libdir)"/${PN}/modules \ |
84 |
+ --without-privatelibdir \ |
85 |
+ --with-pidfile="${EPREFIX}"/run/${PN}/ircd.pid \ |
86 |
+ --with-tmpdir="${EPREFIX}"/var/lib/${PN}/tmp \ |
87 |
+ --with-maxconnections=1024 \ |
88 |
+ --with-nick-history=2000 \ |
89 |
+ --with-permissions=0640 \ |
90 |
+ --with-system-argon2 \ |
91 |
+ --with-system-cares \ |
92 |
+ --with-system-pcre2 \ |
93 |
+ --enable-dynamic-linking \ |
94 |
+ --enable-ssl="${EPREFIX}"/usr \ |
95 |
+ $(use_enable curl libcurl "${EPREFIX}"/usr) \ |
96 |
+ $(use_enable prefixaq) \ |
97 |
+ $(use_with showlistmodes) \ |
98 |
+ $(use_with !operoverride no-operoverride) \ |
99 |
+ $(use_with operoverride-verify) |
100 |
+} |
101 |
+ |
102 |
+src_install() { |
103 |
+ keepdir /var/log/${PN} |
104 |
+ keepdir /var/lib/${PN}/tmp |
105 |
+ |
106 |
+ newbin src/ircd ${PN} |
107 |
+ |
108 |
+ ( |
109 |
+ cd src/modules || die |
110 |
+ for subdir in $(find . -type d -print); do |
111 |
+ if [[ -n $(shopt -s nullglob; echo ${subdir}/*.so) ]]; then |
112 |
+ exeinto /usr/$(get_libdir)/${PN}/modules/"${subdir}" |
113 |
+ doexe "${subdir}"/*.so |
114 |
+ fi |
115 |
+ done |
116 |
+ ) |
117 |
+ |
118 |
+ insinto /etc/${PN} |
119 |
+ # Purposefully omitting the examples/ and ssl/ subdirectories. ssl |
120 |
+ # is redundant with app-misc/ca-certificates and examples will all |
121 |
+ # be in docs anyway. |
122 |
+ doins -r doc/conf/{aliases,help} |
123 |
+ doins doc/conf/*.conf |
124 |
+ newins doc/conf/examples/example.conf ${PN}.conf |
125 |
+ keepdir /etc/${PN}/tls |
126 |
+ |
127 |
+ einstalldocs |
128 |
+ |
129 |
+ newinitd "${FILESDIR}"/${PN}.initd-r2 ${PN} |
130 |
+ newconfd "${FILESDIR}"/${PN}.confd-r3 ${PN} |
131 |
+ |
132 |
+ # config should be read-only |
133 |
+ fperms -R 0640 /etc/${PN} |
134 |
+ fperms 0750 /etc/${PN}{,/aliases,/help} |
135 |
+ fperms 0750 /etc/${PN}/tls |
136 |
+ # state is editable but not owned by unrealircd directly |
137 |
+ fperms 0770 /var/log/${PN} |
138 |
+ fperms 0770 /var/lib/${PN}{,/tmp} |
139 |
+ fowners -R root:unrealircd /{etc,var/{lib,log}}/${PN} |
140 |
+ |
141 |
+ # By default looks in /etc/unrealircd/ssl/curl-ca-bundle.crt. Fix |
142 |
+ # that to look for ca-certificates-provided file instead. %s is |
143 |
+ # CONFDIR. #618066 |
144 |
+ dosym ../../ssl/certs/ca-certificates.crt /etc/${PN}/tls/curl-ca-bundle.crt |
145 |
+} |
146 |
+ |
147 |
+pkg_postinst() { |
148 |
+ # Move docert call from src_install() to install_cert in pkg_postinst for |
149 |
+ # bug #201682 |
150 |
+ if [[ ! -f "${EROOT}"/etc/${PN}/tls/server.cert.key ]]; then |
151 |
+ if [[ -f "${EROOT}"/etc/${PN}/ssl/server.cert.key ]]; then |
152 |
+ ewarn "The location ${PN} looks for SSL certificates has changed" |
153 |
+ ewarn "from ${EROOT}/etc/${PN}/ssl to ${EROOT}/etc/${PN}/tls." |
154 |
+ ewarn "Please move your existing certificates." |
155 |
+ else |
156 |
+ ( |
157 |
+ umask 0037 |
158 |
+ install_cert /etc/${PN}/tls/server.cert |
159 |
+ chown unrealircd "${EROOT}"/etc/${PN}/tls/server.cert.* |
160 |
+ ln -snf server.cert.key "${EROOT}"/etc/${PN}/tls/server.key.pem |
161 |
+ ) |
162 |
+ fi |
163 |
+ fi |
164 |
+ |
165 |
+ local unrealircd_conf="${EROOT}"/etc/${PN}/${PN}.conf |
166 |
+ # Fix up the default cloak keys. |
167 |
+ if grep -qe '"and another one";$' "${unrealircd_conf}" && grep -qe '"aoAr1HnR6gl3sJ7hVz4Zb7x4YwpW";$' "${unrealircd_conf}"; then |
168 |
+ ebegin "Generating cloak-keys" |
169 |
+ local keys=( |
170 |
+ $(su ${PN} -s /bin/sh -c "${PN} -k 2>&1 | tail -n 3") |
171 |
+ ) |
172 |
+ [[ -n ${keys[0]} || -n ${keys[1]} || -n ${keys[2]} ]] |
173 |
+ eend $? |
174 |
+ |
175 |
+ ebegin "Substituting cloak-keys into ${unrealircd_conf}" |
176 |
+ sed -i \ |
177 |
+ -e '/cloak-keys/ { |
178 |
+n |
179 |
+s/"aoAr1HnR6gl3sJ7hVz4Zb7x4YwpW";/"'"${keys[0]}"'";/ |
180 |
+n |
181 |
+s/"and another one";/"'"${keys[1]}"'";/ |
182 |
+n |
183 |
+s/"and another one";/"'"${keys[2]}"'";/ |
184 |
+}' \ |
185 |
+ "${unrealircd_conf}" |
186 |
+ eend $? |
187 |
+ fi |
188 |
+ |
189 |
+ elog "UnrealIRCd will not run until you've set up /etc/unrealircd/unrealircd.conf" |
190 |
+ elog |
191 |
+ elog "You can also configure ${PN} start at boot with rc-update(1)." |
192 |
+ elog "It is recommended to run unrealircd as an unprivileged user." |
193 |
+ elog "The provided init.d script does this for you." |
194 |
+} |