1 # SPDX-License-Identifier: LGPL-2.1+
3 libcore_shared_sources = '''
129 load_fragment_gperf_gperf = custom_target(
130 'load-fragment-gperf.gperf',
131 input : 'load-fragment-gperf.gperf.m4',
132 output: 'load-fragment-gperf.gperf',
133 command : [meson_apply_m4, config_h, '@INPUT@'],
136 load_fragment_gperf_c = custom_target(
137 'load-fragment-gperf.c',
138 input : load_fragment_gperf_gperf,
139 output : 'load-fragment-gperf.c',
140 command : [gperf, '@INPUT@', '--output-file', '@OUTPUT@'])
142 awkscript = 'load-fragment-gperf-nulstr.awk'
143 load_fragment_gperf_nulstr_c = custom_target(
144 'load-fragment-gperf-nulstr.c',
145 input : [awkscript, load_fragment_gperf_gperf],
146 output : 'load-fragment-gperf-nulstr.c',
147 command : [awk, '-f', '@INPUT0@', '@INPUT1@'],
150 # A convenience library to share code with other binaries:
151 # systemd-shutdown, systemd-remount-fs, systemd-machine-id-setup, …
152 libcore_shared = static_library(
154 libcore_shared_sources,
155 include_directories : includes,
156 dependencies : [versiondep,
159 libcore = static_library(
162 load_fragment_gperf_c,
163 load_fragment_gperf_nulstr_c,
164 include_directories : includes,
165 link_whole : libcore_shared,
166 dependencies : [versiondep,
177 systemd_sources = files('main.c')
179 in_files = [['macros.systemd', rpmmacrosdir],
180 ['system.conf', pkgsysconfdir],
181 ['user.conf', pkgsysconfdir],
182 ['systemd.pc', pkgconfigdatadir],
183 ['triggers.systemd', '']]
185 foreach item : in_files
190 input : file + '.in',
192 configuration : substs,
193 install_dir : dir == 'no' ? '' : dir)
196 install_data('org.freedesktop.systemd1.conf',
197 install_dir : dbuspolicydir)
199 policy = configure_file(
200 input : 'org.freedesktop.systemd1.policy.in',
201 output : 'org.freedesktop.systemd1.policy',
202 configuration : substs)
204 install_dir : polkitpolicydir)
206 meson.add_install_script('sh', '-c', mkdir_p.format(systemshutdowndir))
207 meson.add_install_script('sh', '-c', mkdir_p.format(systemsleepdir))
208 meson.add_install_script('sh', '-c', mkdir_p.format(systemgeneratordir))
209 meson.add_install_script('sh', '-c', mkdir_p.format(usergeneratordir))
211 meson.add_install_script('sh', '-c', mkdir_p.format(join_paths(pkgsysconfdir, 'system')))
212 meson.add_install_script('sh', '-c', mkdir_p.format(join_paths(pkgsysconfdir, 'user')))
213 meson.add_install_script('sh', '-c', mkdir_p.format(join_paths(sysconfdir, 'xdg/systemd')))