Gentoo Archives: gentoo-commits

From: Matthew Thode <prometheanfire@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: sys-apps/bolt/files/, sys-apps/bolt/
Date: Mon, 24 Aug 2020 18:14:25
Message-Id: 1598292855.046e89752c49f8542e53ef2b0f695b8e19dcf418.prometheanfire@gentoo
1 commit: 046e89752c49f8542e53ef2b0f695b8e19dcf418
2 Author: Matthew Thode <prometheanfire <AT> gentoo <DOT> org>
3 AuthorDate: Mon Aug 24 18:13:19 2020 +0000
4 Commit: Matthew Thode <prometheanfire <AT> gentoo <DOT> org>
5 CommitDate: Mon Aug 24 18:14:15 2020 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=046e8975
7
8 sys-apps/bolt: add openrc support
9
10 thanks to redflyhacker+gentoo <AT> gmail.com for providing the init script
11 and the kernel config checks.
12
13 Closes: https://bugs.gentoo.org/692510
14 Package-Manager: Portage-3.0.4, Repoman-2.3.23
15 Signed-off-by: Matthew Thode <prometheanfire <AT> gentoo.org>
16
17 sys-apps/bolt/bolt-0.9-r1.ebuild | 52 ++++++++++++++++++++++++++++++++++++++++
18 sys-apps/bolt/files/bolt.openrc | 14 +++++++++++
19 2 files changed, 66 insertions(+)
20
21 diff --git a/sys-apps/bolt/bolt-0.9-r1.ebuild b/sys-apps/bolt/bolt-0.9-r1.ebuild
22 new file mode 100644
23 index 00000000000..8145c75880e
24 --- /dev/null
25 +++ b/sys-apps/bolt/bolt-0.9-r1.ebuild
26 @@ -0,0 +1,52 @@
27 +# Copyright 1999-2020 Gentoo Authors
28 +# Distributed under the terms of the GNU General Public License v2
29 +
30 +EAPI=7
31 +
32 +inherit linux-info meson systemd
33 +
34 +DESCRIPTION="Userspace system daemon to enable security levels for Thunderbolt 3"
35 +HOMEPAGE="https://gitlab.freedesktop.org/bolt/bolt"
36 +SRC_URI="https://gitlab.freedesktop.org/${PN}/${PN}/-/archive/${PV}/${P}.tar.gz"
37 +
38 +LICENSE="LGPL-2.1"
39 +SLOT="0"
40 +KEYWORDS="~amd64 ~x86"
41 +IUSE="doc systemd"
42 +
43 +DEPEND="
44 + >=dev-libs/glib-2.56.0:2
45 + dev-util/glib-utils
46 + virtual/libudev
47 + virtual/udev
48 + dev-util/umockdev
49 + sys-auth/polkit[introspection]
50 + systemd? ( sys-apps/systemd )
51 + doc? ( app-text/asciidoc )"
52 +RDEPEND="${DEPEND}"
53 +
54 +pkg_pretend() {
55 + CONFIG_CHECK="~THUNDERBOLT"
56 + ERROR_THUNDERBOLT="This package requires the thunderbolt kernel driver."
57 + check_extra_config
58 +
59 + CONFIG_CHECK="~HOTPLUG_PCI"
60 + ERROR_HOTPLUG_PCI="Thunderbolt requires PCI hotplug support."
61 + check_extra_config
62 +}
63 +
64 +src_configure() {
65 + local emesonargs=(
66 + -Dman=$(usex doc true false)
67 + --sysconfdir=/etc
68 + --localstatedir=/var
69 + --sharedstatedir=/var/lib
70 + )
71 + meson_src_configure
72 +}
73 +
74 +src_install() {
75 + meson_src_install
76 + newinitd "${FILESDIR}"/${PN}.openrc boltd
77 + keepdir /var/lib/boltd
78 +}
79
80 diff --git a/sys-apps/bolt/files/bolt.openrc b/sys-apps/bolt/files/bolt.openrc
81 new file mode 100644
82 index 00000000000..b80a7b31b26
83 --- /dev/null
84 +++ b/sys-apps/bolt/files/bolt.openrc
85 @@ -0,0 +1,14 @@
86 +#!/sbin/openrc-run
87 +# Copyright 1999-2020 Gentoo Authors
88 +# Distributed under the terms of the GNU General Public License v2
89 +
90 +name="Thunderbolt Security Daemon"
91 +description="Userspace system daemon to enable security levels for Thunderbolt 3"
92 +command="/usr/libexec/boltd"
93 +command_background="true"
94 +pidfile="/var/run/boltd.pid"
95 +
96 +depend() {
97 + need dbus
98 + before xdm
99 +}