Authenticator/meson.build

88 lines
2.3 KiB
Meson
Raw Normal View History

2018-03-16 04:12:49 +01:00
project('com.github.bilelmoussaoui.Authenticator',
2018-09-23 10:36:52 +00:00
version: '0.2.5',
meson_version: '>= 0.42',
2017-09-16 14:15:40 +02:00
license: 'GPL+-3.0',
2018-09-23 10:36:52 +00:00
default_options: ['prefix=/usr','is_devel=false']
2017-09-16 14:15:40 +02:00
)
python = import('python3')
gnome = import('gnome')
i18n = import('i18n')
2017-09-16 14:15:40 +02:00
message('Looking for dependencies')
dependency('glib-2.0')
dependency('gobject-2.0')
dependency('gobject-introspection-1.0')
dependency('gtk+-3.0', version : '>=3.16')
python_bin = python.find_python()
if not python_bin.found()
error('No valid python3 binary found')
else
message('Found python3 binary')
endif
2017-09-16 14:15:40 +02:00
LIB_DIR = join_paths(get_option('prefix'), get_option('libdir'), meson.project_name())
2018-09-23 10:36:52 +00:00
LOCALE_DIR = join_paths(get_option('prefix'), get_option('localedir'))
DATA_DIR = join_paths(get_option('prefix'), get_option('datadir'), meson.project_name())
subproject('libgd',
default_options: [
'with-introspection=true',
'with-notification=true',
'static=false',
'pkgdatadir=' + DATA_DIR,
'pkglibdir=' + LIB_DIR
]
)
# Configuration params
conf = configuration_data()
2017-09-16 21:58:59 +02:00
conf.set('DATA_DIR', DATA_DIR)
2017-09-16 14:15:40 +02:00
conf.set('LOCALE_DIR', LOCALE_DIR)
2018-09-23 10:36:52 +00:00
conf.set('PYTHON_DIR', join_paths(get_option('prefix'), python.sysconfig_path('purelib')))
conf.set('PYTHON_EXEC_DIR', join_paths(get_option('prefix'), python.sysconfig_path('stdlib')))
conf.set('VERSION', meson.project_version())
2018-09-23 10:36:52 +00:00
conf.set('ENABLE_QRSCANNER', get_option('enable_zbar'))
conf.set('LIB_DIR', LIB_DIR)
2018-09-23 10:36:52 +00:00
conf.set('IS_DEVEL', get_option('is_devel'))
conf.set('libexecdir', join_paths(get_option('prefix'), get_option('libexecdir')))
conf.set('PYTHON', python_bin.path())
subdir('data')
subdir('po')
2018-09-23 10:36:52 +00:00
2017-09-16 14:15:40 +02:00
configure_file(
2018-03-16 04:12:49 +01:00
input: 'authenticator.py.in',
output: 'authenticator',
2017-09-16 14:15:40 +02:00
configuration: conf,
2018-09-23 10:36:52 +00:00
install_dir: get_option('bindir')
)
configure_file(
input: 'authenticator-search-provider.py.in',
output: 'authenticator-search-provider',
configuration: conf,
install_dir: get_option('libexecdir')
2017-09-16 14:15:40 +02:00
)
2018-09-23 10:36:52 +00:00
configure_file(
input: 'Authenticator/widgets/about.py.in',
output: 'about.py',
configuration: conf,
2018-09-23 10:36:52 +00:00
install_dir : join_paths(python.sysconfig_path('purelib'),
'Authenticator/widgets')
)
install_subdir(
'Authenticator',
2018-09-23 10:36:52 +00:00
install_dir: python.sysconfig_path('purelib'),
exclude_files: 'widgets/about.py.in'
)
2018-09-23 10:36:52 +00:00
meson.add_install_script('meson_post_install.py')