Skip to content

Commit

Permalink
build: move datadir variable
Browse files Browse the repository at this point in the history
  • Loading branch information
saidsay-so committed Jul 2, 2023
1 parent 19f5b8d commit a74ee5a
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 4 deletions.
2 changes: 2 additions & 0 deletions howdy/src/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,9 @@ endif
py = import('python').find_installation()
py.dependency()

datadir = get_option('prefix') / get_option('datadir') / 'howdy'
py_conf = configuration_data(paths_dict)
py_conf.set('data_dir', datadir)

py_paths = configure_file(
input: 'paths.py.in',
Expand Down
4 changes: 1 addition & 3 deletions meson.build
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
project('howdy', 'cpp', license: 'MIT', version: 'beta', meson_version: '>= 0.64.0')

confdir = get_option('config_dir') != '' ? get_option('config_dir') : join_paths(get_option('sysconfdir'), 'howdy')
confdir = get_option('config_dir') != '' ? get_option('config_dir') : join_paths(get_option('prefix'), get_option('sysconfdir'), 'howdy')
dlibdatadir = get_option('dlib_data_dir') != '' ? get_option('dlib_data_dir') : join_paths(confdir, 'dlib-data')
usermodelsdir = get_option('user_models_dir') != '' ? get_option('user_models_dir') : join_paths(confdir, 'models')
datadir = get_option('data_dir') != '' ? get_option('data_dir') : join_paths(get_option('prefix'), get_option('datadir'), 'howdy')
logpath = get_option('log_path')

config_path = join_paths(confdir, 'config.ini')
Expand All @@ -12,7 +11,6 @@ paths_dict = {
'config_dir': confdir,
'dlib_data_dir': dlibdatadir,
'user_models_dir': usermodelsdir,
'data_dir': datadir,
'log_path': logpath,
}

Expand Down
1 change: 0 additions & 1 deletion meson.options
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ option('pam_dir', type: 'string', value: '', description: 'Set the pam_howdy des
option('config_dir', type: 'string', value: '', description: 'Set the howdy config directory')
option('dlib_data_dir', type: 'string', value: '', description: 'Set the dlib data directory')
option('user_models_dir', type: 'string', value: '', description: 'Set the user models directory')
option('data_dir', type: 'string', value: '', description: 'Set the howdy data directory')
option('log_path', type: 'string', value: '/var/log/howdy', description: 'Set the log file path')
option('install_in_site_packages', type: 'boolean', value: false, description: 'Install howdy python files in site packages')
option('py_sources_dir', type: 'string', value: '', description: 'Set the python sources directory')

0 comments on commit a74ee5a

Please sign in to comment.