fwupd: split daemon again

In 1.3.5, fwupdprivate library was made into a shared fwupdplugin library.
This library is considered semi-private and is used by fwupd daemon and
fwupd plug-ins and now possibly third party plug-ins.

The fwupdplugin library refers to the plug-in directory in fwupd.out
causing a dependency cycle. For that reason we need to move it to out.
This commit is contained in:
Jan Tojnar
2020-02-06 22:32:13 +01:00
parent 444538ee97
commit c942013dbc
2 changed files with 51 additions and 1 deletions
@@ -94,7 +94,10 @@ stdenv.mkDerivation rec {
sha256 = "02mzn3whk5mba4nxyrkypawr1gzjx79n4nrkhrp8vja6mxxgsf10";
};
outputs = [ "out" "dev" "devdoc" "man" "installedTests" ];
# libfwupd goes to lib
# daemon, plug-ins and libfwupdplugin go to out
# CLI programs go to out
outputs = [ "out" "lib" "dev" "devdoc" "man" "installedTests" ];
nativeBuildInputs = [
meson
@@ -148,6 +151,10 @@ stdenv.mkDerivation rec {
./fix-paths.patch
./add-option-for-installation-sysconfdir.patch
# install plug-ins and libfwupdplugin to out,
# they are not really part of the library
./install-fwupdplugin-to-out.patch
# installed tests are installed to different output
# we also cannot have fwupd-tests.conf in $out/etc since it would form a cycle
(substituteAll {
@@ -203,6 +210,12 @@ stdenv.mkDerivation rec {
"--localstatedir=/var"
"--sysconfdir=/etc"
"-Dsysconfdir_install=${placeholder "out"}/etc"
# We do not want to place the daemon into lib (cyclic reference)
"--libexecdir=${placeholder "out"}/libexec"
# Our builder only adds $lib/lib to rpath but some things link
# against libfwupdplugin which is in $out/lib.
"-Dc_link_args=-Wl,-rpath,${placeholder "out"}/lib"
] ++ stdenv.lib.optionals (!haveDell) [
"-Dplugin_dell=false"
"-Dplugin_synaptics=false"