meson.build 1.77 KB
Newer Older
1
project('passwordsafe', 'c',
2
  version: '0.9.3',
3 4 5 6
  meson_version: '>= 0.40.0',
)
i18n = import('i18n')
python = import('python3')
7
project_id = 'org.gnome.PasswordSafe'
8
contributors = '\n'.join(['Falk Alexander Seidl', 'Uta Lemke'])
9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29

message('Looking for dependencies')
python_bin = python.find_python()
if not python_bin.found()
    error('No valid python3 binary found')
else
    message('Found python3 binary')
endif
dependency('glib-2.0')
dependency('gobject-introspection-1.0', version: '>=1.35.9')
dependency('gtk+-3.0', version :'>=3.20')

env = environment()

python_dir = join_paths(get_option('prefix'), python.sysconfig_path('purelib'))
LIBEXEC_DIR = join_paths(get_option('prefix'), get_option('libexecdir'))
EXTENSION_DIR = join_paths(get_option('prefix'), get_option('libdir'), meson.project_name())
DATA_DIR = join_paths(get_option('prefix'), get_option('datadir'), meson.project_name())
bindir = join_paths(get_option('prefix'), get_option('bindir'))

conf = configuration_data()
30
conf.set('PACKAGE_URL', 'https://gitlab.gnome.org/World/PasswordSafe')
31 32 33 34 35 36 37 38
conf.set('DATA_DIR', DATA_DIR)
conf.set('EXTENSION_DIR', EXTENSION_DIR)
conf.set('LOCALE_DIR', join_paths(get_option('prefix'), get_option('datadir'), 'locale'))
conf.set('PYTHON_DIR', python_dir)
conf.set('PYTHON_EXEC_DIR', join_paths(get_option('prefix'), python.sysconfig_path('stdlib')))
conf.set('PYTHON', python_bin.path())
conf.set('libexecdir', LIBEXEC_DIR)
conf.set('VERSION', meson.project_version())
39
conf.set('CONTRIBUTORS', contributors)
40 41

subdir('data')
42
subdir('po')
43 44

install_subdir(
45
  'passwordsafe',
46 47 48 49 50
  install_dir: python_dir
)

message('Preparing init file')
configure_file(
51 52
  input: 'passwordsafe.in',
  output: 'passwordsafe',
53 54 55 56 57
  configuration: conf,
  install_dir: bindir
)

meson.add_install_script('meson_post_install.py')