1 |
commit: 9021f41fe86b9dbc34a7c77e7e99632d435e6ef5 |
2 |
Author: Louis Sautier <sbraz <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sat Sep 28 22:25:44 2019 +0000 |
4 |
Commit: Louis Sautier <sbraz <AT> gentoo <DOT> org> |
5 |
CommitDate: Sat Sep 28 22:26:42 2019 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=9021f41f |
7 |
|
8 |
net-irc/znc: bump to 1.7.5 |
9 |
|
10 |
Package-Manager: Portage-2.3.76, Repoman-2.3.17 |
11 |
Signed-off-by: Louis Sautier <sbraz <AT> gentoo.org> |
12 |
|
13 |
net-irc/znc/Manifest | 1 + |
14 |
net-irc/znc/znc-1.7.5.ebuild | 182 +++++++++++++++++++++++++++++++++++++++++++ |
15 |
2 files changed, 183 insertions(+) |
16 |
|
17 |
diff --git a/net-irc/znc/Manifest b/net-irc/znc/Manifest |
18 |
index 4a2dbc1e157..37134a38810 100644 |
19 |
--- a/net-irc/znc/Manifest |
20 |
+++ b/net-irc/znc/Manifest |
21 |
@@ -1,2 +1,3 @@ |
22 |
DIST gtest-1.8.1.tar.gz 992298 BLAKE2B 40ef3417fe424205c0617f07207347ce671ac87605f8ac9b8a333b0b06e3fbef9f556041ee324c18f957f3258ab9fe06704f31cdd038355fb7890180eb77ced1 SHA512 e6283c667558e1fd6e49fa96e52af0e415a3c8037afe1d28b7ff1ec4c2ef8f49beb70a9327b7fc77eb4052a58c4ccad8b5260ec90e4bceeac7a46ff59c4369d7 |
23 |
DIST znc-1.7.4.tar.gz 2084756 BLAKE2B 3b389a13d7c1c59b8ac485b6996b5a56a03689e8191a65c99692ea849a99ed0a013065a47ea3d213faf883e1d3e595375a665090b4173e97261c3afe21a120e7 SHA512 ea559ee9e06bfbc51c03ef08e145bc39ee7402638cc153fab7dc1dcedae01548fa0743d726304f9e4631a66241eb96c03940b76093954093a35f69641133b2ae |
24 |
+DIST znc-1.7.5.tar.gz 2170656 BLAKE2B af5548bff1d9c6e740e668f467f52e8540a59bec9363fb4a17c594e1a9638417f75321b074e2aad6380769a594fc134543681928a7a33d00083ba9babc441a69 SHA512 f067503e5f45499c0acd687ef66266c4a65b80048e2a5835d3f9dfc4cd69b35890abdc3457726d7a7b25909f507349770eec43d9941bd62094c3527e64fbd825 |
25 |
|
26 |
diff --git a/net-irc/znc/znc-1.7.5.ebuild b/net-irc/znc/znc-1.7.5.ebuild |
27 |
new file mode 100644 |
28 |
index 00000000000..6d5656de499 |
29 |
--- /dev/null |
30 |
+++ b/net-irc/znc/znc-1.7.5.ebuild |
31 |
@@ -0,0 +1,182 @@ |
32 |
+# Copyright 1999-2019 Gentoo Authors |
33 |
+# Distributed under the terms of the GNU General Public License v2 |
34 |
+ |
35 |
+EAPI=7 |
36 |
+ |
37 |
+PYTHON_COMPAT=( python3_{5,6,7} ) |
38 |
+ |
39 |
+inherit cmake-utils python-single-r1 readme.gentoo-r1 systemd user |
40 |
+ |
41 |
+GTEST_VER="1.8.1" |
42 |
+GTEST_URL="https://github.com/google/googletest/archive/${GTEST_VER}.tar.gz -> gtest-${GTEST_VER}.tar.gz" |
43 |
+DESCRIPTION="An advanced IRC Bouncer" |
44 |
+ |
45 |
+if [[ ${PV} == *9999* ]]; then |
46 |
+ inherit git-r3 |
47 |
+ EGIT_REPO_URI=${EGIT_REPO_URI:-"https://github.com/znc/znc.git"} |
48 |
+ SRC_URI="" |
49 |
+else |
50 |
+ MY_PV=${PV/_/-} |
51 |
+ MY_P=${PN}-${MY_PV} |
52 |
+ SRC_URI=" |
53 |
+ https://znc.in/releases/archive/${MY_P}.tar.gz |
54 |
+ test? ( ${GTEST_URL} ) |
55 |
+ " |
56 |
+ KEYWORDS="~amd64 ~arm ~x86" |
57 |
+ S=${WORKDIR}/${MY_P} |
58 |
+fi |
59 |
+ |
60 |
+HOMEPAGE="https://znc.in" |
61 |
+LICENSE="Apache-2.0" |
62 |
+SLOT="0" |
63 |
+IUSE="+ipv6 +icu libressl nls perl python +ssl sasl tcl test +zlib" |
64 |
+ |
65 |
+REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} icu )" |
66 |
+ |
67 |
+RDEPEND=" |
68 |
+ icu? ( dev-libs/icu:= ) |
69 |
+ nls? ( dev-libs/boost:=[nls] ) |
70 |
+ perl? ( >=dev-lang/perl-5.10:= ) |
71 |
+ python? ( ${PYTHON_DEPS} ) |
72 |
+ sasl? ( >=dev-libs/cyrus-sasl-2 ) |
73 |
+ ssl? ( |
74 |
+ !libressl? ( dev-libs/openssl:0= ) |
75 |
+ libressl? ( dev-libs/libressl:0= ) |
76 |
+ ) |
77 |
+ tcl? ( dev-lang/tcl:0= ) |
78 |
+ zlib? ( sys-libs/zlib:0= ) |
79 |
+" |
80 |
+DEPEND=" |
81 |
+ ${RDEPEND} |
82 |
+ virtual/pkgconfig |
83 |
+ nls? ( sys-devel/gettext ) |
84 |
+ perl? ( >=dev-lang/swig-3.0.0 ) |
85 |
+ python? ( >=dev-lang/swig-3.0.0 ) |
86 |
+ test? ( dev-qt/qtnetwork:5 ) |
87 |
+" |
88 |
+ |
89 |
+PATCHES=( "${FILESDIR}"/${PN}-1.7.1-inttest-dir.patch ) |
90 |
+ |
91 |
+pkg_setup() { |
92 |
+ if use python; then |
93 |
+ python-single-r1_pkg_setup |
94 |
+ fi |
95 |
+ |
96 |
+ enewgroup ${PN} |
97 |
+ enewuser ${PN} -1 -1 /var/lib/${PN} ${PN} |
98 |
+ # The home directory was previously set to /dev/null |
99 |
+ # This caused a bug with the systemd unit |
100 |
+ # https://bugs.gentoo.org/521916 |
101 |
+ esethome ${PN} /var/lib/${PN} |
102 |
+} |
103 |
+ |
104 |
+src_prepare() { |
105 |
+ # Let SWIG rebuild modperl/modpython to make user patching easier. |
106 |
+ if [[ ${PV} != *9999* ]]; then |
107 |
+ rm modules/modperl/generated.tar.gz || die |
108 |
+ rm modules/modpython/generated.tar.gz || die |
109 |
+ fi |
110 |
+ |
111 |
+ sed -i -e "s|DZNC_BIN_DIR:path=|DZNC_BIN_DIR:path=${T}/inttest|" \ |
112 |
+ test/CMakeLists.txt || die |
113 |
+ |
114 |
+ cmake-utils_src_prepare |
115 |
+} |
116 |
+ |
117 |
+src_configure() { |
118 |
+ local mycmakeargs=( |
119 |
+ -DWANT_SYSTEMD=yes # Causes -DSYSTEMD_DIR to be used. |
120 |
+ -DSYSTEMD_DIR="$(systemd_get_systemunitdir)" |
121 |
+ -DWANT_ICU="$(usex icu)" |
122 |
+ -DWANT_IPV6="$(usex ipv6)" |
123 |
+ -DWANT_I18N="$(usex nls)" |
124 |
+ -DWANT_PERL="$(usex perl)" |
125 |
+ -DWANT_PYTHON="$(usex python)" |
126 |
+ -DWANT_CYRUS="$(usex sasl)" |
127 |
+ -DWANT_OPENSSL="$(usex ssl)" |
128 |
+ -DWANT_TCL="$(usex tcl)" |
129 |
+ -DWANT_ZLIB="$(usex zlib)" |
130 |
+ ) |
131 |
+ |
132 |
+ if [[ ${PV} != *9999* ]] && use test; then |
133 |
+ export GTEST_ROOT="${WORKDIR}/googletest-release-${GTEST_VER}/googletest" |
134 |
+ export GMOCK_ROOT="${WORKDIR}/googletest-release-${GTEST_VER}/googlemock" |
135 |
+ fi |
136 |
+ |
137 |
+ cmake-utils_src_configure |
138 |
+} |
139 |
+ |
140 |
+src_test() { |
141 |
+ cmake-utils_src_make unittest |
142 |
+ if has network-sandbox ${FEATURES}; then |
143 |
+ DESTDIR="${T}/inttest" cmake-utils_src_make install |
144 |
+ local filter='-' |
145 |
+ if ! use perl; then |
146 |
+ filter="${filter}:ZNCTest.Modperl*" |
147 |
+ fi |
148 |
+ if ! use python; then |
149 |
+ filter="${filter}:ZNCTest.Modpython*" |
150 |
+ fi |
151 |
+ # CMAKE_PREFIX_PATH and CXXFLAGS are needed for znc-buildmod |
152 |
+ # invocations from inside the test |
153 |
+ GTEST_FILTER="${filter}" ZNC_UNUSUAL_ROOT="${T}/inttest" \ |
154 |
+ CMAKE_PREFIX_PATH="${T}/inttest/usr/share/znc/cmake" \ |
155 |
+ CXXFLAGS="${CXXFLAGS} -isystem ${T}/inttest/usr/include" \ |
156 |
+ cmake-utils_src_make inttest |
157 |
+ else |
158 |
+ # TODO: don't require sandbox after |
159 |
+ # https://github.com/znc/znc/pull/1363 is implemented |
160 |
+ ewarn "FEATURES=-network-sandbox; skipping integration tests which" |
161 |
+ ewarn "temporary open local ports." |
162 |
+ fi |
163 |
+} |
164 |
+ |
165 |
+src_install() { |
166 |
+ cmake-utils_src_install |
167 |
+ |
168 |
+ dodoc NOTICE |
169 |
+ newinitd "${FILESDIR}"/znc.initd-r2 znc |
170 |
+ newconfd "${FILESDIR}"/znc.confd-r1 znc |
171 |
+ |
172 |
+ DOC_CONTENTS=$(<"${FILESDIR}/README.gentoo-r1") || die |
173 |
+ DISABLE_AUTOFORMATTING=1 |
174 |
+ readme.gentoo_create_doc |
175 |
+} |
176 |
+ |
177 |
+pkg_postinst() { |
178 |
+ if [[ -z "${REPLACING_VERSIONS}" ]]; then |
179 |
+ # This is a new installation |
180 |
+ readme.gentoo_print_elog |
181 |
+ fi |
182 |
+ |
183 |
+ if [[ -d "${EROOT}"/etc/znc ]]; then |
184 |
+ ewarn "${EROOT}/etc/znc exists on your system." |
185 |
+ ewarn "Due to the nature of the contents of that folder," |
186 |
+ ewarn "we have changed the default configuration to use" |
187 |
+ ewarn " ${EROOT}/var/lib/znc" |
188 |
+ ewarn "please move ${EROOT}/etc/znc to ${EROOT}/var/lib/znc" |
189 |
+ ewarn "or adjust your service configuration." |
190 |
+ fi |
191 |
+} |
192 |
+ |
193 |
+pkg_config() { |
194 |
+ if [[ -e "${EROOT}/var/lib/znc" ]]; then |
195 |
+ ewarn "${EROOT}/var/lib/znc already exists, aborting to avoid damaging" |
196 |
+ ewarn "any existing configuration. If you are sure you want" |
197 |
+ ewarn "to generate a new configuration, remove the folder" |
198 |
+ ewarn "and try again." |
199 |
+ else |
200 |
+ einfo "Press enter to interactively create a new configuration file for znc." |
201 |
+ einfo "To abort, press Control-C" |
202 |
+ read |
203 |
+ mkdir -p "${EROOT}/var/lib/znc" || die |
204 |
+ chown -R ${PN}:${PN} "${EROOT}/var/lib/znc" || |
205 |
+ die "Setting permissions failed" |
206 |
+ start-stop-daemon --start --user ${PN}:${PN} --env ZNC_NO_LAUNCH_AFTER_MAKECONF=1 \ |
207 |
+ "${EROOT}"/usr/bin/znc -- --makeconf --datadir "${EROOT}/var/lib/znc" || |
208 |
+ die "Config failed" |
209 |
+ einfo |
210 |
+ einfo "You can now start the znc service using the init system of your choice." |
211 |
+ einfo "Don't forget to enable it if you want to use znc at boot." |
212 |
+ fi |
213 |
+} |