gentoo-overlay/app-admin/usbguard/usbguard-0.7.5.ebuild

62 lines
1.2 KiB
Bash
Raw Normal View History

# Copyright 2019 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
inherit autotools
if [[ $PV == 9999 ]]; then
inherit git-r3
EGIT_REPO_URI="https://github.com/USBGuard/usbguard.git"
else
SRC_URI="https://github.com/USBGuard/${PN}/releases/download/${P}/${P}.tar.gz"
fi
DESCRIPTION="Software framework for implementing USB device authorization policaies"
HOMEPAGE="https://usbguard.github.io"
LICENSE="GPL-2"
SLOT="0"
KEYWORDS="amd64 x86"
IUSE="seccomp caps sodium systemd ldap dbus polkit"
BDEPEND="
ldap? ( net-nds/openldap )"
RDEPEND="
sys-cluster/libqb
dev-libs/protobuf
sodium? ( dev-libs/libsodium )
!sodium? ( dev-libs/libgcrypt )
seccomp? ( sys-libs/libseccomp )
caps? ( sys-libs/libcap-ng )
polkit? ( sys-auth/polkit )
systemd? ( sys-apps/systemd )"
DEPEND="${RDEPEND}
app-text/asciidoc"
src_prepare() {
default
eautoreconf
}
src_configure() {
econf \
--with-crypto-library=$(usex sodium "sodium" "gcrypt") \
$(use_enable systemd) \
$(use_with dbus) \
$(use_with polkit) \
$(use_with ldap) \
--disable-dependency-tracking \
--with-bundled-catch \
--with-bundled-pegtl
}
src_install() {
default
keepdir /var/lib/log/usbguard
! use systemd && doinitd "${FILESDIR}/usbguard"
}