1 # SPDX-License-Identifier: LGPL-2.1+
3 # Copyright 2017 Zbigniew Jędrzejewski-Szmek
5 # elogind is free software; you can redistribute it and/or modify it
6 # under the terms of the GNU Lesser General Public License as published by
7 # the Free Software Foundation; either version 2.1 of the License, or
8 # (at your option) any later version.
10 # elogind is distributed in the hope that it will be useful, but
11 # WITHOUT ANY WARRANTY; without even the implied warranty of
12 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 # Lesser General Public License for more details.
15 # You should have received a copy of the GNU Lesser General Public License
16 # along with systemd; If not, see <http://www.gnu.org/licenses/>.
17 #if 0 /// rename to elogind
19 # systemd_logind_sources = files('''
24 elogind_sources = files('''
32 logind_gperf_c = custom_target(
34 input : 'logind-gperf.gperf',
35 output : 'logind-gperf.c',
36 command : [gperf, '@INPUT@', '--output-file', '@OUTPUT@'])
38 #if 0 /// rename to elogind
39 # systemd_logind_sources += [logind_gperf_c]
41 elogind_sources += [logind_gperf_c]
45 liblogind_core_sources = files('''
57 logind-session-device.c
58 logind-session-device.h
71 #if 1 /// elogind has some additional files:
72 liblogind_core_sources += [files('''
80 logind_acl_c = files('logind-acl.c')
81 if conf.get('HAVE_ACL') == 1
82 liblogind_core_sources += logind_acl_c
85 liblogind_core = static_library(
87 liblogind_core_sources,
88 include_directories : includes,
89 #if 0 /// elogind needs audit support for utmp inclusion
90 # dependencies : [libacl])
92 dependencies : [libacl,
96 loginctl_sources = files('''
102 #if 1 /// elogind has some additional files:
103 loginctl_sources += files('''
108 #if 0 /// elogind builds itself unconditionally and with some adaptations
109 # if conf.get('ENABLE_LOGIND') == 1
110 # logind_conf = configure_file(
111 # input : 'logind.conf.in',
112 # output : 'logind.conf',
113 # configuration : substs)
114 # install_data(logind_conf,
115 # install_dir : pkgsysconfdir)
117 # pam_systemd_sym = 'src/login/pam_systemd.sym'
118 # pam_systemd_c = files('pam_systemd.c')
120 # install_data('org.freedesktop.login1.conf',
121 # install_dir : dbuspolicydir)
122 # install_data('org.freedesktop.login1.service',
123 # install_dir : dbussystemservicedir)
126 # 'org.freedesktop.login1.policy',
127 # input : 'org.freedesktop.login1.policy.in',
128 # output : 'org.freedesktop.login1.policy',
130 # data_dirs : po_dir,
131 # install : install_polkit,
132 # install_dir : polkitpolicydir)
134 # install_data('70-power-switch.rules', install_dir : udevrulesdir)
136 # if conf.get('HAVE_ACL') == 1
137 # install_data('70-uaccess.rules', install_dir : udevrulesdir)
140 # seat_rules = configure_file(
141 # input : '71-seat.rules.in',
142 # output : '71-seat.rules',
143 # configuration : substs)
144 # install_data(seat_rules,
145 # install_dir : udevrulesdir)
148 # '73-seat-late.rules',
149 # input : '73-seat-late.rules.m4',
150 # output: '73-seat-late.rules',
151 # command : [m4, '-P'] + m4_defines + ['@INPUT@'],
154 # install_dir : udevrulesdir)
158 # input : 'systemd-user.m4',
159 # output: 'systemd-user',
160 # command : [m4, '-P'] + m4_defines + ['@INPUT@'],
162 # install : pamconfdir != 'no',
163 # install_dir : pamconfdir)
166 logind_conf = configure_file(
167 input : 'logind.conf.in',
168 output : 'logind.conf',
169 configuration : substs)
170 install_data(logind_conf,
171 install_dir : pkgsysconfdir)
173 pam_elogind_sym = 'src/login/pam_elogind.sym'
174 pam_elogind_c = files('pam_elogind.c')
176 install_data('org.freedesktop.login1.conf',
177 install_dir : dbuspolicydir)
178 logind_service = configure_file(
179 input : 'org.freedesktop.login1.service.in',
180 output : 'org.freedesktop.login1.service',
181 configuration : substs)
182 install_data(logind_service,
183 install_dir : dbussystemservicedir)
186 'org.freedesktop.login1.policy',
187 input : 'org.freedesktop.login1.policy.in',
188 output : 'org.freedesktop.login1.policy',
191 install : install_polkit,
192 install_dir : polkitpolicydir)
194 install_data('70-power-switch.rules',
196 install_dir : udevrulesdir)
198 foreach file : ['71-seat.rules',
199 '73-seat-late.rules']
200 gen = configure_file(
201 input : file + '.in',
203 configuration : substs)
205 install_dir : udevrulesdir)
210 input : 'elogind-user.m4',
211 output: 'elogind-user',
212 command : [m4, '-P'] + m4_defines + ['@INPUT@'],
214 install : pamconfdir != 'no',
215 install_dir : pamconfdir)