67 lines
1.2 KiB
Bash
67 lines
1.2 KiB
Bash
# 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
|
|
}
|