]>
Commit | Line | Data |
---|---|---|
db9ecf05 | 1 | # SPDX-License-Identifier: LGPL-2.1-or-later |
3a726fcd | 2 | |
f1b98127 ZJS |
3 | systemd_logind_sources = files( |
4 | 'logind.c', | |
2f492a73 | 5 | ) |
5c23128d ZJS |
6 | |
7 | logind_gperf_c = custom_target( | |
37efbbd8 ZJS |
8 | 'logind_gperf.c', |
9 | input : 'logind-gperf.gperf', | |
10 | output : 'logind-gperf.c', | |
11 | command : [gperf, '@INPUT@', '--output-file', '@OUTPUT@']) | |
5c23128d | 12 | |
f1b98127 ZJS |
13 | liblogind_core_sources = files( |
14 | 'logind-action.c', | |
f1b98127 | 15 | 'logind-brightness.c', |
f1b98127 | 16 | 'logind-button.c', |
f1b98127 ZJS |
17 | 'logind-core.c', |
18 | 'logind-dbus.c', | |
f1b98127 | 19 | 'logind-device.c', |
f1b98127 | 20 | 'logind-inhibit.c', |
f1b98127 | 21 | 'logind-polkit.c', |
f1b98127 | 22 | 'logind-seat-dbus.c', |
f1b98127 | 23 | 'logind-seat.c', |
f1b98127 | 24 | 'logind-session-dbus.c', |
f1b98127 | 25 | 'logind-session-device.c', |
f1b98127 | 26 | 'logind-session.c', |
f1b98127 | 27 | 'logind-user-dbus.c', |
f1b98127 | 28 | 'logind-user.c', |
53c0397b | 29 | 'logind-wall.c', |
2f492a73 | 30 | ) |
5c23128d | 31 | |
ae98d374 ZJS |
32 | liblogind_core_sources += [logind_gperf_c] |
33 | ||
5c23128d | 34 | liblogind_core = static_library( |
37efbbd8 ZJS |
35 | 'logind-core', |
36 | liblogind_core_sources, | |
37 | include_directories : includes, | |
92148283 JJ |
38 | dependencies : [libacl, |
39 | userspace], | |
03f7ddf0 | 40 | build_by_default : false) |
5c23128d | 41 | |
f1b98127 ZJS |
42 | loginctl_sources = files( |
43 | 'loginctl.c', | |
2f492a73 ZJS |
44 | 'sysfs-show.c', |
45 | ) | |
5c23128d | 46 | |
b8ed1bf8 YW |
47 | executables += [ |
48 | libexec_template + { | |
49 | 'name' : 'systemd-logind', | |
50 | 'dbus' : true, | |
51 | 'conditions' : ['ENABLE_LOGIND'], | |
52 | 'sources' : systemd_logind_sources, | |
53 | 'link_with' : [ | |
54 | liblogind_core, | |
55 | libshared, | |
56 | ], | |
57 | 'dependencies' : [ | |
58 | libacl, | |
59 | threads, | |
60 | ], | |
61 | }, | |
62 | executable_template + { | |
63 | 'name' : 'loginctl', | |
64 | 'public' : true, | |
65 | 'conditions' : ['ENABLE_LOGIND'], | |
66 | 'sources' : loginctl_sources, | |
67 | 'dependencies' : [ | |
68 | liblz4, | |
69 | libxz, | |
70 | libzstd, | |
71 | threads, | |
72 | ], | |
73 | }, | |
74 | executable_template + { | |
75 | 'name' : 'systemd-inhibit', | |
76 | 'public' : true, | |
77 | 'conditions' : ['ENABLE_LOGIND'], | |
78 | 'sources' : files('inhibit.c'), | |
79 | }, | |
80 | libexec_template + { | |
81 | 'name' : 'systemd-user-runtime-dir', | |
82 | 'conditions' : ['ENABLE_LOGIND'], | |
83 | 'sources' : files('user-runtime-dir.c'), | |
84 | }, | |
130c87b1 YW |
85 | test_template + { |
86 | 'sources' : files('test-inhibit.c'), | |
87 | 'type' : 'manual', | |
88 | }, | |
89 | test_template + { | |
90 | 'sources' : files('test-login-tables.c'), | |
91 | 'link_with' : [ | |
92 | liblogind_core, | |
93 | libshared, | |
94 | ], | |
95 | 'dependencies' : threads, | |
96 | }, | |
97 | test_template + { | |
98 | 'sources' : files('test-session-properties.c'), | |
99 | 'type' : 'manual', | |
100 | }, | |
b8ed1bf8 | 101 | ] |
a9f0f5e5 | 102 | |
130c87b1 YW |
103 | simple_tests += files( |
104 | 'test-login-shared.c' | |
105 | ) | |
106 | ||
b8ed1bf8 YW |
107 | modules += [ |
108 | pam_template + { | |
109 | 'name' : 'pam_systemd', | |
110 | 'conditions' : [ | |
111 | 'ENABLE_LOGIND', | |
112 | 'HAVE_PAM', | |
113 | ], | |
114 | 'sources' : files('pam_systemd.c'), | |
90461ef5 | 115 | 'version-script' : meson.current_source_dir() / 'pam_systemd.sym', |
b8ed1bf8 | 116 | }, |
a28b7310 JL |
117 | pam_template + { |
118 | 'name' : 'pam_systemd_loadkey', | |
119 | 'conditions' : [ | |
120 | 'HAVE_PAM', | |
121 | ], | |
122 | 'sources' : files('pam_systemd_loadkey.c'), | |
123 | 'version-script' : meson.current_source_dir() / 'pam_systemd_loadkey.sym', | |
124 | }, | |
b8ed1bf8 | 125 | ] |
1ccbb359 | 126 | |
c900d89f | 127 | enable_logind = conf.get('ENABLE_LOGIND') == 1 |
155078c8 ZJS |
128 | |
129 | custom_target( | |
130 | 'logind.conf', | |
131 | input : 'logind.conf.in', | |
132 | output : 'logind.conf', | |
133 | command : [jinja2_cmdline, '@INPUT@', '@OUTPUT@'], | |
134 | install : enable_logind and install_sysconfdir_samples and pkgsysconfdir != 'no', | |
6495361c | 135 | install_dir : pkgconfigfiledir) |
155078c8 ZJS |
136 | |
137 | custom_target( | |
138 | 'systemd-user', | |
139 | input : 'systemd-user.in', | |
140 | output : 'systemd-user', | |
141 | command : [jinja2_cmdline, '@INPUT@', '@OUTPUT@'], | |
142 | install : enable_logind and pamconfdir != 'no', | |
143 | install_dir : pamconfdir) | |
5c23128d | 144 | |
c900d89f | 145 | if enable_logind |
37efbbd8 ZJS |
146 | install_data('org.freedesktop.login1.conf', |
147 | install_dir : dbuspolicydir) | |
148 | install_data('org.freedesktop.login1.service', | |
149 | install_dir : dbussystemservicedir) | |
9b3cff19 | 150 | install_data('org.freedesktop.login1.policy', |
264d8dcc | 151 | install_dir : polkitpolicydir) |
5c23128d | 152 | endif |