-install_data('update-plocate.sh',
- install_dir: '/etc/cron.daily',
- rename: 'plocate')
+conf_data = configuration_data()
+conf_data.set('PROCESSED_BY_MESON', '1')
+conf_data.set('sbindir', join_paths(get_option('prefix'), get_option('sbindir')))
+conf_data.set('locategroup', get_option('locategroup'))
+conf_data.set('dbfile', dbfile)
+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',
+ rename: 'plocate')
+endif