[gnome-shell-extensions/benzea/systemd-3-36-definitions] data: Also install systemd session definition



commit f844f9e67abf542c01db6c8da16ace91b1487454
Author: Benjamin Berg <bberg redhat com>
Date:   Wed Dec 11 17:19:21 2019 +0100

    data: Also install systemd session definition

 data/gnome-classic.session.desktop.in | 1 +
 data/meson.build                      | 8 ++++++++
 meson.build                           | 9 ++++++++-
 meson_options.txt                     | 2 ++
 4 files changed, 19 insertions(+), 1 deletion(-)
---
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..98e3ef3 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 dep_systemd.found()
+  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 8d193b2..1197e96 100644
--- a/meson.build
+++ b/meson.build
@@ -1,11 +1,13 @@
 project('gnome-shell-extensions',
   version: '3.34.0',
-  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')
 
@@ -78,6 +80,11 @@ if classic_mode_enabled
             'but the required extension @0@ is not.'.format(e))
     endif
   endforeach
+
+  dep_systemd = dependency('systemd', required: true)
+  if dep_systemd.found()
+    systemd_userunitdir = dep_systemd.get_pkgconfig_variable('systemduserunitdir', version: '>= 243', 
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..e63ca3b 100644
--- a/meson_options.txt
+++ b/meson_options.txt
@@ -16,3 +16,5 @@ option('classic_mode',
   value: false,
   description: 'Enable installing data files for classic mode.'
 )
+
+option('systemd', type: 'feature', value: 'enabled', description: 'Built systemd user session definition')


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]