-
Notifications
You must be signed in to change notification settings - Fork 71
/
meson.build
71 lines (62 loc) · 2.03 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
69
70
71
project(
'errands',
version: '46.2.7',
meson_version: '>= 0.62.0',
)
# Declare dependencies
dependency('libadwaita-1', version: '>= 1.5')
dependency('libsecret-1')
dependency('libportal')
dependency('gtksourceview-5')
dependency('pygobject-3.0')
dependency('goa-1.0', required: false)
# Import modules
i18n = import('i18n')
gnome = import('gnome')
python = import('python')
# Define dirs
pkgdatadir = join_paths(get_option('prefix'), get_option('datadir'), meson.project_name())
moduledir = join_paths(pkgdatadir, 'errands')
# Set profile
profile = get_option('profile')
if profile == 'development'
app_id = 'io.github.mrvladus.List.Devel'
prefix = '/io/github/mrvladus/List/Devel'
elif profile == 'release'
app_id = 'io.github.mrvladus.List'
prefix = '/io/github/mrvladus/List'
endif
# Set config
conf = configuration_data()
conf.set('PYTHON', python.find_installation('python3').full_path())
conf.set('PYTHON_VERSION', python.find_installation('python3').language_version())
conf.set('APP_ID', app_id)
conf.set('PREFIX', prefix)
conf.set('VERSION', meson.project_version())
conf.set('PROFILE', profile)
conf.set('localedir', join_paths(get_option('prefix'), get_option('localedir')))
conf.set('pkgdatadir', pkgdatadir)
conf.set('bindir', get_option('prefix') / get_option('bindir'))
# Install data
subdir('data')
# Install source files
configure_file(
input: join_paths('errands', 'errands.py'),
output: 'errands',
configuration: conf,
install: true,
install_dir: get_option('bindir'),
)
install_data(join_paths('errands', 'application.py'), install_dir: moduledir)
install_data(join_paths('errands', 'state.py'), install_dir: moduledir)
install_subdir(join_paths('errands', 'utils'), install_dir: moduledir)
install_subdir(join_paths('errands', 'lib'), install_dir: moduledir)
install_subdir(join_paths('errands', 'widgets'), install_dir: moduledir)
# Install translations
subdir('po')
# Update cache, icons and compile gsettings
gnome.post_install(
glib_compile_schemas: true,
gtk_update_icon_cache: true,
update_desktop_database: true,
)