Added usbguard ebuilds

This commit is contained in:
kuratsune 2018-03-10 18:45:51 +01:00
parent 0b51628902
commit c90ed33fd6
5 changed files with 121 additions and 0 deletions

View File

@ -0,0 +1,4 @@
EBUILD usbguard-0.6.2.ebuild 2256 BLAKE2B 5855a1925207cba750af626b7b24e9694aedeab7e099c41ed6f9bdac8f95de2df74bc02744f82857a69a60b498f60b887e8228e4b950a3eeba3f9a8d2f323992 SHA512 f71acb9b39eef4978b5474b35d093213e3a329264bfc58996863cfbd75a2810f191197cfdb60183cae8462bd2f147fc1e8f8c0d2d738f72a63d13c3775a3528c
EBUILD usbguard-0.7.0.ebuild 2256 BLAKE2B 5855a1925207cba750af626b7b24e9694aedeab7e099c41ed6f9bdac8f95de2df74bc02744f82857a69a60b498f60b887e8228e4b950a3eeba3f9a8d2f323992 SHA512 f71acb9b39eef4978b5474b35d093213e3a329264bfc58996863cfbd75a2810f191197cfdb60183cae8462bd2f147fc1e8f8c0d2d738f72a63d13c3775a3528c
EBUILD usbguard-0.7.2.ebuild 2256 BLAKE2B 5855a1925207cba750af626b7b24e9694aedeab7e099c41ed6f9bdac8f95de2df74bc02744f82857a69a60b498f60b887e8228e4b950a3eeba3f9a8d2f323992 SHA512 f71acb9b39eef4978b5474b35d093213e3a329264bfc58996863cfbd75a2810f191197cfdb60183cae8462bd2f147fc1e8f8c0d2d738f72a63d13c3775a3528c
EBUILD usbguard-9999.ebuild 2256 BLAKE2B 5855a1925207cba750af626b7b24e9694aedeab7e099c41ed6f9bdac8f95de2df74bc02744f82857a69a60b498f60b887e8228e4b950a3eeba3f9a8d2f323992 SHA512 f71acb9b39eef4978b5474b35d093213e3a329264bfc58996863cfbd75a2810f191197cfdb60183cae8462bd2f147fc1e8f8c0d2d738f72a63d13c3775a3528c

View File

@ -0,0 +1 @@
usbguard-9999.ebuild

View File

@ -0,0 +1 @@
usbguard-9999.ebuild

View File

@ -0,0 +1 @@
usbguard-9999.ebuild

View File

@ -0,0 +1,114 @@
# Copyright 1999-2016 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Id$
EAPI=6
inherit autotools git-r3 systemd
DESCRIPTION="The USBGuard software framework helps to protect your computer against BadUSB."
HOMEPAGE="https://github.com/dkopecek/usbguard"
MY_AUTHOR="dkopecek"
EGIT_REPO_URI="https://github.com/${MY_AUTHOR}/${PN}.git"
EGIT_SUBMODULES=( src/ThirdParty/Catch src/ThirdParty/PEGTL src/ThirdParty/usbmon )
if [[ ${PV} == "9999" ]] ; then
EGIT_BRANCH="master"
KEYWORDS=""
else
EGIT_COMMIT="usbguard-${PV}"
KEYWORDS="~x86 ~amd64"
fi
LICENSE="GPL-2"
SLOT="0"
IUSE="crypt +dbus +policykit qt4 qt5 +systemd"
IUSE+=" crypt_gcrypt crypt_sodium"
DEPEND="sys-cluster/libqb
sys-libs/libseccomp
sys-libs/libcap-ng
dev-libs/protobuf
systemd? ( sys-apps/systemd )
dbus? ( sys-apps/dbus
dev-libs/dbus-glib )
policykit? ( sys-auth/polkit )
qt4? ( dev-qt/qtgui:4
dev-qt/qtsvg:4
dev-qt/qtcore:4 )
qt5? ( dev-qt/qtgui:5
dev-qt/qtsvg:5
dev-qt/qtwidgets:5
dev-qt/qtcore:5 )
crypt? (
crypt_gcrypt? ( dev-libs/libgcrypt )
crypt_sodium? ( dev-libs/libsodium )
)"
RDEPEND="${DEPEND}
virtual/udev"
REQUIRED_USE="
crypt? (
^^ (
crypt_sodium
crypt_gcrypt
)
)
?? ( qt4 qt5 )"
src_prepare() {
default
eautoreconf
}
src_configure() {
local myconf=()
if use crypt_gcrypt; then
myconf+=( --with-crypto-library=gcrypt )
elif use crypt_sodium; then
myconf+=( --with-crypto-library=sodium )
fi
if use qt5; then
myconf+=( --with-gui-qt=qt5 )
elif use qt4; then
myconf+=( --with-gui-qt=qt4 )
fi
if use policykit; then
myconf+=( --with-polkit )
fi
econf \
$(use_enable systemd) \
$(use_with dbus) \
--with-bundled-catch \
--with-bundled-pegtl \
"${myconf[@]}"
}
src_compile() {
if use qt5; then
export QT_SELECT=qt5
elif use qt4; then
export QT_SELECT=qt4
fi
emake
}
src_install() {
emake DESTDIR="${D}" install
systemd_dounit usbguard.service
insinto /etc/usbguard
doins usbguard-daemon.conf
}
pkg_postinst() {
elog "You will need to allow access to your user for accessing the QT gui."
elog "Execute as root. usbguard add-user YOUR_USERNAME --devices ALL --exceptions ALL"
}