commit:     9c032389f603015319009857be202c0a9254147e
Author:     Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
AuthorDate: Wed Jul 18 09:47:07 2018 +0000
Commit:     Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
CommitDate: Wed Jul 18 09:50:25 2018 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=9c032389

sys-apps/fwupd: Revbump to add openrc init script

which was kindly contributed by
Till Schäfer <till2.schaefer <AT> uni-dortmund.de>

Closes: https://bugs.gentoo.org/661324
Package-Manager: Portage-2.3.43, Repoman-2.3.10

 sys-apps/fwupd/files/fwupd                               | 13 +++++++++++++
 .../fwupd/{fwupd-1.1.0.ebuild => fwupd-1.1.0-r1.ebuild}  | 16 ++++++++++++++++
 2 files changed, 29 insertions(+)

diff --git a/sys-apps/fwupd/files/fwupd b/sys-apps/fwupd/files/fwupd
new file mode 100644
index 00000000000..b235bf82c6f
--- /dev/null
+++ b/sys-apps/fwupd/files/fwupd
@@ -0,0 +1,13 @@
+#!/sbin/openrc-run
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+description="Firmware update daemon"
+pidfile="/var/run/fwupd.pid"
+command="/usr/libexec/fwupd/fwupd"
+command_background="true"
+
+depend() {
+       need dbus
+       before xdm
+}

diff --git a/sys-apps/fwupd/fwupd-1.1.0.ebuild 
b/sys-apps/fwupd/fwupd-1.1.0-r1.ebuild
similarity index 85%
rename from sys-apps/fwupd/fwupd-1.1.0.ebuild
rename to sys-apps/fwupd/fwupd-1.1.0-r1.ebuild
index 431667267fa..f2cb5fbc14e 100644
--- a/sys-apps/fwupd/fwupd-1.1.0.ebuild
+++ b/sys-apps/fwupd/fwupd-1.1.0-r1.ebuild
@@ -74,6 +74,10 @@ DEPEND="
        test? ( net-libs/gnutls[tools] )
 "
 
+# required for fwupd daemon to run.
+# NOT a build time dependency. The build system does not check for dbus.
+PDEPEND="sys-apps/dbus"
+
 src_prepare() {
        default
        sed -e "s/'--create'/'--absolute-name', '--create'/" \
@@ -102,3 +106,15 @@ src_configure() {
        )
        meson_src_configure
 }
+
+src_install() {
+       meson_src_install
+       doinitd "${FILESDIR}"/${PN}
+}
+
+pkg_postinst() {
+       elog "In case you are using openrc as init system"
+       elog "and you're upgrading from <fwupd-1.1.0, you"
+       elog "need to start the fwupd daemon via the openrc"
+       elog "init script that comes with this package."
+}

Reply via email to