forked from TenderOwl/Norka
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmeson.build
executable file
·68 lines (57 loc) · 1.8 KB
/
meson.build
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
project('com.github.tenderowl.norka',
version: '0.7.2',
meson_version: '>= 0.49.0'
)
revision = run_command('bin/revision.sh').stdout().strip()
if revision == ''
revision=meson.project_version()
endif
i18n = import('i18n')
python = import('python3')
message('Looking for dependencies')
python3 = python.find_python()
if not python3.found()
error('No valid python3 binary found')
else
message('Found python3 binary')
endif
# Dependencies
dependency('gtk+-3.0', version: '>= 3.22')
dependency('glib-2.0')
dependency('granite', version: '>= 4.0')
dependency('gtksourceview-4')
dependency('gspell-1')
dependency('webkit2gtk-4.0')
find_program('glib-compile-schemas', required: true)
find_program('gtk-update-icon-cache', required: false)
find_program('update-desktop-database', required: false)
gettext_package = meson.project_name()
localedir = join_paths(get_option('prefix'), get_option('localedir'))
pythondir = join_paths(get_option('prefix'), python.sysconfig_path('purelib'))
datadir = get_option('datadir')
pkgdatadir = join_paths(get_option('prefix'), datadir, meson.project_name())
podir = meson.source_root() / 'po'
conf = configuration_data()
conf.set('PACKAGE_URL', 'https://tenderowl.com/norka/')
conf.set('DATA_DIR', get_option('datadir'))
conf.set('LOCALE_DIR', localedir)
conf.set('PYTHON_DIR', pythondir)
conf.set('PROJECT_NAME', meson.project_name())
conf.set('VERSION', meson.project_version())
conf.set('REVISION', revision)
conf.set('PYTHON', python3.path())
conf.set('PKGDATA_DIR', pkgdatadir)
subdir('data')
subdir('po')
install_subdir(
'norka',
install_dir: pythondir
)
message('Preparing init file')
configure_file(
input: 'norka/norka.in',
output: meson.project_name(),
configuration: conf,
install_dir: get_option('bindir')
)
meson.add_install_script('build-aux/meson/postinstall.py')