| 1 |
# SPDX-License-Identifier: LGPL-2.1-or-later |
| 2 |
|
| 3 |
if conf.get('ENABLE_TIMESYNCD') != 1 |
| 4 |
subdir_done() |
| 5 |
endif |
| 6 |
|
| 7 |
timesyncd_sources = files( |
| 8 |
'timesyncd.c', |
| 9 |
'timesyncd-bus.c', |
| 10 |
) |
| 11 |
timesyncd_extract_sources = files( |
| 12 |
'timesyncd-conf.c', |
| 13 |
'timesyncd-manager.c', |
| 14 |
'timesyncd-server.c', |
| 15 |
) |
| 16 |
|
| 17 |
timesyncd_gperf_c = custom_target( |
| 18 |
input : 'timesyncd-gperf.gperf', |
| 19 |
output : 'timesyncd-gperf.c', |
| 20 |
command : [gperf, '@INPUT@', '--output-file', '@OUTPUT@']) |
| 21 |
|
| 22 |
generated_sources += timesyncd_gperf_c |
| 23 |
timesyncd_extract_sources += timesyncd_gperf_c |
| 24 |
|
| 25 |
if get_option('link-timesyncd-shared') |
| 26 |
timesyncd_link_with = [libshared] |
| 27 |
else |
| 28 |
timesyncd_link_with = [libsystemd_static, |
| 29 |
libshared_static] |
| 30 |
endif |
| 31 |
|
| 32 |
executables += [ |
| 33 |
libexec_template + { |
| 34 |
'name' : 'systemd-timesyncd', |
| 35 |
'sources' : timesyncd_sources, |
| 36 |
'extract' : timesyncd_extract_sources, |
| 37 |
'link_with' : timesyncd_link_with, |
| 38 |
'dependencies' : libm, |
| 39 |
}, |
| 40 |
libexec_template + { |
| 41 |
'name' : 'systemd-time-wait-sync', |
| 42 |
'sources' : files('wait-sync.c'), |
| 43 |
'objects' : ['systemd-timesyncd'], |
| 44 |
'dependencies' : libm, |
| 45 |
}, |
| 46 |
test_template + { |
| 47 |
'sources' : files('test-timesync.c'), |
| 48 |
'objects' : ['systemd-timesyncd'], |
| 49 |
'dependencies' : libm, |
| 50 |
}, |
| 51 |
] |
| 52 |
|
| 53 |
custom_target( |
| 54 |
input : 'timesyncd.conf.in', |
| 55 |
output : 'timesyncd.conf', |
| 56 |
command : [jinja2_cmdline, '@INPUT@', '@OUTPUT@'], |
| 57 |
install : conf.get('ENABLE_TIMESYNCD') == 1 and install_sysconfdir_samples, |
| 58 |
install_dir : pkgconfigfiledir) |
| 59 |
|
| 60 |
install_data( |
| 61 |
'org.freedesktop.timesync1.conf', |
| 62 |
install_dir : dbuspolicydir) |
| 63 |
install_data( |
| 64 |
'org.freedesktop.timesync1.service', |
| 65 |
install_dir : dbussystemservicedir) |
| 66 |
install_data( |
| 67 |
'80-systemd-timesync.list', |
| 68 |
install_dir : ntpservicelistdir) |
| 69 |
install_data( |
| 70 |
'org.freedesktop.timesync1.policy', |
| 71 |
install_dir : polkitpolicydir) |