]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
meson: install uuidd.rc with -Dsysvinit=enabled
authorChris Hofstaedtler <zeha@debian.org>
Sun, 18 Dec 2022 18:42:04 +0000 (18:42 +0000)
committerChris Hofstaedtler <zeha@debian.org>
Sun, 18 Dec 2022 22:40:48 +0000 (23:40 +0100)
Signed-off-by: Chris Hofstaedtler <zeha@debian.org>
meson.build
meson_options.txt
misc-utils/meson.build

index 365a149c34387c77bfcb099b830ddbdcba55ebd9..9a5b280bedc934c9f2d34fb8e44477fdf573d4b3 100644 (file)
@@ -23,6 +23,7 @@ docdir = join_paths(prefixdir, get_option('datadir'), 'doc', 'util-linux')
 mandir = join_paths(prefixdir, get_option('mandir'))
 runstatedir = '/run'
 execprefixdir = prefixdir
+sysconfdir = join_paths(prefixdir, get_option('sysconfdir'))
 usrbin_exec_dir = join_paths(execprefixdir, bindir)
 usrsbin_exec_dir = join_paths(execprefixdir, sbindir)
 bash_completion = dependency('bash-completion', required : get_option('build-bash-completion'))
@@ -57,6 +58,7 @@ conf.set_quoted('LIBBLKID_DATE', libblkid_date)
 conf.set('bindir', bindir)
 conf.set('sbindir', sbindir)
 conf.set('runstatedir', runstatedir)
+conf.set('sysconfdir', sysconfdir)
 conf.set('usrsbin_execdir', usrsbin_exec_dir)
 conf.set('docdir', docdir)
 conf.set_quoted('_PATH_SYSCONFSTATICDIR', sysconfstaticdir)
@@ -751,6 +753,9 @@ if systemd.found()
   systemdsystemunitdir = systemd.get_variable(pkgconfig : 'systemdsystemunitdir')
 endif
 
+sysvinit = get_option('sysvinit').enabled()
+sysvinitrcdir = sysconfdir + '/init.d'
+
 chfn_chsh_password = get_option('chfn-chsh-password') or lib_user.found()
 conf.set('CHFN_CHSH_PASSWORD', chfn_chsh_password ? 1 : false)
 
index 339948b91394a0b833bd16fe8cc41d072ce924d7..0632c891dfb58fd5763b6626077b2fe3f1e0d4f3 100644 (file)
@@ -20,6 +20,8 @@ option('smack',       type : 'feature', value : 'disabled')
 option('magic',       type : 'feature')
 option('econf',       type : 'feature')
 option('systemd',     type : 'feature')
+option('sysvinit',    type : 'feature', value : 'disabled',
+       description : 'build and install sysvinit startup scripts')
 option('btrfs',       type : 'feature')
 option('widechar',    type : 'feature',
        description : 'compile with wide character support')
index d7dfe7372c8aa0522a1017084f463db224409643..b6009704970aa1b7446e40379a368f9b7da3572f 100644 (file)
@@ -92,6 +92,16 @@ if build_uuidd and systemd.found()
     uuidd_socket,
     install_dir : systemdsystemunitdir)
 endif
+if build_uuidd and sysvinit
+  uuidd_rc = configure_file(
+    input : 'uuidd.rc.in',
+    output : 'uuidd.rc',
+    configuration : conf)
+  install_data(
+    uuidd_rc,
+    install_mode : 'rwxr-xr-x',
+    install_dir : sysvinitrcdir)
+endif
 
 blkid_sources = files(
   'blkid.c',