usbguard: v0.7.2 initial ebuild, issue #124

This commit is contained in:
blshkv 2018-06-03 09:16:53 +08:00
parent 48d531110b
commit 5c5b484aa4
No known key found for this signature in database
GPG key ID: 273E3E90D1A6294F
5 changed files with 97 additions and 0 deletions

View file

@ -47,3 +47,8 @@ dev-libs/libsmdev
#frida-gum
dev-libs/libdwarf
#usbguard
#=dev-libs/pegtl-2.1*
=dev-libs/pegtl-1.3*
=dev-cpp/catch-2.2*

View file

@ -374,3 +374,6 @@ dev-ruby/listen:1
=dev-ruby/execjs-2.7*
=dev-ruby/sass-3.4*
=dev-ruby/sqlite3-1.3*
#usbguard
=dev-ruby/asciidoctor-1.5*

View file

@ -4,3 +4,4 @@ sys-apps/fwts
=sys-apps/pcsc-tools-1.4*
=dev-perl/pcsc-perl-1.4*
sys-apps/usbguard

View file

@ -0,0 +1 @@
DIST usbguard-0.7.2.tar.gz 1025446 BLAKE2B e0ac650ff7eb79c122db921ed25c64750041906d100ff6fc26178aabafd19c3102d01e42a0c5082585c5b4ba8360263238845488ac3f4efa1aecc9fbc076dc44 SHA512 befe82deb9a6a73fe835acef9f196a887324e73439d1b9abc5e874bbab5ced1480cf6bda842eb87f0cef2acb7bd77800def0f3ee3fc71736d0aeb29a10c5b9d3

View file

@ -0,0 +1,87 @@
# Copyright 1999-2018 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
EAPI=6
inherit autotools systemd
DESCRIPTION="The USBGuard software framework helps to protect your computer against BadUSB."
HOMEPAGE="https://github.com/dkopecek/usbguard"
if [[ ${PV} == "9999" ]] ; then
inherit git-r3
EGIT_BRANCH="master"
EGIT_REPO_URI="https://github.com/dkopecek/${PN}.git"
EGIT_SUBMODULES=( src/ThirdParty/Catch src/ThirdParty/PEGTL src/ThirdParty/usbmon )
KEYWORDS=""
else
KEYWORDS="~x86 ~amd64"
SRC_URI="https://github.com/USBGuard/usbguard/archive/${P}.tar.gz"
S=${WORKDIR}/${PN}-${PN}-${PV}
fi
LICENSE="GPL-2"
SLOT="0"
IUSE="crypt +dbus +policykit qt5 systemd"
DEPEND="sys-cluster/libqb
sys-libs/libseccomp
sys-libs/libcap-ng
dev-libs/protobuf
dev-ruby/asciidoctor
dev-cpp/catch
<=dev-libs/pegtl-2.0
systemd? ( sys-apps/systemd )
dbus? ( sys-apps/dbus
dev-libs/dbus-glib )
policykit? ( sys-auth/polkit )
qt5? ( dev-qt/qtgui:5
dev-qt/qtsvg:5
dev-qt/qtwidgets:5
dev-qt/qtcore:5 )
crypt? ( || ( dev-libs/libgcrypt:0 dev-libs/libsodium ) )
"
RDEPEND="${DEPEND}
virtual/udev"
src_prepare() {
default
eautoreconf
}
src_configure() {
# local myconf=()
econf $(use_enable systemd) \
$(use_with dbus) \
--with-gui-qt=$(usex qt5 qt5) \
$(use_with policykit polkit) \
--disable-dependency-tracking
# "${myconf[@]}"
}
src_compile() {
if use qt5; then
export QT_SELECT=qt5
fi
emake
}
src_install() {
emake DESTDIR="${D}" install
if use systemd ; then
systemd_dounit usbguard.service
fi
insinto /etc/usbguard
doins usbguard-daemon.conf
keepdir /var/lib/log/usbguard
}
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"
}