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

index a26c61fd624eeb3f07a0435390bf118941d3f060..7f3eb9918828709ba168d0689997d9a8062fe044 100644 (file)
@@ -2570,83 +2570,6 @@ if conf.get('HAVE_BLKID') == 1 and conf.get('ENABLE_BOOTLOADER') == 1
         endif
 endif
 
-if conf.get('ENABLE_HOMED') == 1
-        executable(
-                'systemd-homework',
-                systemd_homework_sources,
-                include_directories : includes,
-                link_with : [libshared,
-                             libshared_fdisk],
-                dependencies : [libblkid,
-                                libcrypt,
-                                libfdisk,
-                                libopenssl,
-                                libp11kit,
-                                threads,
-                                userspace],
-                install_rpath : pkglibdir,
-                install : true,
-                install_dir : libexecdir)
-
-        dbus_programs += executable(
-                'systemd-homed',
-                systemd_homed_sources,
-                include_directories : home_includes,
-                link_with : [libshared],
-                dependencies : [libcrypt,
-                                libm,
-                                libopenssl,
-                                threads,
-                                userspace],
-                install_rpath : pkglibdir,
-                install : true,
-                install_dir : libexecdir)
-
-        public_programs += executable(
-                'homectl',
-                homectl_sources,
-                include_directories : includes,
-                link_with : [libshared],
-                dependencies : [libcrypt,
-                                libdl,
-                                libopenssl,
-                                libp11kit,
-                                threads,
-                                userspace],
-                install_rpath : pkglibdir,
-                install : true)
-
-        if conf.get('HAVE_PAM') == 1
-                version_script_arg = project_source_root / pam_systemd_home_sym
-                pam_systemd_home = shared_library(
-                        'pam_systemd_home',
-                        pam_systemd_home_c,
-                        name_prefix : '',
-                        include_directories : includes,
-                        link_args : ['-shared',
-                                     '-Wl,--version-script=' + version_script_arg],
-                        link_with : [libsystemd_static,
-                                     libshared_static],
-                        dependencies : [libcrypt,
-                                        libpam_misc,
-                                        libpam,
-                                        threads,
-                                        userspace],
-                        link_depends : pam_systemd_home_sym,
-                        install : true,
-                        install_tag : 'pam',
-                        install_dir : pamlibdir)
-
-                if want_tests != 'false'
-                        test('dlopen-pam_systemd_home',
-                             test_dlopen,
-                             # path to dlopen must include a slash
-                             args : pam_systemd_home.full_path(),
-                             depends : pam_systemd_home)
-                endif
-        endif
-endif
-
 meson.add_install_script(meson_make_symlink,
                          bindir / 'udevadm',
                          libexecdir / 'systemd-udevd')
index ff3cf411fedcb2cafd9bece1037c60911f1cbccf..cbd37dba780647e6c20e4a89b6cd0907bc8aaeb7 100644 (file)
@@ -56,13 +56,77 @@ homectl_sources = files(
         'user-record-util.c',
 )
 
-pam_systemd_home_sym = 'src/home/pam_systemd_home.sym'
-pam_systemd_home_c = files(
+pam_systemd_home_sources = files(
         'home-util.c',
         'pam_systemd_home.c',
         'user-record-util.c',
 )
 
+executables += [
+        libexec_template + {
+                'name' : 'systemd-homework',
+                'conditions' : ['ENABLE_HOMED'],
+                'sources' : systemd_homework_sources,
+                'link_with' : [
+                        libshared,
+                        libshared_fdisk
+                ],
+                'dependencies' : [
+                        libblkid,
+                        libcrypt,
+                        libfdisk,
+                        libopenssl,
+                        libp11kit,
+                        threads,
+                ],
+        },
+        libexec_template + {
+                'name' : 'systemd-homed',
+                'dbus' : true,
+                'conditions' : ['ENABLE_HOMED'],
+                'sources' : systemd_homed_sources,
+                'include_directories' : includes +
+                                        include_directories('.'),
+                'dependencies' : [
+                        libcrypt,
+                        libm,
+                        libopenssl,
+                        threads,
+                ],
+        },
+        executable_template + {
+                'name' : 'homectl',
+                'public' : true,
+                'conditions' : ['ENABLE_HOMED'],
+                'sources' : homectl_sources,
+                'dependencies' : [
+                        libcrypt,
+                        libdl,
+                        libopenssl,
+                        libp11kit,
+                        threads,
+                ],
+        },
+]
+
+modules += [
+        pam_template + {
+                'name' : 'pam_systemd_home',
+                'conditions' : [
+                        'ENABLE_HOMED',
+                        'HAVE_PAM',
+                ],
+                'sources' : pam_systemd_home_sources,
+                'dependencies' : [
+                        libcrypt,
+                        libpam_misc,
+                        libpam,
+                        threads,
+                ],
+                'link_depends' : files('pam_systemd_home.sym'),
+        },
+]
+
 if conf.get('ENABLE_HOMED') == 1
         install_data('org.freedesktop.home1.conf',
                      install_dir : dbuspolicydir)