1 |
commit: a4dc42a459fc2f2ecf185b54ddeba53d999034ab |
2 |
Author: Conrad Kostecki <conikost <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sat Aug 29 00:43:41 2020 +0000 |
4 |
Commit: Conrad Kostecki <conikost <AT> gentoo <DOT> org> |
5 |
CommitDate: Sat Aug 29 00:44:08 2020 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a4dc42a4 |
7 |
|
8 |
net-irc/znc-palaver: new package |
9 |
|
10 |
Palaver ZNC module provides push notifications |
11 |
to Palaver while Palaver is disconnected from IRC. |
12 |
|
13 |
Package-Manager: Portage-3.0.4, Repoman-3.0.1 |
14 |
Signed-off-by: Conrad Kostecki <conikost <AT> gentoo.org> |
15 |
|
16 |
net-irc/znc-palaver/Manifest | 1 + |
17 |
.../files/znc-palaver-1.2.1-python310.patch | 48 +++++++++++++++++ |
18 |
.../files/znc-palaver-1.2.1-xunit2.patch | 23 +++++++++ |
19 |
net-irc/znc-palaver/metadata.xml | 16 ++++++ |
20 |
net-irc/znc-palaver/znc-palaver-1.2.1.ebuild | 60 ++++++++++++++++++++++ |
21 |
5 files changed, 148 insertions(+) |
22 |
|
23 |
diff --git a/net-irc/znc-palaver/Manifest b/net-irc/znc-palaver/Manifest |
24 |
new file mode 100644 |
25 |
index 00000000000..b1dc595c2cc |
26 |
--- /dev/null |
27 |
+++ b/net-irc/znc-palaver/Manifest |
28 |
@@ -0,0 +1 @@ |
29 |
+DIST znc-palaver-1.2.1.tar.gz 13302 BLAKE2B 0a46e4dd93f06a2b1705d619b0960a246ebf326fe4ca1afdc152a90274984421478ff52bd942a09dffe58349477d622b2839b2e1af0cb11b5bc8c7a329d3b3a4 SHA512 0cfa4dfcebca79ed0aaa9b44c7395318782237a8752e26810686276587004ab95342f5983e6c9a74950da062c34e634d8a4bf502977289e59686eef069dca84a |
30 |
|
31 |
diff --git a/net-irc/znc-palaver/files/znc-palaver-1.2.1-python310.patch b/net-irc/znc-palaver/files/znc-palaver-1.2.1-python310.patch |
32 |
new file mode 100644 |
33 |
index 00000000000..79e06f30a5e |
34 |
--- /dev/null |
35 |
+++ b/net-irc/znc-palaver/files/znc-palaver-1.2.1-python310.patch |
36 |
@@ -0,0 +1,48 @@ |
37 |
+From 3d5a1a3c2a7cb3de82c618b1e70618195ec4a1e7 Mon Sep 17 00:00:00 2001 |
38 |
+From: Conrad Kostecki <conrad@××××××××.com> |
39 |
+Date: Fri, 28 Aug 2020 23:48:23 +0200 |
40 |
+Subject: [PATCH] test/test_palaver.py: loop argument is deprecated |
41 |
+ |
42 |
+DeprecationWarning: The loop argument is deprecated since Python 3.8, |
43 |
+and scheduled for removal in Python 3.10. |
44 |
+ |
45 |
+Signed-off-by: Conrad Kostecki <conrad@××××××××.com> |
46 |
+--- |
47 |
+ test/test_palaver.py | 8 ++++---- |
48 |
+ 1 file changed, 4 insertions(+), 4 deletions(-) |
49 |
+ |
50 |
+diff --git a/test/test_palaver.py b/test/test_palaver.py |
51 |
+index 1b27878..d22366a 100644 |
52 |
+--- a/test/test_palaver.py |
53 |
++++ b/test/test_palaver.py |
54 |
+@@ -50,10 +50,10 @@ async def setUp(event_loop): |
55 |
+ running_as_root = os.getuid() == 0 |
56 |
+ allow_root = ' --allow-root' if running_as_root else '' |
57 |
+ |
58 |
+- proc = await asyncio.create_subprocess_shell(f'znc -d test/fixtures --foreground --debug{allow_root}', loop=event_loop) |
59 |
++ proc = await asyncio.create_subprocess_shell(f'znc -d test/fixtures --foreground --debug{allow_root}') |
60 |
+ time.sleep(31 if running_as_root else 1) |
61 |
+ |
62 |
+- (reader, writer) = await asyncio.open_connection('localhost', 6698, loop=event_loop) |
63 |
++ (reader, writer) = await asyncio.open_connection('localhost', 6698) |
64 |
+ writer.write(b'CAP LS 302\r\n') |
65 |
+ |
66 |
+ line = await reader.readline() |
67 |
+@@ -184,7 +184,7 @@ async def connected(reader, writer): |
68 |
+ |
69 |
+ connected.called = True |
70 |
+ |
71 |
+- server = await asyncio.start_server(connected, host='127.0.0.1', port=0, loop=event_loop) |
72 |
++ server = await asyncio.start_server(connected, host='127.0.0.1', port=0) |
73 |
+ await asyncio.sleep(0.2) |
74 |
+ addr = server.sockets[0].getsockname() |
75 |
+ url = f'Serving on http://{addr[0]}:{addr[1]}/push' |
76 |
+@@ -248,7 +248,7 @@ async def connected(reader, writer): |
77 |
+ |
78 |
+ connected.called = True |
79 |
+ |
80 |
+- server = await asyncio.start_server(connected, host='127.0.0.1', port=0, loop=event_loop) |
81 |
++ server = await asyncio.start_server(connected, host='127.0.0.1', port=0) |
82 |
+ await asyncio.sleep(0.2) |
83 |
+ addr = server.sockets[0].getsockname() |
84 |
+ url = f'Serving on http://{addr[0]}:{addr[1]}/push' |
85 |
|
86 |
diff --git a/net-irc/znc-palaver/files/znc-palaver-1.2.1-xunit2.patch b/net-irc/znc-palaver/files/znc-palaver-1.2.1-xunit2.patch |
87 |
new file mode 100644 |
88 |
index 00000000000..ffbb2ad4543 |
89 |
--- /dev/null |
90 |
+++ b/net-irc/znc-palaver/files/znc-palaver-1.2.1-xunit2.patch |
91 |
@@ -0,0 +1,23 @@ |
92 |
+From 3be5f33d76d4e34b1bc2671f7dbbc6c5fc3ccadd Mon Sep 17 00:00:00 2001 |
93 |
+From: Conrad Kostecki <conrad@××××××××.com> |
94 |
+Date: Sat, 29 Aug 2020 00:06:53 +0200 |
95 |
+Subject: [PATCH] Makefile: use xunit2 as default for pytest |
96 |
+ |
97 |
+PytestDeprecationWarning: The 'junit_family' default |
98 |
+value will change to 'xunit2' in pytest 6.0. |
99 |
+ |
100 |
+Signed-off-by: Conrad Kostecki <conrad@××××××××.com> |
101 |
+--- |
102 |
+ Makefile | 2 +- |
103 |
+ 1 file changed, 1 insertion(+), 1 deletion(-) |
104 |
+ |
105 |
+diff --git a/Makefile b/Makefile |
106 |
+index d5d4866..e88277e 100644 |
107 |
+--- a/Makefile |
108 |
++++ b/Makefile |
109 |
+@@ -30,4 +30,4 @@ test/fixtures/modules/palaver.so: palaver.so |
110 |
+ .PHONY: test-integration |
111 |
+ test-integration: test/fixtures/modules/palaver.so |
112 |
+ @mkdir -p test-reports |
113 |
+- pytest --junitxml=test-reports/junit.xml |
114 |
++ pytest -o junit_family=xunit2 --junitxml=test-reports/junit.xml |
115 |
|
116 |
diff --git a/net-irc/znc-palaver/metadata.xml b/net-irc/znc-palaver/metadata.xml |
117 |
new file mode 100644 |
118 |
index 00000000000..b0e19e1bdc9 |
119 |
--- /dev/null |
120 |
+++ b/net-irc/znc-palaver/metadata.xml |
121 |
@@ -0,0 +1,16 @@ |
122 |
+<?xml version="1.0" encoding="UTF-8"?> |
123 |
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> |
124 |
+<pkgmetadata> |
125 |
+ <maintainer type="person"> |
126 |
+ <email>conikost@g.o</email> |
127 |
+ <name>Conrad Kostecki</name> |
128 |
+ </maintainer> |
129 |
+ <longdescription> |
130 |
+ The Palaver ZNC module provides push notifications through ZNC |
131 |
+ for the iOS Palaver APP while being disconnected from IRC. |
132 |
+ </longdescription> |
133 |
+ <upstream> |
134 |
+ <bugs-to>https://github.com/cocodelabs/znc-palaver/issues</bugs-to> |
135 |
+ <remote-id type="github">cocodelabs/znc-palaver</remote-id> |
136 |
+ </upstream> |
137 |
+</pkgmetadata> |
138 |
|
139 |
diff --git a/net-irc/znc-palaver/znc-palaver-1.2.1.ebuild b/net-irc/znc-palaver/znc-palaver-1.2.1.ebuild |
140 |
new file mode 100644 |
141 |
index 00000000000..45c850d4f1f |
142 |
--- /dev/null |
143 |
+++ b/net-irc/znc-palaver/znc-palaver-1.2.1.ebuild |
144 |
@@ -0,0 +1,60 @@ |
145 |
+# Copyright 2020 Gentoo Authors |
146 |
+# Distributed under the terms of the GNU General Public License v2 |
147 |
+ |
148 |
+EAPI=7 |
149 |
+ |
150 |
+PYTHON_COMPAT=( python3_{6..9} ) |
151 |
+ |
152 |
+inherit python-single-r1 toolchain-funcs |
153 |
+ |
154 |
+DESCRIPTION="A ZNC module which provides push notifications to Palaver" |
155 |
+HOMEPAGE="https://github.com/cocodelabs/znc-palaver" |
156 |
+SRC_URI="https://github.com/cocodelabs/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz" |
157 |
+ |
158 |
+LICENSE="MIT" |
159 |
+SLOT="0" |
160 |
+KEYWORDS="~amd64 ~x86" |
161 |
+IUSE="test" |
162 |
+REQUIRED_USE="${PYTHON_REQUIRED_USE}" |
163 |
+RESTRICT="!test? ( test )" |
164 |
+ |
165 |
+RDEPEND=" |
166 |
+ ${PYTHON_DEPS} |
167 |
+ net-irc/znc:=[ssl]" |
168 |
+ |
169 |
+BDEPEND=" |
170 |
+ ${RDEPEND} |
171 |
+ $(python_gen_cond_dep ' |
172 |
+ dev-python/pytest[${PYTHON_USEDEP}] |
173 |
+ dev-python/pytest-asyncio[${PYTHON_USEDEP}] |
174 |
+ dev-python/semantic_version[${PYTHON_USEDEP}] |
175 |
+ ') |
176 |
+" |
177 |
+ |
178 |
+DOCS=( "CHANGELOG.md" "README.md" ) |
179 |
+ |
180 |
+PATCHES=( |
181 |
+ "${FILESDIR}/${P}-python310.patch" |
182 |
+ "${FILESDIR}/${P}-xunit2.patch" |
183 |
+) |
184 |
+ |
185 |
+src_compile() { |
186 |
+ tc-export CXX |
187 |
+ |
188 |
+ # Building znc modules by 'znc-buildmod' |
189 |
+ # does not support multiple threads. |
190 |
+ emake -j1 |
191 |
+} |
192 |
+ |
193 |
+src_test() { |
194 |
+ default |
195 |
+ |
196 |
+ emake test-integration |
197 |
+} |
198 |
+ |
199 |
+src_install() { |
200 |
+ insinto /usr/$(get_libdir)/znc |
201 |
+ doins palaver.so |
202 |
+ |
203 |
+ einstalldocs |
204 |
+} |