diff --git a/data/meson.build b/data/meson.build index ec414debc..a87308f45 100644 --- a/data/meson.build +++ b/data/meson.build @@ -14,7 +14,7 @@ install_data(['org.freedesktop.fwupd.xml'], ) install_data(['90-fwupd-devices.rules'], - install_dir : join_paths(get_option('prefix'), 'lib', 'udev', 'rules.d') + install_dir : join_paths(udev.get_pkgconfig_variable('udevdir'), 'rules.d') ) con2 = configuration_data() @@ -44,10 +44,7 @@ configure_file( output : 'fwupd-offline-update.service', configuration : con2, install: true, - install_dir: join_paths(get_option('prefix'), - 'lib', - 'systemd', - 'system'), + install_dir: systemd.get_pkgconfig_variable('systemdsystemunitdir'), ) # replace @localstatedir@ and @bootdir@ @@ -56,8 +53,5 @@ configure_file( output : 'fwupd.service', configuration : con2, install: true, - install_dir: join_paths(get_option('prefix'), - 'lib', - 'systemd', - 'system'), + install_dir: systemd.get_pkgconfig_variable('systemdsystemunitdir'), ) diff --git a/meson.build b/meson.build index 8a500de2a..600ab16ae 100644 --- a/meson.build +++ b/meson.build @@ -124,6 +124,8 @@ soup = dependency('libsoup-2.4', version : '>= 2.51.92') gpgme = cc.find_library('gpgme') gpgerror = cc.find_library('libgpg-error') libm = cc.find_library('libm', required: false) +systemd = dependency('systemd') +udev = dependency('udev') if valgrind.found() conf.set('HAVE_VALGRIND', '1')