]> git.sesse.net Git - plocate/commitdiff
Make entire path for plocate database configurable
authorEirik Nygaard <eirik@ngrd.no>
Sun, 23 Jan 2022 11:05:01 +0000 (12:05 +0100)
committerSteinar H. Gunderson <steinar+git@gunderson.no>
Sun, 23 Jan 2022 11:30:10 +0000 (12:30 +0100)
meson.build
meson_options.txt

index 435cd0a296518033fe67539a6732031a759c9776..8dc23935acac7e0a580b991378f05563b2e589c2 100644 (file)
@@ -2,8 +2,7 @@ project('plocate', 'cpp', default_options: ['buildtype=debugoptimized','cpp_std=
 
 add_project_arguments('-DGROUPNAME="' + get_option('locategroup') + '"', language: 'cpp')
 add_project_arguments('-DUPDATEDB_CONF="/etc/updatedb.conf"', language: 'cpp')
-dbdir = join_paths(get_option('sharedstatedir'), 'plocate')
-dbfile = join_paths(dbdir, 'plocate.db')
+dbfile = join_paths(get_option('sharedstatedir'), get_option('dbpath'))
 add_project_arguments('-DDBFILE="' + dbfile + '"', language: 'cpp')
 add_project_arguments('-DPACKAGE_NAME="plocate"', language: 'cpp')
 add_project_arguments('-DPACKAGE_VERSION="' + meson.project_version() + '"', language: 'cpp')
index 8ac13c5106b9abda5ee97b3b4e6499279e0580e9..a9f3358898d3bfa8817ac3c80c9b6e9037d38e6b 100644 (file)
@@ -3,3 +3,4 @@ option('install_systemd', type: 'boolean', value: true, description: 'Install sy
 option('systemunitdir', type: 'string', description: 'Where to install systemd units to (default: autodetect)')
 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')
+option('dbpath', type: 'string', value: 'plocate/plocate.db', description: 'Path to plocate database relative to "sharedstatedir"')