]> git.sesse.net Git - plocate/commitdiff
Create /var/lib/plocate on install.
authorSteinar H. Gunderson <steinar+git@gunderson.no>
Sat, 28 Nov 2020 20:46:00 +0000 (21:46 +0100)
committerSteinar H. Gunderson <steinar+git@gunderson.no>
Sat, 28 Nov 2020 20:46:02 +0000 (21:46 +0100)
meson.build

index f91668493c09fe4c43afdd7012167d1db82be93f..31f51d8856b86e95865b58d1b5955d25b2f30d11 100644 (file)
@@ -2,7 +2,8 @@ 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')
-dbfile = join_paths(get_option('sharedstatedir'), 'plocate', 'plocate.db')
+dbdir = join_paths(get_option('sharedstatedir'), 'plocate')
+dbfile = join_paths(dbdir, 'plocate.db')
 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')
@@ -52,6 +53,8 @@ update_script = configure_file(input: 'update-plocate.sh',
                output: 'update-plocate.sh',
                configuration: conf_data)
 
+meson.add_install_script('mkdir', '-p', dbdir)
+
 if get_option('install_cron')
        install_data(update_script,
                install_dir: '/etc/cron.daily',