1 # SPDX-License-Identifier: LGPL-2.1+
3 libcore_la_sources = '''
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@'],
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@'])
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@'],
147 libcore = static_library(
150 load_fragment_gperf_c,
151 load_fragment_gperf_nulstr_c,
152 include_directories : includes,
153 dependencies : [threads,
163 systemd_sources = files('main.c')
165 systemd_shutdown_sources = files('''
175 in_files = [['macros.systemd', rpmmacrosdir],
176 ['triggers.systemd', ''],
177 ['systemd.pc', pkgconfigdatadir],
178 ['system.conf', pkgsysconfdir]]
180 foreach item : in_files
184 # If 'no', disable generation completely.
185 # If '', generate, but do not install.
187 gen = configure_file(
188 input : file + '.in',
190 configuration : substs)
198 install_data('org.freedesktop.systemd1.conf',
199 install_dir : dbuspolicydir)
200 install_data('org.freedesktop.systemd1.service',
201 install_dir : dbussystemservicedir)
203 policy = configure_file(
204 input : 'org.freedesktop.systemd1.policy.in',
205 output : 'org.freedesktop.systemd1.policy',
206 configuration : substs)
208 install_dir : polkitpolicydir)
210 install_data('user.conf',
211 install_dir : pkgsysconfdir)
213 meson.add_install_script('sh', '-c', mkdir_p.format(systemshutdowndir))
214 meson.add_install_script('sh', '-c', mkdir_p.format(systemsleepdir))
215 meson.add_install_script('sh', '-c', mkdir_p.format(systemgeneratordir))
216 meson.add_install_script('sh', '-c', mkdir_p.format(usergeneratordir))
218 meson.add_install_script('sh', '-c',
219 mkdir_p.format(join_paths(pkgsysconfdir, 'system/multi-user.target.wants')))
220 meson.add_install_script('sh', '-c',
221 mkdir_p.format(join_paths(pkgsysconfdir, 'system/getty.target.wants')))
222 meson.add_install_script('sh', '-c',
223 mkdir_p.format(join_paths(pkgsysconfdir, 'user')))
224 meson.add_install_script('sh', '-c',
225 mkdir_p.format(join_paths(sysconfdir, 'xdg/systemd')))