1 # SPDX-License-Identifier: LGPL-2.1+
3 libcore_shared_sources = '''
131 load_fragment_gperf_gperf = custom_target(
132 'load-fragment-gperf.gperf',
133 input : 'load-fragment-gperf.gperf.m4',
134 output: 'load-fragment-gperf.gperf',
135 command : [meson_apply_m4, config_h, '@INPUT@'],
138 load_fragment_gperf_c = custom_target(
139 'load-fragment-gperf.c',
140 input : load_fragment_gperf_gperf,
141 output : 'load-fragment-gperf.c',
142 command : [gperf, '@INPUT@', '--output-file', '@OUTPUT@'])
144 awkscript = 'load-fragment-gperf-nulstr.awk'
145 load_fragment_gperf_nulstr_c = custom_target(
146 'load-fragment-gperf-nulstr.c',
147 input : [awkscript, load_fragment_gperf_gperf],
148 output : 'load-fragment-gperf-nulstr.c',
149 command : [awk, '-f', '@INPUT0@', '@INPUT1@'],
152 # A convenience library to share code with other binaries:
153 # systemd-shutdown, systemd-remount-fs, systemd-machine-id-setup, …
154 libcore_shared = static_library(
156 libcore_shared_sources,
157 include_directories : includes,
158 dependencies : [versiondep,
161 libcore = static_library(
164 load_fragment_gperf_c,
165 load_fragment_gperf_nulstr_c,
166 include_directories : includes,
167 link_whole : libcore_shared,
168 dependencies : [versiondep,
179 systemd_sources = files('main.c')
181 in_files = [['macros.systemd', rpmmacrosdir],
182 ['system.conf', pkgsysconfdir],
183 ['user.conf', pkgsysconfdir],
184 ['systemd.pc', pkgconfigdatadir],
185 ['triggers.systemd', '']]
187 foreach item : in_files
192 input : file + '.in',
194 configuration : substs,
195 install_dir : dir == 'no' ? '' : dir)
198 install_data('org.freedesktop.systemd1.conf',
199 install_dir : dbuspolicydir)
201 policy = configure_file(
202 input : 'org.freedesktop.systemd1.policy.in',
203 output : 'org.freedesktop.systemd1.policy',
204 configuration : substs)
206 install_dir : polkitpolicydir)
208 meson.add_install_script('sh', '-c', mkdir_p.format(systemshutdowndir))
209 meson.add_install_script('sh', '-c', mkdir_p.format(systemsleepdir))
210 meson.add_install_script('sh', '-c', mkdir_p.format(systemgeneratordir))
211 meson.add_install_script('sh', '-c', mkdir_p.format(usergeneratordir))
213 meson.add_install_script('sh', '-c', mkdir_p.format(join_paths(pkgsysconfdir, 'system')))
214 meson.add_install_script('sh', '-c', mkdir_p.format(join_paths(pkgsysconfdir, 'user')))
215 meson.add_install_script('sh', '-c', mkdir_p.format(join_paths(sysconfdir, 'xdg/systemd')))