summaryrefslogtreecommitdiffstats
path: root/src/timesync/meson.build
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-10 20:49:52 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-10 20:49:52 +0000
commit55944e5e40b1be2afc4855d8d2baf4b73d1876b5 (patch)
tree33f869f55a1b149e9b7c2b7e201867ca5dd52992 /src/timesync/meson.build
parentInitial commit. (diff)
downloadsystemd-55944e5e40b1be2afc4855d8d2baf4b73d1876b5.tar.xz
systemd-55944e5e40b1be2afc4855d8d2baf4b73d1876b5.zip
Adding upstream version 255.4.upstream/255.4
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'src/timesync/meson.build')
-rw-r--r--src/timesync/meson.build80
1 files changed, 80 insertions, 0 deletions
diff --git a/src/timesync/meson.build b/src/timesync/meson.build
new file mode 100644
index 0000000..6844480
--- /dev/null
+++ b/src/timesync/meson.build
@@ -0,0 +1,80 @@
+# SPDX-License-Identifier: LGPL-2.1-or-later
+
+sources = files(
+ 'timesyncd-conf.c',
+ 'timesyncd-manager.c',
+ 'timesyncd-server.c',
+)
+
+systemd_timesyncd_sources = files(
+ 'timesyncd.c',
+ 'timesyncd-bus.c',
+)
+
+sources += custom_target(
+ 'timesyncd-gperf.c',
+ input : 'timesyncd-gperf.gperf',
+ output : 'timesyncd-gperf.c',
+ command : [gperf, '@INPUT@', '--output-file', '@OUTPUT@'])
+
+if get_option('link-timesyncd-shared')
+ timesyncd_link_with = [libshared]
+else
+ timesyncd_link_with = [libsystemd_static,
+ libshared_static,
+ libbasic_gcrypt]
+endif
+
+libtimesyncd_core = static_library(
+ 'timesyncd-core',
+ sources,
+ include_directories : includes,
+ dependencies : userspace,
+ link_with : timesyncd_link_with,
+ build_by_default : false)
+
+executables += [
+ libexec_template + {
+ 'name' : 'systemd-timesyncd',
+ 'conditions' : ['ENABLE_TIMESYNCD'],
+ 'sources' : systemd_timesyncd_sources,
+ 'link_with' : libtimesyncd_core,
+ 'dependencies' : [
+ libm,
+ threads,
+ ],
+ },
+ libexec_template + {
+ 'name' : 'systemd-time-wait-sync',
+ 'conditions' : ['ENABLE_TIMESYNCD'],
+ 'sources' : files('wait-sync.c'),
+ 'link_with' : libtimesyncd_core,
+ },
+ test_template + {
+ 'sources' : files('test-timesync.c'),
+ 'link_with' : [
+ libshared,
+ libtimesyncd_core,
+ ],
+ 'dependencies' : libm,
+ },
+]
+
+custom_target(
+ 'timesyncd.conf',
+ input : 'timesyncd.conf.in',
+ output : 'timesyncd.conf',
+ command : [jinja2_cmdline, '@INPUT@', '@OUTPUT@'],
+ install : conf.get('ENABLE_TIMESYNCD') == 1 and install_sysconfdir_samples,
+ install_dir : pkgconfigfiledir)
+
+if conf.get('ENABLE_TIMESYNCD') == 1
+ install_data('org.freedesktop.timesync1.conf',
+ install_dir : dbuspolicydir)
+ install_data('org.freedesktop.timesync1.service',
+ install_dir : dbussystemservicedir)
+ install_data('80-systemd-timesync.list',
+ install_dir : ntpservicelistdir)
+ install_data('org.freedesktop.timesync1.policy',
+ install_dir : polkitpolicydir)
+endif