]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
meson: move declarations of userdbd and friends
authorYu Watanabe <watanabe.yu+github@gmail.com>
Sun, 25 Jun 2023 06:50:36 +0000 (15:50 +0900)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Mon, 31 Jul 2023 20:52:50 +0000 (05:52 +0900)
meson.build
src/userdb/meson.build

index 42e1c2f908f72f56cef819eebd20721445611b32..a26c61fd624eeb3f07a0435390bf118941d3f060 100644 (file)
@@ -2570,40 +2570,6 @@ if conf.get('HAVE_BLKID') == 1 and conf.get('ENABLE_BOOTLOADER') == 1
         endif
 endif
 
-if conf.get('ENABLE_USERDB') == 1
-        executable(
-                'systemd-userwork',
-                systemd_userwork_sources,
-                include_directories : includes,
-                link_with : [libshared],
-                dependencies : [threads,
-                                userspace],
-                install_rpath : pkglibdir,
-                install : true,
-                install_dir : libexecdir)
-
-        executable(
-                'systemd-userdbd',
-                systemd_userdbd_sources,
-                include_directories : includes,
-                link_with : [libshared],
-                dependencies : [threads,
-                                userspace],
-                install_rpath : pkglibdir,
-                install : true,
-                install_dir : libexecdir)
-
-        public_programs += executable(
-                'userdbctl',
-                userdbctl_sources,
-                include_directories : includes,
-                link_with : [libshared],
-                dependencies : [threads,
-                                userspace],
-                install_rpath : pkglibdir,
-                install : true)
-endif
-
 if conf.get('ENABLE_HOMED') == 1
         executable(
                 'systemd-homework',
index e2dc812f947208f99a0dfff6c94d5fc9f688ab74..2d701c8ba7a0ba845052a4e738dd4abebc002857 100644 (file)
@@ -1,10 +1,25 @@
 # SPDX-License-Identifier: LGPL-2.1-or-later
 
-systemd_userwork_sources = files('userwork.c')
-
-systemd_userdbd_sources = files(
-        'userdbd-manager.c',
-        'userdbd.c',
-)
-
-userdbctl_sources = files('userdbctl.c')
+executables += [
+        libexec_template + {
+                'name' : 'systemd-userwork',
+                'conditions' : ['ENABLE_USERDB'],
+                'sources' : files('userwork.c'),
+                'dependencies' : threads,
+        },
+        libexec_template + {
+                'name' : 'systemd-userdbd',
+                'conditions' : ['ENABLE_USERDB'],
+                'sources' : files(
+                        'userdbd-manager.c',
+                        'userdbd.c',
+                ),
+                'dependencies' : threads,
+        },
+        executable_template + {
+                'name' : 'userdbctl',
+                'conditions' : ['ENABLE_USERDB'],
+                'sources' : files('userdbctl.c'),
+                'dependencies' : threads,
+        },
+]