diff options
author | Conrad Kostecki <conikost@gentoo.org> | 2020-08-29 02:43:41 +0200 |
---|---|---|
committer | Conrad Kostecki <conikost@gentoo.org> | 2020-08-29 02:44:08 +0200 |
commit | a4dc42a459fc2f2ecf185b54ddeba53d999034ab (patch) | |
tree | 8342a21e9e0025bb6ba1406f2cd31b0d4d54727d /net-irc/znc-palaver | |
parent | app-admin/sudo: Stabilize 1.9.2 arm64, #738336 (diff) | |
download | gentoo-a4dc42a459fc2f2ecf185b54ddeba53d999034ab.tar.gz gentoo-a4dc42a459fc2f2ecf185b54ddeba53d999034ab.tar.bz2 gentoo-a4dc42a459fc2f2ecf185b54ddeba53d999034ab.zip |
net-irc/znc-palaver: new package
Palaver ZNC module provides push notifications
to Palaver while Palaver is disconnected from IRC.
Package-Manager: Portage-3.0.4, Repoman-3.0.1
Signed-off-by: Conrad Kostecki <conikost@gentoo.org>
Diffstat (limited to 'net-irc/znc-palaver')
-rw-r--r-- | net-irc/znc-palaver/Manifest | 1 | ||||
-rw-r--r-- | net-irc/znc-palaver/files/znc-palaver-1.2.1-python310.patch | 48 | ||||
-rw-r--r-- | net-irc/znc-palaver/files/znc-palaver-1.2.1-xunit2.patch | 23 | ||||
-rw-r--r-- | net-irc/znc-palaver/metadata.xml | 16 | ||||
-rw-r--r-- | net-irc/znc-palaver/znc-palaver-1.2.1.ebuild | 60 |
5 files changed, 148 insertions, 0 deletions
diff --git a/net-irc/znc-palaver/Manifest b/net-irc/znc-palaver/Manifest new file mode 100644 index 000000000000..b1dc595c2cc7 --- /dev/null +++ b/net-irc/znc-palaver/Manifest @@ -0,0 +1 @@ +DIST znc-palaver-1.2.1.tar.gz 13302 BLAKE2B 0a46e4dd93f06a2b1705d619b0960a246ebf326fe4ca1afdc152a90274984421478ff52bd942a09dffe58349477d622b2839b2e1af0cb11b5bc8c7a329d3b3a4 SHA512 0cfa4dfcebca79ed0aaa9b44c7395318782237a8752e26810686276587004ab95342f5983e6c9a74950da062c34e634d8a4bf502977289e59686eef069dca84a 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 new file mode 100644 index 000000000000..79e06f30a5ef --- /dev/null +++ b/net-irc/znc-palaver/files/znc-palaver-1.2.1-python310.patch @@ -0,0 +1,48 @@ +From 3d5a1a3c2a7cb3de82c618b1e70618195ec4a1e7 Mon Sep 17 00:00:00 2001 +From: Conrad Kostecki <conrad@kostecki.com> +Date: Fri, 28 Aug 2020 23:48:23 +0200 +Subject: [PATCH] test/test_palaver.py: loop argument is deprecated + +DeprecationWarning: The loop argument is deprecated since Python 3.8, +and scheduled for removal in Python 3.10. + +Signed-off-by: Conrad Kostecki <conrad@kostecki.com> +--- + test/test_palaver.py | 8 ++++---- + 1 file changed, 4 insertions(+), 4 deletions(-) + +diff --git a/test/test_palaver.py b/test/test_palaver.py +index 1b27878..d22366a 100644 +--- a/test/test_palaver.py ++++ b/test/test_palaver.py +@@ -50,10 +50,10 @@ async def setUp(event_loop): + running_as_root = os.getuid() == 0 + allow_root = ' --allow-root' if running_as_root else '' + +- proc = await asyncio.create_subprocess_shell(f'znc -d test/fixtures --foreground --debug{allow_root}', loop=event_loop) ++ proc = await asyncio.create_subprocess_shell(f'znc -d test/fixtures --foreground --debug{allow_root}') + time.sleep(31 if running_as_root else 1) + +- (reader, writer) = await asyncio.open_connection('localhost', 6698, loop=event_loop) ++ (reader, writer) = await asyncio.open_connection('localhost', 6698) + writer.write(b'CAP LS 302\r\n') + + line = await reader.readline() +@@ -184,7 +184,7 @@ async def connected(reader, writer): + + connected.called = True + +- server = await asyncio.start_server(connected, host='127.0.0.1', port=0, loop=event_loop) ++ server = await asyncio.start_server(connected, host='127.0.0.1', port=0) + await asyncio.sleep(0.2) + addr = server.sockets[0].getsockname() + url = f'Serving on http://{addr[0]}:{addr[1]}/push' +@@ -248,7 +248,7 @@ async def connected(reader, writer): + + connected.called = True + +- server = await asyncio.start_server(connected, host='127.0.0.1', port=0, loop=event_loop) ++ server = await asyncio.start_server(connected, host='127.0.0.1', port=0) + await asyncio.sleep(0.2) + addr = server.sockets[0].getsockname() + url = f'Serving on http://{addr[0]}:{addr[1]}/push' 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 new file mode 100644 index 000000000000..ffbb2ad4543b --- /dev/null +++ b/net-irc/znc-palaver/files/znc-palaver-1.2.1-xunit2.patch @@ -0,0 +1,23 @@ +From 3be5f33d76d4e34b1bc2671f7dbbc6c5fc3ccadd Mon Sep 17 00:00:00 2001 +From: Conrad Kostecki <conrad@kostecki.com> +Date: Sat, 29 Aug 2020 00:06:53 +0200 +Subject: [PATCH] Makefile: use xunit2 as default for pytest + +PytestDeprecationWarning: The 'junit_family' default +value will change to 'xunit2' in pytest 6.0. + +Signed-off-by: Conrad Kostecki <conrad@kostecki.com> +--- + Makefile | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/Makefile b/Makefile +index d5d4866..e88277e 100644 +--- a/Makefile ++++ b/Makefile +@@ -30,4 +30,4 @@ test/fixtures/modules/palaver.so: palaver.so + .PHONY: test-integration + test-integration: test/fixtures/modules/palaver.so + @mkdir -p test-reports +- pytest --junitxml=test-reports/junit.xml ++ pytest -o junit_family=xunit2 --junitxml=test-reports/junit.xml diff --git a/net-irc/znc-palaver/metadata.xml b/net-irc/znc-palaver/metadata.xml new file mode 100644 index 000000000000..b0e19e1bdc90 --- /dev/null +++ b/net-irc/znc-palaver/metadata.xml @@ -0,0 +1,16 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="person"> + <email>conikost@gentoo.org</email> + <name>Conrad Kostecki</name> + </maintainer> + <longdescription> + The Palaver ZNC module provides push notifications through ZNC + for the iOS Palaver APP while being disconnected from IRC. + </longdescription> + <upstream> + <bugs-to>https://github.com/cocodelabs/znc-palaver/issues</bugs-to> + <remote-id type="github">cocodelabs/znc-palaver</remote-id> + </upstream> +</pkgmetadata> diff --git a/net-irc/znc-palaver/znc-palaver-1.2.1.ebuild b/net-irc/znc-palaver/znc-palaver-1.2.1.ebuild new file mode 100644 index 000000000000..45c850d4f1f7 --- /dev/null +++ b/net-irc/znc-palaver/znc-palaver-1.2.1.ebuild @@ -0,0 +1,60 @@ +# Copyright 2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +PYTHON_COMPAT=( python3_{6..9} ) + +inherit python-single-r1 toolchain-funcs + +DESCRIPTION="A ZNC module which provides push notifications to Palaver" +HOMEPAGE="https://github.com/cocodelabs/znc-palaver" +SRC_URI="https://github.com/cocodelabs/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz" + +LICENSE="MIT" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="test" +REQUIRED_USE="${PYTHON_REQUIRED_USE}" +RESTRICT="!test? ( test )" + +RDEPEND=" + ${PYTHON_DEPS} + net-irc/znc:=[ssl]" + +BDEPEND=" + ${RDEPEND} + $(python_gen_cond_dep ' + dev-python/pytest[${PYTHON_USEDEP}] + dev-python/pytest-asyncio[${PYTHON_USEDEP}] + dev-python/semantic_version[${PYTHON_USEDEP}] + ') +" + +DOCS=( "CHANGELOG.md" "README.md" ) + +PATCHES=( + "${FILESDIR}/${P}-python310.patch" + "${FILESDIR}/${P}-xunit2.patch" +) + +src_compile() { + tc-export CXX + + # Building znc modules by 'znc-buildmod' + # does not support multiple threads. + emake -j1 +} + +src_test() { + default + + emake test-integration +} + +src_install() { + insinto /usr/$(get_libdir)/znc + doins palaver.so + + einstalldocs +} |