]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
meson: build standalone version of systemd-tmpfiles 16061/head
authorFilipe Brandenburger <filbranden@gmail.com>
Wed, 3 Jun 2020 21:49:53 +0000 (14:49 -0700)
committerFilipe Brandenburger <filbranden@gmail.com>
Wed, 10 Jun 2020 17:54:29 +0000 (10:54 -0700)
Use -Dstandalone-binaries=yes to enable building and installing this standalone
version of the binary without a dependency on the systemd-shared solib.

Also move the list of sources for systemd-tmpfiles to its own meson.build file.

meson.build
src/tmpfiles/meson.build [new file with mode: 0644]

index e229e6b20c5a4ad1abc3295391d533b962ecd7f1..4a679449ce2793014afdde5823d66887d792c355 100644 (file)
@@ -1637,6 +1637,7 @@ subdir('src/nspawn')
 subdir('src/resolve')
 subdir('src/timedate')
 subdir('src/timesync')
+subdir('src/tmpfiles')
 subdir('src/vconsole')
 subdir('src/boot/efi')
 
@@ -2952,9 +2953,7 @@ endif
 if conf.get('ENABLE_TMPFILES') == 1
         exe = executable(
                 'systemd-tmpfiles',
-                'src/tmpfiles/tmpfiles.c',
-                'src/tmpfiles/offline-passwd.c',
-                'src/tmpfiles/offline-passwd.h',
+                systemd_tmpfiles_sources,
                 include_directories : includes,
                 link_with : [libshared],
                 dependencies : [libacl],
@@ -2969,6 +2968,21 @@ if conf.get('ENABLE_TMPFILES') == 1
                      # https://github.com/mesonbuild/meson/issues/2681
                      args : exe.full_path())
         endif
+
+        if have_standalone_binaries
+                public_programs += executable(
+                        'systemd-tmpfiles.standalone',
+                        systemd_tmpfiles_sources,
+                        include_directories : includes,
+                        link_with : [libshared_static,
+                                     libbasic,
+                                     libbasic_gcrypt,
+                                     libsystemd_static,
+                                     libjournal_client],
+                        dependencies : [libacl],
+                        install : true,
+                        install_dir : rootbindir)
+        endif
 endif
 
 if conf.get('ENABLE_HWDB') == 1
diff --git a/src/tmpfiles/meson.build b/src/tmpfiles/meson.build
new file mode 100644 (file)
index 0000000..2f8fb29
--- /dev/null
@@ -0,0 +1,7 @@
+# SPDX-License-Identifier: LGPL-2.1+
+
+systemd_tmpfiles_sources = [
+        'src/tmpfiles/tmpfiles.c',
+        'src/tmpfiles/offline-passwd.c',
+        'src/tmpfiles/offline-passwd.h',
+]