biboumi: addition

This commit is contained in:
layman 2019-01-05 12:38:07 +01:00
parent 64349b67a4
commit eb1dc801c2
No known key found for this signature in database
GPG key ID: 92D2BF778E1308C0
6 changed files with 236 additions and 0 deletions

View file

@ -0,0 +1,67 @@
# Copyright 2019 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=6
DESCRIPTION="Biboumi is an XMPP <-> IRC gateway"
HOMEPAGE="https://lab.louiz.org/louiz/biboumi"
EGIT_REPO_URI="https://lab.louiz.org/louiz/biboumi.git"
if [[ "$PV" != "9999" ]] ; then
EGIT_COMMIT="$PV"
PATCHES=(
"${FILESDIR}/001-CMAKE-empty-string.patch"
)
fi
LICENSE="ZLIB"
SLOT="0"
KEYWORDS=""
IUSE="postgres sqlite ssl"
DEPEND="
dev-libs/expat
net-dns/c-ares
net-dns/libidn:0
net-im/jabber-base
net-libs/udns
virtual/libiconv
ssl? ( dev-libs/botan:2 )
postgres? ( dev-db/postgresql:* )
sqlite? ( dev-db/sqlite )
"
RDEPEND="${DEPEND}"
inherit git-r3 cmake-utils
DIRS="/var/log/biboumi /var/lib/biboumi"
src_configure() {
local mycmakeargs=(
-DWITH_POSTGRESQL="$(usex postgres)"
-DWITHOUT_POSTGRESQL="$(usex !postgres)"
-DWITH_SQLITE3="$(usex sqlite)"
-DWITHOUT_SQLITE3="$(usex !sqlite)"
)
cmake-utils_src_configure
}
src_install() {
cmake-utils_src_install
newinitd "${FILESDIR}/${PN}".initd "${PN}"
insinto /etc/logrotate.d
newins "${FILESDIR}/${PN}".logrotate "${PN}"
for dir in $DIRS
do
keepdir $dir
done
}
pkg_postinst() {
for dir in $DIRS
do
chown jabber:jabber $dir
chmod u=rwx,g=rx,o= $dir
done
}

View file

@ -0,0 +1,67 @@
# Copyright 2019 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=6
DESCRIPTION="Biboumi is an XMPP <-> IRC gateway"
HOMEPAGE="https://lab.louiz.org/louiz/biboumi"
EGIT_REPO_URI="https://lab.louiz.org/louiz/biboumi.git"
if [[ "$PV" != "9999" ]] ; then
EGIT_COMMIT="$PV"
PATCHES=(
"${FILESDIR}/001-CMAKE-empty-string.patch"
)
fi
LICENSE="ZLIB"
SLOT="0"
KEYWORDS=""
IUSE="postgres sqlite ssl"
DEPEND="
dev-libs/expat
net-dns/c-ares
net-dns/libidn:0
net-im/jabber-base
net-libs/udns
virtual/libiconv
ssl? ( dev-libs/botan:2 )
postgres? ( dev-db/postgresql:* )
sqlite? ( dev-db/sqlite )
"
RDEPEND="${DEPEND}"
inherit git-r3 cmake-utils
DIRS="/var/log/biboumi /var/lib/biboumi"
src_configure() {
local mycmakeargs=(
-DWITH_POSTGRESQL="$(usex postgres)"
-DWITHOUT_POSTGRESQL="$(usex !postgres)"
-DWITH_SQLITE3="$(usex sqlite)"
-DWITHOUT_SQLITE3="$(usex !sqlite)"
)
cmake-utils_src_configure
}
src_install() {
cmake-utils_src_install
newinitd "${FILESDIR}/${PN}".initd "${PN}"
insinto /etc/logrotate.d
newins "${FILESDIR}/${PN}".logrotate "${PN}"
for dir in $DIRS
do
keepdir $dir
done
}
pkg_postinst() {
for dir in $DIRS
do
chown jabber:jabber $dir
chmod u=rwx,g=rx,o= $dir
done
}

View file

@ -0,0 +1,55 @@
From e3730c5a40a9d4a098ae9fb9a3bd867803007da1 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?louiz=E2=80=99?= <louiz@louiz.org>
Date: Fri, 8 Jun 2018 19:13:00 +0200
Subject: [PATCH] =?UTF-8?q?Don=E2=80=99t=20add=5Flibrary(database)=20with?=
=?UTF-8?q?=20an=20empty=20string,=20that=E2=80=99s=20not=20portable?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Instead, dont create the library at all if not needed.
---
CMakeLists.txt | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 1d57a0b..7539886 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -218,8 +218,6 @@ if(SQLITE3_FOUND OR PQ_FOUND)
include_directories(database ${PQ_INCLUDE_DIRS})
endif()
set(USE_DATABASE TRUE)
-else()
- add_library(database OBJECT "")
endif()
#
@@ -235,8 +233,7 @@ add_executable(${PROJECT_NAME} src/main.cpp
$<TARGET_OBJECTS:xmpp>
$<TARGET_OBJECTS:bridge>
$<TARGET_OBJECTS:irc>
- $<TARGET_OBJECTS:identd>
- $<TARGET_OBJECTS:database>)
+ $<TARGET_OBJECTS:identd>)
## test_suite
file(GLOB source_tests
@@ -249,9 +246,12 @@ add_executable(test_suite ${source_tests}
$<TARGET_OBJECTS:xmpp>
$<TARGET_OBJECTS:bridge>
$<TARGET_OBJECTS:irc>
- $<TARGET_OBJECTS:identd>
- $<TARGET_OBJECTS:database>)
+ $<TARGET_OBJECTS:identd>)
set_target_properties(test_suite PROPERTIES EXCLUDE_FROM_ALL TRUE)
+if(USE_DATABASE)
+ target_link_libraries(${PROJECT_NAME} $<TARGET_OBJECTS:database>)
+ target_link_libraries(test_suite $<TARGET_OBJECTS:database>)
+endif()
#
## Link the executables with their libraries
--
2.14.5

View file

@ -0,0 +1,22 @@
#!/sbin/openrc-run
# Copyright 1999-2017 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Id$
pidfile="/var/run/biboumi.pid"
command="/usr/bin/biboumi"
command_args="${BIBOUMI_CONFIG:-/etc/biboumi/biboumi.cfg}"
command_user="${BIBOUMI_USER:-jabber}"
command_background="true"
extra_commands="reload"
depend() {
use net
use jabber-server
}
reload() {
ebegin "Reloading configuration of Biboumi"
start-stop-daemon -p ${pidfile} -s USR1
eend $?
}

View file

@ -0,0 +1,11 @@
/var/log/biboumi/biboumi.log {
daily
rotate 14
compress
create 640 jabber adm
postrotate
rc-service biboumi reload > /dev/null
endscript
sharedscripts
missingok
}

View file

@ -0,0 +1,14 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
<maintainer type="person">
<email>gentoo@meskal.net</email>
<name>Tobias Klaus</name>
<description>Ebuild author</description>
</maintainer>
<longdescription>
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>
</pkgmetadata>