diff options
author | Ronny (tastytea) Gutbrod <gentoo@tastytea.de> | 2020-04-22 20:43:24 +0200 |
---|---|---|
committer | Ronny (tastytea) Gutbrod <gentoo@tastytea.de> | 2020-04-23 01:20:42 +0200 |
commit | 0c82ef25271db6d75e7c3e162982b62796752afe (patch) | |
tree | 6d67a5fbc7019aa352247f285be419561ed14767 /net-im/biboumi | |
parent | media-tv/droidcam: auto load module (diff) | |
download | guru-0c82ef25271db6d75e7c3e162982b62796752afe.tar.gz guru-0c82ef25271db6d75e7c3e162982b62796752afe.tar.bz2 guru-0c82ef25271db6d75e7c3e162982b62796752afe.zip |
net-im/biboumi: New package.
Signed-off-by: Ronny (tastytea) Gutbrod <gentoo@tastytea.de>
Diffstat (limited to 'net-im/biboumi')
-rw-r--r-- | net-im/biboumi/Manifest | 1 | ||||
-rw-r--r-- | net-im/biboumi/biboumi-8.4.ebuild | 98 | ||||
-rw-r--r-- | net-im/biboumi/files/biboumi.initd | 21 | ||||
-rw-r--r-- | net-im/biboumi/files/biboumi.logrotate.openrc | 10 | ||||
-rw-r--r-- | net-im/biboumi/files/biboumi.logrotate.systemd | 8 | ||||
-rw-r--r-- | net-im/biboumi/metadata.xml | 22 |
6 files changed, 160 insertions, 0 deletions
diff --git a/net-im/biboumi/Manifest b/net-im/biboumi/Manifest new file mode 100644 index 000000000..7da872e6b --- /dev/null +++ b/net-im/biboumi/Manifest @@ -0,0 +1 @@ +DIST biboumi-8.4.tar.xz 142576 BLAKE2B 3be5f8caf406c480a2750d76eacfe9191bccd8bd0fc2ba0ffe6352bf6f6527ab60f16eb25c9820c063af6c9ff4f1b125eb8d51d53bae4392a0d276e7ad488087 SHA512 69f7a47aaf2729a6bffb047201305cef4b87da952aa103d82e715585bf7b2e97fca8159ced1d74c4b01508c874c0db274d7b8349d1579ee3e69fc0ced2c260c2 diff --git a/net-im/biboumi/biboumi-8.4.ebuild b/net-im/biboumi/biboumi-8.4.ebuild new file mode 100644 index 000000000..280f4b3ea --- /dev/null +++ b/net-im/biboumi/biboumi-8.4.ebuild @@ -0,0 +1,98 @@ +# Copyright 2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +inherit cmake fcaps + +DESCRIPTION="XMPP gateway to IRC" +HOMEPAGE="https://biboumi.louiz.org/" +SRC_URI="https://git.louiz.org/biboumi/snapshot/biboumi-${PV}.tar.xz" + +LICENSE="ZLIB" +SLOT="0" +KEYWORDS="~amd64" +IUSE="+idn logrotate postgres +sqlite +ssl systemd udns" + +DEPEND=" + dev-libs/expat + virtual/libiconv + sys-apps/util-linux + sqlite? ( dev-db/sqlite ) + 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="app-text/pandoc" +RDEPEND=" + ${DEPEND} + acct-user/biboumi" + +DOCS=( README.rst CHANGELOG.rst ) + +# Allow biboumi to run an identd on port 113. +FILECAPS=( cap_net_bind_service+ep usr/bin/biboumi ) + +src_prepare() { + cmake_src_prepare + + if ! use systemd; then # Don't install biboumi.service. + sed -i '/DESTINATION lib\/systemd\/system/d' CMakeLists.txt || die + fi +} + +src_configure() { + local mycmakeargs=( + -DWITH_BOTAN="$(usex ssl)" + -DWITH_LIBIDN="$(usex idn)" + -DWITH_SYSTEMD="$(usex systemd)" + -DWITH_UDNS="$(usex udns)" + -DWITH_SQLITE3="$(usex sqlite)" + -DWITH_POSTGRESQL="$(usex postgres)" + + -DWITHOUT_SYSTEMD="$(usex systemd no yes)" + -DWITHOUT_UDNS="$(usex udns no yes)" + -DWITHOUT_POSTGRESQL="$(usex postgres no yes)" + ) # The WITHOUT_* is really needed. + + cmake_src_configure +} + +src_compile() { + cmake_src_compile + + # The man page is not generated by the build system. + mkdir "${S}/man" || die + pandoc --standalone --to=man "doc/biboumi.1.rst" \ + --output="${S}/man/biboumi.1" || die +} + +src_install() { + cmake_src_install + + if ! use systemd; then + newinitd "${FILESDIR}/${PN}.initd" "${PN}" + fi + + if use logrotate; then + insinto etc/logrotate.d + if use systemd; then + newins "${FILESDIR}/${PN}.logrotate.systemd" "${PN}" + else + newins "${FILESDIR}/${PN}.logrotate.openrc" "${PN}" + fi + fi + + 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 + doins conf/biboumi.cfg +} diff --git a/net-im/biboumi/files/biboumi.initd b/net-im/biboumi/files/biboumi.initd new file mode 100644 index 000000000..665db9120 --- /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.openrc b/net-im/biboumi/files/biboumi.logrotate.openrc new file mode 100644 index 000000000..19964cf60 --- /dev/null +++ b/net-im/biboumi/files/biboumi.logrotate.openrc @@ -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/files/biboumi.logrotate.systemd b/net-im/biboumi/files/biboumi.logrotate.systemd new file mode 100644 index 000000000..b14f1df05 --- /dev/null +++ b/net-im/biboumi/files/biboumi.logrotate.systemd @@ -0,0 +1,8 @@ +/var/log/biboumi/*.log { + missingok + notifempty + sharedscripts + postrotate + systemctl reload biboumi.service + endscript +} diff --git a/net-im/biboumi/metadata.xml b/net-im/biboumi/metadata.xml new file mode 100644 index 000000000..dabf900f8 --- /dev/null +++ b/net-im/biboumi/metadata.xml @@ -0,0 +1,22 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="person"> + <email>gentoo@tastytea.de</email> + <name>Ronny (tastytea) Gutbrod</name> + </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> + <flag name="logrotate">Use app-admin/logrotate for rotating logs</flag> + </use> +</pkgmetadata> |