1 # SPDX-License-Identifier: LGPL-2.1+
3 libcore_shared_sources = '''
135 load_fragment_gperf_gperf = custom_target(
136 'load-fragment-gperf.gperf',
137 input : 'load-fragment-gperf.gperf.m4',
138 output: 'load-fragment-gperf.gperf',
139 command : [meson_apply_m4, config_h, '@INPUT@'],
142 load_fragment_gperf_c = custom_target(
143 'load-fragment-gperf.c',
144 input : load_fragment_gperf_gperf,
145 output : 'load-fragment-gperf.c',
146 command : [gperf, '@INPUT@', '--output-file', '@OUTPUT@'])
148 awkscript = 'load-fragment-gperf-nulstr.awk'
149 load_fragment_gperf_nulstr_c = custom_target(
150 'load-fragment-gperf-nulstr.c',
151 input : [awkscript, load_fragment_gperf_gperf],
152 output : 'load-fragment-gperf-nulstr.c',
153 command : [awk, '-f', '@INPUT0@', '@INPUT1@'],
156 # A convenience library to share code with other binaries:
157 # systemd-shutdown, systemd-remount-fs, systemd-machine-id-setup, …
158 libcore_shared = static_library(
160 libcore_shared_sources,
161 include_directories : includes,
162 dependencies : [versiondep,
165 libcore = static_library(
168 load_fragment_gperf_c,
169 load_fragment_gperf_nulstr_c,
170 include_directories : includes,
171 link_whole : libcore_shared,
172 dependencies : [versiondep,
184 systemd_sources = files('main.c')
186 in_files = [['macros.systemd', rpmmacrosdir],
187 ['system.conf', pkgsysconfdir],
188 ['user.conf', pkgsysconfdir],
189 ['systemd.pc', pkgconfigdatadir],
190 ['triggers.systemd', '']]
192 foreach item : in_files
197 input : file + '.in',
199 configuration : substs,
200 install_dir : dir == 'no' ? '' : dir)
203 install_data('org.freedesktop.systemd1.conf',
204 install_dir : dbuspolicydir)
205 install_data('org.freedesktop.systemd1.service',
206 install_dir : dbussystemservicedir)
208 policy = configure_file(
209 input : 'org.freedesktop.systemd1.policy.in',
210 output : 'org.freedesktop.systemd1.policy',
211 configuration : substs)
213 install_dir : polkitpolicydir)
215 meson.add_install_script('sh', '-c', mkdir_p.format(systemshutdowndir))
216 meson.add_install_script('sh', '-c', mkdir_p.format(systemsleepdir))
217 meson.add_install_script('sh', '-c', mkdir_p.format(systemgeneratordir))
218 meson.add_install_script('sh', '-c', mkdir_p.format(usergeneratordir))
220 meson.add_install_script('sh', '-c', mkdir_p.format(join_paths(pkgsysconfdir, 'system')))
221 meson.add_install_script('sh', '-c', mkdir_p.format(join_paths(pkgsysconfdir, 'user')))
222 meson.add_install_script('sh', '-c', mkdir_p.format(join_paths(sysconfdir, 'xdg/systemd')))