]> git.sesse.net Git - plocate/commitdiff
Make it possible to rename updatedb (e.g. to updatedb.plocate).
authorSteinar H. Gunderson <steinar+git@gunderson.no>
Wed, 9 Dec 2020 23:30:04 +0000 (00:30 +0100)
committerSteinar H. Gunderson <steinar+git@gunderson.no>
Wed, 9 Dec 2020 23:33:47 +0000 (00:33 +0100)
meson.build
meson_options.txt
plocate-updatedb.service.in

index 2fcd7e0489acb8ffa9875040257e3e049bcd28c0..a94ee6788df8466e58dd25c4f29039f5d2697539 100644 (file)
@@ -39,7 +39,8 @@ executable('plocate-build', ['plocate-build.cpp', 'database-builder.cpp'],
        dependencies: [zstddep],
        install: true,
        install_dir: get_option('sbindir'))
-executable('updatedb', ['updatedb.cpp', 'database-builder.cpp', 'conf.cpp', 'lib.cpp', 'bind-mount.cpp', 'complete_pread.cpp'],
+updatedb_progname = get_option('updatedb_progname')
+executable(updatedb_progname, ['updatedb.cpp', 'database-builder.cpp', 'conf.cpp', 'lib.cpp', 'bind-mount.cpp', 'complete_pread.cpp'],
        dependencies: [zstddep, threaddep],
        install: true,
        install_dir: get_option('sbindir'))
@@ -50,6 +51,7 @@ conf_data.set('sbindir', join_paths(get_option('prefix'), get_option('sbindir'))
 conf_data.set('groupname', get_option('locategroup'))
 conf_data.set('dbfile', dbfile)
 conf_data.set('updatedb_conf', '/etc/updatedb.conf')
+conf_data.set('updatedb_progname', updatedb_progname)
 update_script = configure_file(input: 'update-plocate.sh',
                output: 'update-plocate.sh',
                configuration: conf_data)
@@ -65,7 +67,7 @@ install_man('plocate.1')
 install_man('plocate-build.8')
 
 updatedb_man = configure_file(input: 'updatedb.8.in',
-               output: 'updatedb.8',
+               output: updatedb_progname + '.8',
                configuration: conf_data)
 install_man(updatedb_man)
 
index f26115558a39f67cd8e402b39dc97e2711e6a896..7d33262f52927415b76e4acf177c269a93adf33e 100644 (file)
@@ -1,3 +1,4 @@
 option('install_cron', type: 'boolean', value: false, description: 'Install mlocate conversion script into /etc/cron.daily')
 option('install_systemd', type: 'boolean', value: true, description: 'Install systemd service and timer for updatedb, if systemd is installed')
 option('locategroup', type: 'string', value: 'plocate', description: 'Group that the install script will use for the .db file')
+option('updatedb_progname', type: 'string', value: 'updatedb', description: 'Binary name of updatedb')
index e7cb0141dff5750865efc4eabf289df787651403..a07505126153524fc664972a3c4f56ec6c254331 100644 (file)
@@ -4,7 +4,7 @@ ConditionACPower=true
 
 [Service]
 Type=oneshot
-ExecStart=@sbindir@/updatedb
+ExecStart=@sbindir@/@updatedb_progname@
 LimitNOFILE=131072
 IOSchedulingClass=idle