From: Steinar H. Gunderson Date: Wed, 9 Dec 2020 23:30:04 +0000 (+0100) Subject: Make it possible to rename updatedb (e.g. to updatedb.plocate). X-Git-Tag: 1.1.2~2 X-Git-Url: https://git.sesse.net/?p=plocate;a=commitdiff_plain;h=a22ae24d0cba97e00ff22e9f5543b094c32431e3 Make it possible to rename updatedb (e.g. to updatedb.plocate). --- diff --git a/meson.build b/meson.build index 2fcd7e0..a94ee67 100644 --- a/meson.build +++ b/meson.build @@ -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) diff --git a/meson_options.txt b/meson_options.txt index f261155..7d33262 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -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') diff --git a/plocate-updatedb.service.in b/plocate-updatedb.service.in index e7cb014..a075051 100644 --- a/plocate-updatedb.service.in +++ b/plocate-updatedb.service.in @@ -4,7 +4,7 @@ ConditionACPower=true [Service] Type=oneshot -ExecStart=@sbindir@/updatedb +ExecStart=@sbindir@/@updatedb_progname@ LimitNOFILE=131072 IOSchedulingClass=idle