1 libcore_la_sources = '''
120 load_fragment_gperf_gperf = custom_target(
121 'load-fragment-gperf.gperf',
122 input : 'load-fragment-gperf.gperf.m4',
123 output: 'load-fragment-gperf.gperf',
124 command : [m4, '-P'] + m4_defines + ['@INPUT@'],
127 load_fragment_gperf_c = custom_target(
128 'load-fragment-gperf.c',
129 input : load_fragment_gperf_gperf,
130 output : 'load-fragment-gperf.c',
131 command : [gperf, '@INPUT@', '--output-file', '@OUTPUT@'])
133 awkscript = 'load-fragment-gperf-nulstr.awk'
134 load_fragment_gperf_nulstr_c = custom_target(
135 'load-fragment-gperf-nulstr.c',
136 input : [awkscript, load_fragment_gperf_gperf],
137 output : 'load-fragment-gperf-nulstr.c',
138 command : [awk, '-f', '@INPUT0@', '@INPUT1@'],
141 libcore = static_library(
144 load_fragment_gperf_c,
145 load_fragment_gperf_nulstr_c,
146 include_directories : includes,
147 link_with : [libshared_static],
148 dependencies : [threads,
156 systemd_sources = files('main.c')
158 systemd_shutdown_sources = files('''
168 in_files = [['macros.systemd', rpmmacrosdir],
169 ['triggers.systemd', ''],
170 ['systemd.pc', pkgconfigdatadir]]
172 foreach item : in_files
176 # If 'no', disable generation completely.
177 # If '', generate, but do not install.
179 gen = configure_file(
180 input : file + '.in',
182 configuration : substs)
190 install_data('org.freedesktop.systemd1.conf',
191 install_dir : dbuspolicydir)
192 install_data('org.freedesktop.systemd1.service',
193 install_dir : dbussystemservicedir)
195 policy_in = configure_file(
196 input : 'org.freedesktop.systemd1.policy.in.in',
197 output : 'org.freedesktop.systemd1.policy.in',
198 configuration : substs)
201 'org.freedesktop.systemd1.policy',
203 output : 'org.freedesktop.systemd1.policy',
204 command : intltool_command,
205 install : install_polkit,
206 install_dir : polkitpolicydir)
208 # TODO: this might work with meson from git, see
209 # https://github.com/mesonbuild/meson/issues/1441#issuecomment-283585493
212 # 'org.freedesktop.systemd1.policy',
215 # output : 'org.freedesktop.systemd1.policy',
216 # install : install_polkit,
217 # install_dir : polkitpolicydir)
219 install_data('system.conf',
221 install_dir : pkgsysconfdir)
223 meson.add_install_script('sh', '-c', mkdir_p.format(systemshutdowndir))
224 meson.add_install_script('sh', '-c', mkdir_p.format(systemsleepdir))
225 meson.add_install_script('sh', '-c', mkdir_p.format(systemgeneratordir))
226 meson.add_install_script('sh', '-c', mkdir_p.format(usergeneratordir))
228 meson.add_install_script('sh', '-c',
229 mkdir_p.format(join_paths(pkgsysconfdir, 'system/multi-user.target.wants')))
230 meson.add_install_script('sh', '-c',
231 mkdir_p.format(join_paths(pkgsysconfdir, 'system/getty.target.wants')))
232 meson.add_install_script('sh', '-c',
233 mkdir_p.format(join_paths(pkgsysconfdir, 'user')))
234 meson.add_install_script('sh', '-c',
235 mkdir_p.format(join_paths(sysconfdir, 'xdg/systemd')))