]> git.ipfire.org Git - thirdparty/systemd.git/blame - src/login/meson.build
tree-wide: introduce new safe_fork() helper and port everything over
[thirdparty/systemd.git] / src / login / meson.build
CommitLineData
3a726fcd
ZJS
1# SPDX-License-Identifier: LGPL-2.1+
2#
3# Copyright 2017 Zbigniew Jędrzejewski-Szmek
4#
5# systemd 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.
9#
10# systemd 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.
14#
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
5c23128d 18systemd_logind_sources = files('''
37efbbd8
ZJS
19 logind.c
20 logind.h
5c23128d
ZJS
21'''.split())
22
23logind_gperf_c = custom_target(
37efbbd8
ZJS
24 'logind_gperf.c',
25 input : 'logind-gperf.gperf',
26 output : 'logind-gperf.c',
27 command : [gperf, '@INPUT@', '--output-file', '@OUTPUT@'])
5c23128d
ZJS
28
29systemd_logind_sources += [logind_gperf_c]
30
31
32liblogind_core_sources = files('''
37efbbd8
ZJS
33 logind-core.c
34 logind-device.c
35 logind-device.h
36 logind-button.c
37 logind-button.h
38 logind-action.c
39 logind-action.h
40 logind-seat.c
41 logind-seat.h
42 logind-session.c
43 logind-session.h
44 logind-session-device.c
45 logind-session-device.h
46 logind-user.c
47 logind-user.h
48 logind-inhibit.c
49 logind-inhibit.h
50 logind-dbus.c
51 logind-session-dbus.c
52 logind-seat-dbus.c
53 logind-user-dbus.c
54 logind-utmp.c
55 logind-acl.h
5c23128d
ZJS
56'''.split())
57
58logind_acl_c = files('logind-acl.c')
349cc4a5 59if conf.get('HAVE_ACL') == 1
37efbbd8 60 liblogind_core_sources += logind_acl_c
5c23128d
ZJS
61endif
62
63liblogind_core = static_library(
37efbbd8
ZJS
64 'logind-core',
65 liblogind_core_sources,
66 include_directories : includes,
67 dependencies : [libacl])
5c23128d
ZJS
68
69loginctl_sources = files('''
37efbbd8
ZJS
70 loginctl.c
71 sysfs-show.h
72 sysfs-show.c
5c23128d
ZJS
73'''.split())
74
349cc4a5 75if conf.get('ENABLE_LOGIND') == 1
37efbbd8
ZJS
76 logind_conf = configure_file(
77 input : 'logind.conf.in',
78 output : 'logind.conf',
79 configuration : substs)
80 install_data(logind_conf,
81 install_dir : pkgsysconfdir)
5c23128d 82
37efbbd8
ZJS
83 pam_systemd_sym = 'src/login/pam_systemd.sym'
84 pam_systemd_c = files('pam_systemd.c')
5c23128d 85
37efbbd8
ZJS
86 install_data('org.freedesktop.login1.conf',
87 install_dir : dbuspolicydir)
88 install_data('org.freedesktop.login1.service',
89 install_dir : dbussystemservicedir)
5c23128d 90
c8121792 91 i18n.merge_file(
37efbbd8
ZJS
92 'org.freedesktop.login1.policy',
93 input : 'org.freedesktop.login1.policy.in',
94 output : 'org.freedesktop.login1.policy',
c8121792 95 po_dir : po_dir,
d79a2f5f 96 data_dirs : po_dir,
37efbbd8
ZJS
97 install : install_polkit,
98 install_dir : polkitpolicydir)
5c23128d 99
37efbbd8
ZJS
100 install_data('70-power-switch.rules',
101 '70-uaccess.rules',
102 install_dir : udevrulesdir)
5c23128d 103
37efbbd8
ZJS
104 foreach file : ['71-seat.rules',
105 '73-seat-late.rules']
106 gen = configure_file(
107 input : file + '.in',
108 output : file,
109 configuration : substs)
110 install_data(gen,
111 install_dir : udevrulesdir)
112 endforeach
5c23128d 113
37efbbd8
ZJS
114 custom_target(
115 'systemd-user',
116 input : 'systemd-user.m4',
117 output: 'systemd-user',
118 command : [m4, '-P'] + m4_defines + ['@INPUT@'],
119 capture : true,
120 install : pamconfdir != 'no',
121 install_dir : pamconfdir)
5c23128d 122endif