+# SPDX-License-Identifier: LGPL-2.1+
#if 0 /// rename to elogind
+#
# systemd_logind_sources = files('''
# logind.c
# logind.h
output : 'logind-gperf.c',
command : [gperf, '@INPUT@', '--output-file', '@OUTPUT@'])
-#if 0 /// rename to elogind
-# systemd_logind_sources += [logind_gperf_c]
-#else
-elogind_sources += [logind_gperf_c]
-#endif // 0
-
-
liblogind_core_sources = files('''
logind-core.c
logind-device.c
liblogind_core_sources += [files('''
elogind-dbus.c
elogind-dbus.h
+ user-runtime-dir.c
'''.split()),
libcore_la_sources,
sleep_files,
update_utmp_files]
#endif // 1
+liblogind_core_sources += [logind_gperf_c]
+
logind_acl_c = files('logind-acl.c')
if conf.get('HAVE_ACL') == 1
liblogind_core_sources += logind_acl_c
sysfs-show.c
'''.split())
-#if 1 /// elogind has some additional files:
+#if 0 /// UNNEEDED by elogind
+# user_runtime_dir_sources = files('''
+# user-runtime-dir.c
+# logind.h
+# '''.split())
+#endif // 0
+
+#if 1 /// elogind has and needs some additional files:
loginctl_sources += files('''
eloginctl.c
eloginctl.h
'''.split())
#endif // 1
-#if 0 /// elogind builds itself unconditionally and with some adaptations
+
+#if 0 /// elogind builds itself unconditionally
# if conf.get('ENABLE_LOGIND') == 1
-# logind_conf = configure_file(
-# input : 'logind.conf.in',
-# output : 'logind.conf',
-# configuration : substs)
-# install_data(logind_conf,
-# install_dir : pkgsysconfdir)
-#
-# pam_systemd_sym = 'src/login/pam_systemd.sym'
-# pam_systemd_c = files('pam_systemd.c')
-#
-# install_data('org.freedesktop.login1.conf',
-# install_dir : dbuspolicydir)
+#endif // 0
+ logind_conf = configure_file(
+ input : 'logind.conf.in',
+ output : 'logind.conf',
+ configuration : substs)
+ install_data(logind_conf,
+ install_dir : pkgsysconfdir)
+
+ pam_elogind_sym = 'src/login/pam_elogind.sym'
+ pam_elogind_c = files('pam_elogind.c')
+
+ install_data('org.freedesktop.login1.conf',
+ install_dir : dbuspolicydir)
+#if 0 /// Works a bit differently here, as elogind allows dbus activation.
# install_data('org.freedesktop.login1.service',
# install_dir : dbussystemservicedir)
-#
-# custom_target(
-# 'org.freedesktop.login1.policy',
-# input : 'org.freedesktop.login1.policy.in',
-# output : 'org.freedesktop.login1.policy',
-# command : intltool_command,
-# install : install_polkit,
-# install_dir : polkitpolicydir)
-#
-# install_data('70-power-switch.rules',
-# '70-uaccess.rules',
-# install_dir : udevrulesdir)
-#
-# foreach file : ['71-seat.rules',
-# '73-seat-late.rules']
-# gen = configure_file(
-# input : file + '.in',
-# output : file,
-# configuration : substs)
-# install_data(gen,
-# install_dir : udevrulesdir)
-# endforeach
-#
-# custom_target(
-# 'systemd-user',
-# input : 'systemd-user.m4',
-# output: 'systemd-user',
-# command : [m4, '-P'] + m4_defines + ['@INPUT@'],
-# capture : true,
-# install : pamconfdir != 'no',
-# install_dir : pamconfdir)
-# endif
#else
-logind_conf = configure_file(
- input : 'logind.conf.in',
- output : 'logind.conf',
- configuration : substs)
-install_data(logind_conf,
- install_dir : pkgsysconfdir)
-
-pam_elogind_sym = 'src/login/pam_elogind.sym'
-pam_elogind_c = files('pam_elogind.c')
-
-install_data('org.freedesktop.login1.conf',
- install_dir : dbuspolicydir)
-logind_service = configure_file(
- input : 'org.freedesktop.login1.service.in',
- output : 'org.freedesktop.login1.service',
- configuration : substs)
-install_data(logind_service,
+ logind_service = configure_file(
+ input : 'org.freedesktop.login1.service.in',
+ output : 'org.freedesktop.login1.service',
+ configuration : substs)
+ install_data(logind_service,
install_dir : dbussystemservicedir)
+#endif // 0
+ install_data('org.freedesktop.login1.policy',
+ install_dir : polkitpolicydir)
-custom_target(
- 'org.freedesktop.login1.policy',
- input : 'org.freedesktop.login1.policy.in',
- output : 'org.freedesktop.login1.policy',
- command : intltool_command,
- install : install_polkit,
- install_dir : polkitpolicydir)
+ install_data('70-power-switch.rules', install_dir : udevrulesdir)
-install_data('70-power-switch.rules',
- '70-uaccess.rules',
- install_dir : udevrulesdir)
+ if conf.get('HAVE_ACL') == 1
+ install_data('70-uaccess.rules', install_dir : udevrulesdir)
+ endif
-foreach file : ['71-seat.rules',
- '73-seat-late.rules']
- gen = configure_file(
- input : file + '.in',
- output : file,
+ seat_rules = configure_file(
+ input : '71-seat.rules.in',
+ output : '71-seat.rules',
configuration : substs)
- install_data(gen,
- install_dir : udevrulesdir)
-endforeach
-
-custom_target(
- 'elogind-user',
- input : 'elogind-user.m4',
- output: 'elogind-user',
- command : [m4, '-P'] + m4_defines + ['@INPUT@'],
- capture : true,
- install : pamconfdir != 'no',
- install_dir : pamconfdir)
+ install_data(seat_rules,
+ install_dir : udevrulesdir)
+
+#if 1 /// elogind needs two passes of this file
+ seat_late_rules = configure_file(
+ input : '73-seat-late.rules.in',
+ output : '73-seat-late.rules.m4',
+ configuration : substs)
+#endif // 1
+
+ custom_target(
+ '73-seat-late.rules',
+#if 0 /// elogind must configure the source
+# input : '73-seat-late.rules.m4',
+#else
+ input : seat_late_rules,
+#endif // 0
+ output: '73-seat-late.rules',
+ command : [meson_apply_m4, config_h, '@INPUT@'],
+ capture : true,
+ install : true,
+ install_dir : udevrulesdir)
+
+ custom_target(
+ 'elogind-user',
+ input : 'elogind-user.m4',
+ output: 'elogind-user',
+ command : [meson_apply_m4, config_h, '@INPUT@'],
+ capture : true,
+ install : pamconfdir != 'no',
+ install_dir : pamconfdir)
+#if 0 /// elogind builds itself unconditionally
+# endif
#endif //0