This repository has been archived on 2024-09-25. You can view files and clone it, but cannot push or open issues or pull requests.
overlay/net-im/biboumi/biboumi-8.4-r3.ebuild
tastytea d7b224e02b
Some checks failed
continuous-integration/drone/push Build is failing
net-im/biboumi: Bump to 8.4-r3, forgot to inherit fcaps.
2020-04-13 04:10:39 +02:00

92 lines
2.0 KiB
Bash

# 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 ~x86"
IUSE="+idn logrotate postgres +sqlite +ssl systemd udns"
RDEPEND="
acct-user/biboumi
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 )
"
DEPEND="${RDEPEND}"
BDEPEND="app-text/pandoc"
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
newinitd "${FILESDIR}/${PN}.initd" "${PN}"
if use logrotate; then
insinto /etc/logrotate.d
newins "${FILESDIR}/${PN}.logrotate" "${PN}" || die
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 || die
}