From 71aead8e715367317433b7609da09a002d4b0be2 Mon Sep 17 00:00:00 2001 From: "Anna (cybertailor) Vyalkova" Date: Sat, 19 Feb 2022 21:12:24 +0500 Subject: [PATCH] net-irc/pounce: initial import Signed-off-by: Anna (cybertailor) Vyalkova --- net-irc/pounce/Manifest | 1 + net-irc/pounce/files/example.conf | 5 +++ net-irc/pounce/files/pounce.confd | 2 + net-irc/pounce/files/pounce.initd | 25 +++++++++++ net-irc/pounce/metadata.xml | 18 ++++++++ net-irc/pounce/pounce-3.0.ebuild | 71 +++++++++++++++++++++++++++++++ 6 files changed, 122 insertions(+) create mode 100644 net-irc/pounce/Manifest create mode 100644 net-irc/pounce/files/example.conf create mode 100644 net-irc/pounce/files/pounce.confd create mode 100644 net-irc/pounce/files/pounce.initd create mode 100644 net-irc/pounce/metadata.xml create mode 100644 net-irc/pounce/pounce-3.0.ebuild diff --git a/net-irc/pounce/Manifest b/net-irc/pounce/Manifest new file mode 100644 index 0000000000..e69a997fa7 --- /dev/null +++ b/net-irc/pounce/Manifest @@ -0,0 +1 @@ +DIST pounce-3.0.tar.gz 50497 BLAKE2B 2c86ca02110b5bcfdcfa8d2a1fd75c804a64c382fc428550a5d8cd2489c60ecfffac55fa01cd6a6f9f0347ac64d6fe599c454c77e0247e26d9661ac47a2196ce SHA512 76fce4820c877202720505a96d45394027d88f9755fe9a96fb69e305699022d61f8dba7db524b0bc5058b5f999bcd02b82904525d3284b34a29ffbe64c1c3bc0 diff --git a/net-irc/pounce/files/example.conf b/net-irc/pounce/files/example.conf new file mode 100644 index 0000000000..795602276c --- /dev/null +++ b/net-irc/pounce/files/example.conf @@ -0,0 +1,5 @@ +# See pounce(1) for the list of available options. + +#local-cert = /etc/letsencrypt/live/example.com/fullchain.pem +#local-priv = /etc/letsencrypt/live/example.com/privkey.pem +#host = remote-irc.example.com diff --git a/net-irc/pounce/files/pounce.confd b/net-irc/pounce/files/pounce.confd new file mode 100644 index 0000000000..dc0f27c122 --- /dev/null +++ b/net-irc/pounce/files/pounce.confd @@ -0,0 +1,2 @@ +# Configuration file. +POUNCE_CONFIG="/etc/pounce/example.conf" diff --git a/net-irc/pounce/files/pounce.initd b/net-irc/pounce/files/pounce.initd new file mode 100644 index 0000000000..84e17d42c7 --- /dev/null +++ b/net-irc/pounce/files/pounce.initd @@ -0,0 +1,25 @@ +#!/sbin/openrc-run +# Copyright 2022 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +extra_started_commands="reload" + +description="IRC bouncer" +description_reload="Refresh TLS keys" + +command="/usr/bin/pounce" +command_args="${POUNCE_CONFIG}" +command_background=yes +pidfile="/run/${RC_SVCNAME}.pid" +output_log="/var/log/${RC_SVCNAME}.log" +error_log="${output_log}" + +depend() { + need net +} + +reload() { + ebegin "Refreshing ${RC_SVCNAME} keys" + start-stop-daemon --signal SIGUSR1 --pidfile "${pidfile}" + eend $? "Failed to reload ${RC_SVCNAME}" +} diff --git a/net-irc/pounce/metadata.xml b/net-irc/pounce/metadata.xml new file mode 100644 index 0000000000..6dc991bba5 --- /dev/null +++ b/net-irc/pounce/metadata.xml @@ -0,0 +1,18 @@ + + + + + cyber+gentoo@sysrq.in + Anna + + + + june@causal.agency + June + + mailto:list+pounce@causal.agency + + + Provide push notifications for the Palaver IRC app + + diff --git a/net-irc/pounce/pounce-3.0.ebuild b/net-irc/pounce/pounce-3.0.ebuild new file mode 100644 index 0000000000..94675d8f14 --- /dev/null +++ b/net-irc/pounce/pounce-3.0.ebuild @@ -0,0 +1,71 @@ +# Copyright 2022 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit toolchain-funcs + +DESCRIPTION="Multi-client, TLS-only IRC bouncer" +HOMEPAGE="https://git.causal.agency/pounce/about/" +SRC_URI="https://git.causal.agency/${PN}/snapshot/${P}.tar.gz" + +LICENSE="GPL-3" +SLOT="0" +KEYWORDS="~amd64" +IUSE="palaver" + +DEPEND=" + dev-libs/libretls:= + virtual/libcrypt:= + palaver? ( + dev-db/sqlite:3 + net-misc/curl + ) +" +RDEPEND="${DEPEND}" +BDEPEND=" + virtual/pkgconfig +" + +DOCS=( {QUIRKS,README}.7 ) + +src_configure() { + local confargs=( + --prefix="${EPREFIX}/usr" + --mandir="${EPREFIX}/usr/share/man" + ) + + # note: not an autoconf configure script + ./configure "${confargs[@]}" || die + + pushd extra/notify >/dev/null || die + ./configure "${confargs[@]}" || die + popd >/dev/null || die + + if use palaver; then + pushd extra/palaver >/dev/null || die + ./configure "${confargs[@]}" || die + popd >/dev/null || die + fi + + tc-export CC +} + +src_compile() { + emake all + emake -C extra/notify + use palaver && emake -C extra/palaver +} + +src_install() { + emake DESTDIR="${D}" install + emake -C extra/notify DESTDIR="${D}" install + use palaver && emake -C extra/palaver DESTDIR="${D}" install + einstalldocs + + newinitd "${FILESDIR}"/pounce.initd pounce + newconfd "${FILESDIR}"/pounce.confd pounce + + insinto /etc/pounce + doins "${FILESDIR}"/example.conf +}