[gnome-keyring/wip/nielsdg/meson] fixup! Support Meson build system
- From: Jan Tojnar <jtojnar src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-keyring/wip/nielsdg/meson] fixup! Support Meson build system
- Date: Sun, 22 May 2022 13:26:04 +0000 (UTC)
commit 6af7f2495e05a616d95c0a769f4166381e2b3588
Author: Jan Tojnar <jtojnar gmail com>
Date: Sun May 22 15:23:54 2022 +0200
fixup! Support Meson build system
daemon/meson.build | 21 +++++++++++++++++++--
meson.build | 10 ++++++++--
meson_options.txt | 6 ++++++
pam/meson.build | 4 ++--
4 files changed, 35 insertions(+), 6 deletions(-)
---
diff --git a/daemon/meson.build b/daemon/meson.build
index 309b54e2..89a0fdde 100644
--- a/daemon/meson.build
+++ b/daemon/meson.build
@@ -20,6 +20,7 @@ gkr_daemon_deps = [
glib_dep,
gobject_dep,
libgcrypt_dep,
+ libsystemd_dep,
libegg_dep,
libgkm_dep,
@@ -64,7 +65,7 @@ foreach desktop_input_file : desktop_input_files
input: desktop_input_file,
output: '@BASENAME@',
configuration: {
- 'bindir': gkr_prefix / get_option('bindir'),
+ 'bindir': gkr_bindir,
'VERSION': meson.project_version(),
},
),
@@ -88,12 +89,28 @@ foreach service_input_file : service_input_files
input: service_input_file,
output: '@BASENAME@',
configuration: {
- 'bindir': gkr_prefix / get_option('bindir'),
+ 'bindir': gkr_bindir,
},
install_dir: get_option('datadir') / 'dbus-1' / 'services',
)
endforeach
+if libsystemd_dep.found()
+ configure_file(
+ input: 'gnome-keyring-daemon.service.in',
+ output: '@BASENAME@',
+ configuration: {
+ 'bindir': gkr_bindir,
+ },
+ install_dir: systemd_user_unit_dir,
+ )
+
+ install_data(
+ 'gnome-keyring-daemon.socket',
+ install_dir: systemd_user_unit_dir,
+ )
+endif
+
# Portal files
install_data('gnome-keyring.portal',
install_dir: get_option('datadir') / 'xdg-desktop-portal' / 'portals',
diff --git a/meson.build b/meson.build
index 38988386..5041f806 100644
--- a/meson.build
+++ b/meson.build
@@ -33,7 +33,12 @@ libgcrypt_dep = dependency('libgcrypt', version: '>= 1.2.2')
libcap_ng_dep = dependency('libcap-ng', required: false)
p11_kit_dep = dependency('p11-kit-1')
-selinux_dep = dependency('libselinux', required: get_option('selinux'))
+libselinux_dep = dependency('libselinux', required: get_option('selinux'))
+libsystemd_dep = dependency('libsystemd', required: get_option('systemd'))
+
+if libsystemd_dep.found()
+ systemd_user_unit_dir = dependency('systemd').get_variable('systemduserunitdir', pkgconfig_define:
['root_prefix', get_option('prefix')])
+endif
if get_option('ssh-agent')
ssh_agent_bin = find_program('ssh-agent')
@@ -59,7 +64,8 @@ conf.set_quoted('LOCALE_DIR', gkr_prefix / get_option('localedir'))
conf.set_quoted('VERSION', meson.project_version())
conf.set_quoted('LIBGCRYPT_VERSION', libgcrypt_dep.version())
conf.set('HAVE_LIBCAPNG', libcap_ng_dep.found())
-conf.set('WITH_SELINUX', selinux_dep.found())
+conf.set('WITH_SELINUX', libselinux_dep.found())
+conf.set('WITH_SYSTEMD', libsystemd_dep.found())
if get_option('ssh-agent')
conf.set('WITH_SSH', true)
conf.set_quoted('SSH_AGENT', ssh_agent_bin.full_path())
diff --git a/meson_options.txt b/meson_options.txt
index 025ade5e..37ea781c 100644
--- a/meson_options.txt
+++ b/meson_options.txt
@@ -10,6 +10,12 @@ option('selinux',
description: 'Add support for SELinux',
)
+option('systemd',
+ type: 'feature',
+ value: 'enabled',
+ description: 'Add support for systemd socket activation',
+)
+
option('pam',
type: 'boolean',
value: true,
diff --git a/pam/meson.build b/pam/meson.build
index 81a88db9..00594bed 100644
--- a/pam/meson.build
+++ b/pam/meson.build
@@ -9,8 +9,8 @@ libpam_gkr_deps = [
libegg_dep,
]
-if selinux_dep.found()
- libpam_gkr_deps += selinux_dep
+if libselinux_dep.found()
+ libpam_gkr_deps += libselinux_dep
endif
libpam_gkr_cflags = [
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]