[gnome-shell-extensions/benzea/systemd-3-36-definitions: 98/98] data: Also install systemd session definition
- From: Benjamin Berg <bberg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell-extensions/benzea/systemd-3-36-definitions: 98/98] data: Also install systemd session definition
- Date: Mon, 13 Jul 2020 14:54:19 +0000 (UTC)
commit 1cbdb13556b21fc05d63f01fd510cd76b09a515e
Author: Benjamin Berg <bberg redhat com>
Date: Wed Dec 11 17:19:21 2019 +0100
data: Also install systemd session definition
https://gitlab.gnome.org/GNOME/gnome-shell-extensions/merge_requests/99
data/gnome-classic.session.conf | 19 +++++++++++++++++++
data/gnome-classic.session.desktop.in | 1 +
data/meson.build | 8 ++++++++
meson.build | 11 ++++++++++-
meson_options.txt | 6 ++++++
5 files changed, 44 insertions(+), 1 deletion(-)
---
diff --git a/data/gnome-classic.session.conf b/data/gnome-classic.session.conf
new file mode 100644
index 0000000..16dd4f1
--- /dev/null
+++ b/data/gnome-classic.session.conf
@@ -0,0 +1,19 @@
+[Unit]
+# Keep in sync with gnome-classic.session
+Wants=gsd-a11y-settings.target
+Wants=gsd-keyboard.target
+Wants=gsd-rfkill.target
+Wants=gsd-sound.target
+Wants=gsd-color.target
+Wants=gsd-media-keys.target
+Wants=gsd-screensaver-proxy.target
+Wants=gsd-wacom.target
+Wants=gsd-datetime.target
+Wants=gsd-power.target
+Wanst=gsd-sharing.target
+Wants=gsd-wwan.target
+Wants=gsd-housekeeping.target
+Wants=gsd-print-notifications.target
+Wants=gsd-smartcard.target
+
+Requires=gnome-shell.target
diff --git a/data/gnome-classic.session.desktop.in b/data/gnome-classic.session.desktop.in
index c29447d..7638cf5 100644
--- a/data/gnome-classic.session.desktop.in
+++ b/data/gnome-classic.session.desktop.in
@@ -1,3 +1,4 @@
[GNOME Session]
Name=GNOME Classic
+# Keep in sync with gnome-session@gnome-classic.target.d/session.conf drop-in
RequiredComponents=org.gnome.Shell;org.gnome.SettingsDaemon.A11ySettings;org.gnome.SettingsDaemon.Color;org.gnome.SettingsDaemon.Datetime;org.gnome.SettingsDaemon.Housekeeping;org.gnome.SettingsDaemon.Keyboard;org.gnome.SettingsDaemon.MediaKeys;org.gnome.SettingsDaemon.Power;org.gnome.SettingsDaemon.PrintNotifications;org.gnome.SettingsDaemon.Rfkill;org.gnome.SettingsDaemon.ScreensaverProxy;org.gnome.SettingsDaemon.Sharing;org.gnome.SettingsDaemon.Smartcard;org.gnome.SettingsDaemon.Sound;org.gnome.SettingsDaemon.Wacom;org.gnome.SettingsDaemon.XSettings;
diff --git a/data/meson.build b/data/meson.build
index 02ddf7d..c60b708 100644
--- a/data/meson.build
+++ b/data/meson.build
@@ -61,3 +61,11 @@ install_data(theme_data, install_dir: themedir)
classic_override = '00_org.gnome.shell.extensions.classic.gschema.override'
install_data(classic_override, install_dir: schemadir)
+
+if systemd_enabled
+ install_data(
+ 'gnome-classic.session.conf',
+ rename: join_paths('gnome-session@gnome-classic.target.d', 'session.conf'),
+ install_dir: systemd_userunitdir,
+ )
+endif
diff --git a/meson.build b/meson.build
index 4798934..2171c6b 100644
--- a/meson.build
+++ b/meson.build
@@ -1,11 +1,13 @@
project('gnome-shell-extensions',
version: '3.37.3',
- meson_version: '>= 0.44.0',
+ meson_version: '>= 0.47.0',
license: 'GPL2+'
)
gettext_domain = meson.project_name()
+prefix = get_option('prefix')
+
gnome = import('gnome')
i18n = import('i18n')
@@ -76,6 +78,13 @@ if classic_mode_enabled
'but the required extension @0@ is not.'.format(e))
endif
endforeach
+
+ systemd_enabled = get_option('systemd')
+ dep_systemd = dependency('systemd', version: '>= 242', required: systemd_enabled)
+ if dep_systemd.found()
+ systemd_userunitdir = dep_systemd.get_pkgconfig_variable('systemduserunitdir',
+ define_variable: ['prefix', prefix])
+ endif
endif
# Sanity check: Make sure enabled extensions are valid
diff --git a/meson_options.txt b/meson_options.txt
index d721a49..5fc4c7e 100644
--- a/meson_options.txt
+++ b/meson_options.txt
@@ -16,3 +16,9 @@ option('classic_mode',
value: false,
description: 'Enable installing data files for classic mode.'
)
+
+option('systemd',
+ type: 'boolean',
+ value: true,
+ description: 'Built systemd user session definition'
+)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]