sys-apps/fwupd: Revbump to add openrc init script
authorLars Wendler <polynomial-c@gentoo.org>
Wed, 18 Jul 2018 09:47:07 +0000 (11:47 +0200)
committerLars Wendler <polynomial-c@gentoo.org>
Wed, 18 Jul 2018 09:50:25 +0000 (11:50 +0200)
which was kindly contributed by
Till Schäfer <till2.schaefer@uni-dortmund.de>

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

sys-apps/fwupd/files/fwupd [new file with mode: 0644]
sys-apps/fwupd/fwupd-1.1.0-r1.ebuild [moved from sys-apps/fwupd/fwupd-1.1.0.ebuild with 85% similarity]

diff --git a/sys-apps/fwupd/files/fwupd b/sys-apps/fwupd/files/fwupd
new file mode 100644 (file)
index 0000000..b235bf8
--- /dev/null
@@ -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
+}
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 431667267facac181f5feac4e06e03cb9603f9c5..f2cb5fbc14e0ff882d0cff7b7c859eb545b886be 100644 (file)
@@ -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."
+}