commit: 0c82ef25271db6d75e7c3e162982b62796752afe Author: Ronny (tastytea) Gutbrod <gentoo <AT> tastytea <DOT> de> AuthorDate: Wed Apr 22 18:43:24 2020 +0000 Commit: Ronny Gutbrod <gentoo <AT> tastytea <DOT> de> CommitDate: Wed Apr 22 23:20:42 2020 +0000 URL: https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=0c82ef25
net-im/biboumi: New package. Signed-off-by: Ronny (tastytea) Gutbrod <gentoo <AT> tastytea.de> acct-group/biboumi/biboumi-0.ebuild | 10 +++ acct-group/biboumi/metadata.xml | 8 +++ acct-user/biboumi/biboumi-0.ebuild | 14 ++++ acct-user/biboumi/metadata.xml | 8 +++ net-im/biboumi/Manifest | 1 + net-im/biboumi/biboumi-8.4.ebuild | 98 ++++++++++++++++++++++++++ net-im/biboumi/files/biboumi.initd | 21 ++++++ net-im/biboumi/files/biboumi.logrotate.openrc | 10 +++ net-im/biboumi/files/biboumi.logrotate.systemd | 8 +++ net-im/biboumi/metadata.xml | 22 ++++++ 10 files changed, 200 insertions(+) diff --git a/acct-group/biboumi/biboumi-0.ebuild b/acct-group/biboumi/biboumi-0.ebuild new file mode 100644 index 0000000..3502881 --- /dev/null +++ b/acct-group/biboumi/biboumi-0.ebuild @@ -0,0 +1,10 @@ +# Copyright 2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +inherit acct-group + +KEYWORDS="~amd64" + +ACCT_GROUP_ID=-1 diff --git a/acct-group/biboumi/metadata.xml b/acct-group/biboumi/metadata.xml new file mode 100644 index 0000000..5533c93 --- /dev/null +++ b/acct-group/biboumi/metadata.xml @@ -0,0 +1,8 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="person"> + <email>gen...@tastytea.de</email> + <name>Ronny (tastytea) Gutbrod</name> + </maintainer> +</pkgmetadata> diff --git a/acct-user/biboumi/biboumi-0.ebuild b/acct-user/biboumi/biboumi-0.ebuild new file mode 100644 index 0000000..3c7f392 --- /dev/null +++ b/acct-user/biboumi/biboumi-0.ebuild @@ -0,0 +1,14 @@ +# Copyright 2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +inherit acct-user + +DESCRIPTION="User for net-im/biboumi" +KEYWORDS="~amd64" + +ACCT_USER_ID=-1 +ACCT_USER_GROUPS=( biboumi ) + +acct-user_add_deps diff --git a/acct-user/biboumi/metadata.xml b/acct-user/biboumi/metadata.xml new file mode 100644 index 0000000..5533c93 --- /dev/null +++ b/acct-user/biboumi/metadata.xml @@ -0,0 +1,8 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="person"> + <email>gen...@tastytea.de</email> + <name>Ronny (tastytea) Gutbrod</name> + </maintainer> +</pkgmetadata> diff --git a/net-im/biboumi/Manifest b/net-im/biboumi/Manifest new file mode 100644 index 0000000..7da872e --- /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 0000000..280f4b3 --- /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 0000000..665db91 --- /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 0000000..19964cf --- /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 0000000..b14f1df --- /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 0000000..dabf900 --- /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>gen...@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>