From ceadc1716ca98100b76e0083d0dfae2d9bc6cfc1 Mon Sep 17 00:00:00 2001 From: Florian Schmaus Date: Tue, 1 Feb 2022 11:35:01 +0100 Subject: [PATCH] net-im/biboumi: initial import Signed-off-by: Florian Schmaus --- net-im/biboumi/Manifest | 1 + net-im/biboumi/biboumi-9.0-r2.ebuild | 110 +++++++++++++++++++++++++ net-im/biboumi/files/biboumi.initd | 21 +++++ net-im/biboumi/files/biboumi.logrotate | 10 +++ net-im/biboumi/metadata.xml | 21 +++++ 5 files changed, 163 insertions(+) create mode 100644 net-im/biboumi/Manifest create mode 100644 net-im/biboumi/biboumi-9.0-r2.ebuild create mode 100644 net-im/biboumi/files/biboumi.initd create mode 100644 net-im/biboumi/files/biboumi.logrotate create mode 100644 net-im/biboumi/metadata.xml diff --git a/net-im/biboumi/Manifest b/net-im/biboumi/Manifest new file mode 100644 index 0000000000000..34c6c222de56e --- /dev/null +++ b/net-im/biboumi/Manifest @@ -0,0 +1 @@ +DIST biboumi-9.0.tar.xz 161192 BLAKE2B 27c19f5c44e23caae07bd579b01d663e73cd8b432203ac95ae77e651936eea7cc443f389e589acebe5b36c32e96f215fdf0a86c97193726d601b53b709a2d66e SHA512 cfaacd831b56031906922472275c55fd6f1a5307ebe54959d21e3799ad4612499e8beeb34e8736df9eabc9fec1a861d17567250d64f316ace47395fd6c8f3c18 diff --git a/net-im/biboumi/biboumi-9.0-r2.ebuild b/net-im/biboumi/biboumi-9.0-r2.ebuild new file mode 100644 index 0000000000000..4f571807cf7ef --- /dev/null +++ b/net-im/biboumi/biboumi-9.0-r2.ebuild @@ -0,0 +1,110 @@ +# Copyright 2020-2022 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit cmake + +MY_PV="${PV/_/-}" + +DESCRIPTION="XMPP gateway to IRC" +HOMEPAGE="https://biboumi.louiz.org/" +SRC_URI="https://git.louiz.org/biboumi/snapshot/biboumi-${MY_PV}.tar.xz" + +LICENSE="ZLIB" +SLOT="0" +KEYWORDS="~amd64" +IUSE="+idn postgres +sqlite +ssl systemd udns" + +DEPEND=" + dev-libs/expat + virtual/libiconv + sys-apps/util-linux + sqlite? ( dev-db/sqlite:3 ) + postgres? ( dev-db/postgresql:* ) + idn? ( net-dns/libidn:= ) + udns? ( net-libs/udns ) + ssl? ( dev-libs/botan:2= ) + !ssl? ( dev-libs/libgcrypt ) + systemd? ( sys-apps/systemd:= ) +" +BDEPEND="dev-python/sphinx" +RDEPEND=" + ${DEPEND} + acct-user/biboumi +" + +S="${WORKDIR}/${PN}-${MY_PV}" + +DOCS=( README.rst CHANGELOG.rst doc/user.rst ) + +src_configure() { + local mycmakeargs=( + -DSERVICE_USER="${PN}" + -DSERVICE_GROUP="${PN}" + ) + + # Account for biboumi's atypical configuration system. + if use systemd; then + mycmakeargs+=(-DWITH_SYSTEMD=yes) + else + mycmakeargs+=(-DWITHOUT_SYSTEMD=yes) + fi + + if use idn; then + mycmakeargs+=(-DWITH_LIBIDN=yes) + else + mycmakeargs+=(-DWITHOUT_LIBIDN=yes) + fi + + if use ssl; then + mycmakeargs+=(-DWITH_BOTAN=yes) + else + mycmakeargs+=(-DWITHOUT_BOTAN=yes) + fi + + if use udns; then + mycmakeargs+=(-DWITH_UDNS=yes) + else + mycmakeargs+=(-DWITHOUT_UDNS=yes) + fi + + if use sqlite; then + mycmakeargs+=(-DWITH_SQLITE3=yes) + else + mycmakeargs+=(-DWITHOUT_SQLITE3=yes) + fi + + if use postgres; then + mycmakeargs+=(-DWITH_POSTGRESQL=yes) + else + mycmakeargs+=(-DWITHOUT_POSTGRESQL=yes) + fi + + cmake_src_configure +} + +src_compile() { + cmake_src_compile + + cmake_build man +} + +src_install() { + cmake_src_install + + newinitd "${FILESDIR}/${PN}.initd" "${PN}" + + insinto /etc/logrotate.d + newins "${FILESDIR}/${PN}.logrotate" "${PN}" + + diropts --owner=biboumi --group=biboumi --mode=750 + if use sqlite; then + keepdir /var/lib/biboumi + fi + keepdir /var/log/biboumi + + insinto /etc/biboumi + insopts --group=biboumi --mode=640 + newins conf/biboumi.cfg biboumi.cfg.example +} diff --git a/net-im/biboumi/files/biboumi.initd b/net-im/biboumi/files/biboumi.initd new file mode 100644 index 0000000000000..665db9120c9c7 --- /dev/null +++ b/net-im/biboumi/files/biboumi.initd @@ -0,0 +1,21 @@ +#!/sbin/openrc-run +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +description="XMPP gateway to IRC" +pidfile="/var/run/biboumi.pid" +command="/usr/bin/biboumi" +command_args="${BIBOUMI_CONFIG:-/etc/biboumi/biboumi.cfg}" +command_user="${BIBOUMI_USER:-biboumi}" +command_background="true" +extra_commands="reload" + +depend() { + use jabber-server +} + +reload() { + ebegin "Reloading configuration of Biboumi" + start-stop-daemon --pidfile ${pidfile} --signal USR1 + eend $? +} diff --git a/net-im/biboumi/files/biboumi.logrotate b/net-im/biboumi/files/biboumi.logrotate new file mode 100644 index 0000000000000..19964cf60f3f1 --- /dev/null +++ b/net-im/biboumi/files/biboumi.logrotate @@ -0,0 +1,10 @@ +/var/log/biboumi/*.log { + missingok + notifempty + sharedscripts + postrotate + for service in /etc/init.d/biboumi*; do + rc-service $(basename ${service}) reload > /dev/null + done + endscript +} diff --git a/net-im/biboumi/metadata.xml b/net-im/biboumi/metadata.xml new file mode 100644 index 0000000000000..cbe709768d655 --- /dev/null +++ b/net-im/biboumi/metadata.xml @@ -0,0 +1,21 @@ + + + + + Florian Schmaus + flow@gentoo.org + + + Biboumi is an XMPP gateway that connects to IRC servers and translates + between the two protocols. It can be used to access IRC channels using + any XMPP client as if these channels were XMPP MUCs. + + + https://doc.biboumi.louiz.org/ + https://lab.louiz.org/louiz/biboumi/-/issues + + + Asynchronously resolve domain names using + net-libs/udns + +