summaryrefslogtreecommitdiffstats
path: root/src/timesync/meson.build
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-07 15:35:18 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-07 15:35:18 +0000
commitb750101eb236130cf056c675997decbac904cc49 (patch)
treea5df1a06754bdd014cb975c051c83b01c9a97532 /src/timesync/meson.build
parentInitial commit. (diff)
downloadsystemd-b750101eb236130cf056c675997decbac904cc49.tar.xz
systemd-b750101eb236130cf056c675997decbac904cc49.zip
Adding upstream version 252.22.upstream/252.22
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rw-r--r--src/timesync/meson.build64
1 files changed, 64 insertions, 0 deletions
diff --git a/src/timesync/meson.build b/src/timesync/meson.build
new file mode 100644
index 0000000..15ca7d2
--- /dev/null
+++ b/src/timesync/meson.build
@@ -0,0 +1,64 @@
+# SPDX-License-Identifier: LGPL-2.1-or-later
+
+sources = files(
+ 'timesyncd-conf.c',
+ 'timesyncd-conf.h',
+ 'timesyncd-manager.c',
+ 'timesyncd-manager.h',
+ 'timesyncd-ntp-message.h',
+ 'timesyncd-server.c',
+ 'timesyncd-server.h')
+
+systemd_timesyncd_sources = files(
+ 'timesyncd.c',
+ 'timesyncd-bus.c',
+ 'timesyncd-bus.h')
+
+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,
+ link_with : timesyncd_link_with,
+ build_by_default : false)
+
+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 : pkgsysconfdir)
+
+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
+
+############################################################
+
+tests += [
+ [files('test-timesync.c'),
+ [libtimesyncd_core,
+ libshared],
+ [libm]],
+]