forked from tuberry/ibus-tweaker
-
Notifications
You must be signed in to change notification settings - Fork 0
/
meson.build
46 lines (39 loc) · 1.4 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
project(
'gnome-shell-extension-ibus-tweaker',
license: 'GPL3+',
version: '45.0',
)
NAME = 'IBus Tweaker'
INFO = 'Tweaker of IBus for orientation, theme, font, input mode and clipboard history'
EID = meson.project_name().replace('gnome-shell-extension-', '')
UUID = EID + '@tuberry.github.com'
EGO = 'EGO=2820' / EID
GETTEXT = meson.project_name()
SCHEMAS = 'org.gnome.shell.extensions.' + EID
VERSION = (get_option('version') != 0) ? get_option('version') : run_command('cli/get-version.sh', check: true, env: [EGO]).stdout().strip()
fs = import('fs')
i18n = import('i18n')
gnome = import('gnome')
TARGET = get_option('target')
if(TARGET == 'system')
LOCALE_DIR = get_option('localedir')
SCHEMA_DIR = get_option('datadir') / 'glib-2.0' / 'schemas'
TARGET_DIR = get_option('datadir') / 'gnome-shell' / 'extensions' / UUID
else
TARGET_ROOT = (TARGET == 'local') ? fs.expanduser('~/.local/share/gnome-shell/extensions/') : meson.project_build_root()
TARGET_DIR = TARGET_ROOT / 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(GETTEXT, VERSION),
TARGET_DIR / '*'
)
endif
subdir('po')
subdir('res')
install_subdir('src', install_dir: TARGET_DIR, strip_directory: true)