summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFlorian Schmaus <flow@gentoo.org>2022-02-01 11:35:01 +0100
committerFlorian Schmaus <flow@gentoo.org>2022-02-01 11:35:16 +0100
commitceadc1716ca98100b76e0083d0dfae2d9bc6cfc1 (patch)
tree3cbe141f141925e968ae314a0f5be4f06949a150 /net-im/biboumi
parentacct-user/biboumi: initial import (diff)
downloadgentoo-ceadc1716ca98100b76e0083d0dfae2d9bc6cfc1.tar.gz
gentoo-ceadc1716ca98100b76e0083d0dfae2d9bc6cfc1.tar.bz2
gentoo-ceadc1716ca98100b76e0083d0dfae2d9bc6cfc1.zip
net-im/biboumi: initial import
Signed-off-by: Florian Schmaus <flow@gentoo.org>
Diffstat (limited to 'net-im/biboumi')
-rw-r--r--net-im/biboumi/Manifest1
-rw-r--r--net-im/biboumi/biboumi-9.0-r2.ebuild110
-rw-r--r--net-im/biboumi/files/biboumi.initd21
-rw-r--r--net-im/biboumi/files/biboumi.logrotate10
-rw-r--r--net-im/biboumi/metadata.xml21
5 files changed, 163 insertions, 0 deletions
diff --git a/net-im/biboumi/Manifest b/net-im/biboumi/Manifest
new file mode 100644
index 000000000000..34c6c222de56
--- /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 000000000000..4f571807cf7e
--- /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 000000000000..665db9120c9c
--- /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 000000000000..19964cf60f3f
--- /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 000000000000..cbe709768d65
--- /dev/null
+++ b/net-im/biboumi/metadata.xml
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <name>Florian Schmaus</name>
+ <email>flow@gentoo.org</email>
+ </maintainer>
+ <longdescription lang="en">
+ 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.
+ </longdescription>
+ <upstream>
+ <doc>https://doc.biboumi.louiz.org/</doc>
+ <bugs-to> https://lab.louiz.org/louiz/biboumi/-/issues</bugs-to>
+ </upstream>
+ <use>
+ <flag name="udns">Asynchronously resolve domain names using
+ net-libs/udns</flag>
+ </use>
+</pkgmetadata>