]> git.ipfire.org Git - thirdparty/systemd.git/blob - src/home/meson.build
Merge pull request #31386 from mrc0mmand/test-tweaks
[thirdparty/systemd.git] / src / home / meson.build
1 # SPDX-License-Identifier: LGPL-2.1-or-later
2
3 systemd_homework_sources = files(
4 'home-util.c',
5 'homework-blob.c',
6 'homework-cifs.c',
7 'homework-directory.c',
8 'homework-fscrypt.c',
9 'homework-luks.c',
10 'homework-mount.c',
11 'homework-password-cache.c',
12 'homework-quota.c',
13 'homework.c',
14 'user-record-util.c',
15 )
16
17 if conf.get('HAVE_P11KIT') == 1
18 systemd_homework_sources += files('homework-pkcs11.c')
19 endif
20 if conf.get('HAVE_LIBFIDO2') == 1
21 systemd_homework_sources += files('homework-fido2.c')
22 endif
23
24 systemd_homed_sources = files(
25 'home-util.c',
26 'homed-bus.c',
27 'homed-conf.c',
28 'homed-home-bus.c',
29 'homed-home.c',
30 'homed-manager-bus.c',
31 'homed-manager.c',
32 'homed-operation.c',
33 'homed-varlink.c',
34 'homed.c',
35 'user-record-password-quality.c',
36 'user-record-sign.c',
37 'user-record-util.c',
38 )
39
40 homed_gperf_c = custom_target(
41 'homed_gperf.c',
42 input : 'homed-gperf.gperf',
43 output : 'homed-gperf.c',
44 command : [gperf, '@INPUT@', '--output-file', '@OUTPUT@'])
45
46 systemd_homed_sources += [homed_gperf_c]
47
48 homectl_sources = files(
49 'home-util.c',
50 'homectl-fido2.c',
51 'homectl-pkcs11.c',
52 'homectl-recovery-key.c',
53 'homectl.c',
54 'user-record-password-quality.c',
55 'user-record-util.c',
56 )
57
58 pam_systemd_home_sources = files(
59 'home-util.c',
60 'pam_systemd_home.c',
61 'user-record-util.c',
62 )
63
64 executables += [
65 libexec_template + {
66 'name' : 'systemd-homework',
67 'conditions' : ['ENABLE_HOMED'],
68 'sources' : systemd_homework_sources,
69 'link_with' : [
70 libshared,
71 libshared_fdisk
72 ],
73 'dependencies' : [
74 libblkid,
75 libcrypt,
76 libfdisk,
77 libopenssl,
78 libp11kit_cflags,
79 threads,
80 ],
81 },
82 libexec_template + {
83 'name' : 'systemd-homed',
84 'dbus' : true,
85 'conditions' : ['ENABLE_HOMED'],
86 'sources' : systemd_homed_sources,
87 'include_directories' : includes +
88 include_directories('.'),
89 'dependencies' : [
90 libcrypt,
91 libm,
92 libopenssl,
93 threads,
94 ],
95 },
96 executable_template + {
97 'name' : 'homectl',
98 'public' : true,
99 'conditions' : ['ENABLE_HOMED'],
100 'sources' : homectl_sources,
101 'dependencies' : [
102 libcrypt,
103 libdl,
104 libopenssl,
105 libp11kit_cflags,
106 threads,
107 ],
108 },
109 ]
110
111 modules += [
112 pam_template + {
113 'name' : 'pam_systemd_home',
114 'conditions' : [
115 'ENABLE_HOMED',
116 'HAVE_PAM',
117 ],
118 'sources' : pam_systemd_home_sources,
119 'dependencies' : [
120 libcrypt,
121 libpam_misc,
122 libpam,
123 threads,
124 ],
125 'version-script' : meson.current_source_dir() / 'pam_systemd_home.sym',
126 },
127 ]
128
129 if conf.get('ENABLE_HOMED') == 1
130 install_data('org.freedesktop.home1.conf',
131 install_dir : dbuspolicydir)
132 install_data('org.freedesktop.home1.service',
133 install_dir : dbussystemservicedir)
134 install_data('org.freedesktop.home1.policy',
135 install_dir : polkitpolicydir)
136
137 if install_sysconfdir_samples
138 install_data('homed.conf',
139 install_dir : pkgconfigfiledir)
140 endif
141
142 meson.add_install_script(sh, '-c',
143 ln_s.format(bindir / 'homectl',
144 bindir / 'systemd-home-fallback-shell'))
145 endif