-
Notifications
You must be signed in to change notification settings - Fork 6
/
meson.build
50 lines (45 loc) · 1.72 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
project(
'gnome-shell-extension-ibus-tweaker',
license: 'GPL-3.0-or-later',
version: '47.beta',
)
_name = meson.project_name().replace('gnome-shell-extension-', '')
_version = get_option('version')
metadata = {
'name': 'IBus Tweaker',
'uuid': _name + '@tuberry.github.com',
'gettext': meson.project_name(),
'shell': meson.project_version().split('.')[0],
'url': 'https://github.com/tuberry' / _name,
'schemas': 'org.gnome.shell.extensions.' + _name,
'version': (_version != 0) ? _version : run_command('cli/get-version.sh', check: true, env: ['EGO=2820' / _name]).stdout().strip(),
'description': 'Tweaker of IBus for theme, font, input mode and clipboard history'
+ '\\n\\nFor support, please report issues via the Homepage link below rather than the comments section below it'
}
fs = import('fs')
i18n = import('i18n')
gnome = import('gnome')
target = get_option('target')
datadir = get_option('datadir')
if(target == 'system')
locale_dir = get_option('localedir')
schema_dir = datadir / 'glib-2.0' / 'schemas'
target_dir = datadir / 'gnome-shell' / 'extensions' / metadata['uuid']
else
target_root = (target == 'local') ? fs.expanduser('~/.local/share/gnome-shell/extensions/') : meson.project_build_root()
target_dir = target_root / metadata['uuid']
locale_dir = target_dir / 'locale'
schema_dir = target_dir / 'schemas'
endif
if(target == 'zip')
zip_dir = get_option('desktop') ? fs.expanduser('~/Desktop') : target_root
meson.add_install_script(
find_program('7z'),
'a',
zip_dir / '@0@_v@[email protected]'.format(metadata['gettext'], metadata['version']),
target_dir / '*'
)
endif
subdir('po')
subdir('res')
install_subdir('src', install_dir: target_dir, strip_directory: true)