]> git.ipfire.org Git - thirdparty/systemd.git/blob - src/core/meson.build
Merge pull request #11827 from keszybz/pkgconfig-variables
[thirdparty/systemd.git] / src / core / meson.build
1 # SPDX-License-Identifier: LGPL-2.1+
2
3 libcore_la_sources = '''
4 audit-fd.c
5 audit-fd.h
6 automount.c
7 automount.h
8 bpf-devices.c
9 bpf-devices.h
10 bpf-firewall.c
11 bpf-firewall.h
12 cgroup.c
13 cgroup.h
14 chown-recursive.c
15 chown-recursive.h
16 dbus-automount.c
17 dbus-automount.h
18 dbus-cgroup.c
19 dbus-cgroup.h
20 dbus-device.c
21 dbus-device.h
22 dbus-execute.c
23 dbus-execute.h
24 dbus-job.c
25 dbus-job.h
26 dbus-kill.c
27 dbus-kill.h
28 dbus-manager.c
29 dbus-manager.h
30 dbus-mount.c
31 dbus-mount.h
32 dbus-path.c
33 dbus-path.h
34 dbus-scope.c
35 dbus-scope.h
36 dbus-service.c
37 dbus-service.h
38 dbus-slice.c
39 dbus-slice.h
40 dbus-socket.c
41 dbus-socket.h
42 dbus-swap.c
43 dbus-swap.h
44 dbus-target.c
45 dbus-target.h
46 dbus-timer.c
47 dbus-timer.h
48 dbus-unit.c
49 dbus-unit.h
50 dbus-util.c
51 dbus-util.h
52 dbus.c
53 dbus.h
54 device.c
55 device.h
56 dynamic-user.c
57 dynamic-user.h
58 emergency-action.c
59 emergency-action.h
60 execute.c
61 execute.h
62 hostname-setup.c
63 hostname-setup.h
64 ima-setup.c
65 ima-setup.h
66 ip-address-access.c
67 ip-address-access.h
68 job.c
69 job.h
70 kill.c
71 kill.h
72 killall.c
73 killall.h
74 kmod-setup.c
75 kmod-setup.h
76 load-dropin.c
77 load-dropin.h
78 load-fragment.c
79 load-fragment.h
80 locale-setup.c
81 locale-setup.h
82 loopback-setup.c
83 loopback-setup.h
84 machine-id-setup.c
85 machine-id-setup.h
86 manager.c
87 manager.h
88 mount-setup.c
89 mount-setup.h
90 mount.c
91 mount.h
92 namespace.c
93 namespace.h
94 path.c
95 path.h
96 scope.c
97 scope.h
98 selinux-access.c
99 selinux-access.h
100 selinux-setup.c
101 selinux-setup.h
102 service.c
103 service.h
104 show-status.c
105 show-status.h
106 slice.c
107 slice.h
108 smack-setup.c
109 smack-setup.h
110 socket.c
111 socket.h
112 swap.c
113 swap.h
114 target.c
115 target.h
116 timer.c
117 timer.h
118 transaction.c
119 transaction.h
120 unit-printf.c
121 unit-printf.h
122 unit.c
123 unit.h
124 '''.split()
125
126 load_fragment_gperf_gperf = custom_target(
127 'load-fragment-gperf.gperf',
128 input : 'load-fragment-gperf.gperf.m4',
129 output: 'load-fragment-gperf.gperf',
130 command : [meson_apply_m4, config_h, '@INPUT@'],
131 capture : true)
132
133 load_fragment_gperf_c = custom_target(
134 'load-fragment-gperf.c',
135 input : load_fragment_gperf_gperf,
136 output : 'load-fragment-gperf.c',
137 command : [gperf, '@INPUT@', '--output-file', '@OUTPUT@'])
138
139 awkscript = 'load-fragment-gperf-nulstr.awk'
140 load_fragment_gperf_nulstr_c = custom_target(
141 'load-fragment-gperf-nulstr.c',
142 input : [awkscript, load_fragment_gperf_gperf],
143 output : 'load-fragment-gperf-nulstr.c',
144 command : [awk, '-f', '@INPUT0@', '@INPUT1@'],
145 capture : true)
146
147 libcore = static_library(
148 'core',
149 libcore_la_sources,
150 load_fragment_gperf_c,
151 load_fragment_gperf_nulstr_c,
152 include_directories : includes,
153 dependencies : [versiondep,
154 threads,
155 librt,
156 libseccomp,
157 libpam,
158 libaudit,
159 libkmod,
160 libapparmor,
161 libselinux,
162 libmount])
163
164 systemd_sources = files('main.c')
165
166 systemd_shutdown_sources = files('''
167 shutdown.c
168 umount.c
169 umount.h
170 mount-setup.c
171 mount-setup.h
172 killall.c
173 killall.h
174 '''.split())
175
176 in_files = [['macros.systemd', rpmmacrosdir],
177 ['system.conf', pkgsysconfdir],
178 ['systemd.pc', pkgconfigdatadir],
179 ['triggers.systemd', '']]
180
181 foreach item : in_files
182 file = item[0]
183 dir = item[1]
184
185 configure_file(
186 input : file + '.in',
187 output : file,
188 configuration : substs,
189 install_dir : dir == 'no' ? '' : dir)
190 endforeach
191
192 install_data('org.freedesktop.systemd1.conf',
193 install_dir : dbuspolicydir)
194 install_data('org.freedesktop.systemd1.service',
195 install_dir : dbussystemservicedir)
196
197 policy = configure_file(
198 input : 'org.freedesktop.systemd1.policy.in',
199 output : 'org.freedesktop.systemd1.policy',
200 configuration : substs)
201 install_data(policy,
202 install_dir : polkitpolicydir)
203
204 install_data('user.conf',
205 install_dir : pkgsysconfdir)
206
207 meson.add_install_script('sh', '-c', mkdir_p.format(systemshutdowndir))
208 meson.add_install_script('sh', '-c', mkdir_p.format(systemsleepdir))
209 meson.add_install_script('sh', '-c', mkdir_p.format(systemgeneratordir))
210 meson.add_install_script('sh', '-c', mkdir_p.format(usergeneratordir))
211
212 meson.add_install_script('sh', '-c',
213 mkdir_p.format(join_paths(pkgsysconfdir, 'system/multi-user.target.wants')))
214 meson.add_install_script('sh', '-c',
215 mkdir_p.format(join_paths(pkgsysconfdir, 'system/getty.target.wants')))
216 meson.add_install_script('sh', '-c',
217 mkdir_p.format(join_paths(pkgsysconfdir, 'user')))
218 meson.add_install_script('sh', '-c',
219 mkdir_p.format(join_paths(sysconfdir, 'xdg/systemd')))