From: Yu Watanabe Date: Sun, 25 Jun 2023 06:51:14 +0000 (+0900) Subject: meson: move declarations of homed and friends X-Git-Tag: v255-rc1~861^2~5 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=bab54d1fde9ca8e8888294bc955c90e352b1a9a9;p=thirdparty%2Fsystemd.git meson: move declarations of homed and friends --- diff --git a/meson.build b/meson.build index a26c61fd624..7f3eb991882 100644 --- a/meson.build +++ b/meson.build @@ -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') diff --git a/src/home/meson.build b/src/home/meson.build index ff3cf411fed..cbd37dba780 100644 --- a/src/home/meson.build +++ b/src/home/meson.build @@ -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)