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