forked from GabMus/razerCommander
-
Notifications
You must be signed in to change notification settings - Fork 0
/
meson.build
37 lines (32 loc) · 1.18 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
project('razercommander',
version: '1.2.0',
meson_version: '>= 0.40.0'
)
# i18n = import('i18n')
python3 = import('python3')
prefix = get_option('prefix')
pkgdatadir = join_paths(prefix, get_option('datadir'), meson.project_name())
pythondir = python3.sysconfig_path('purelib')
install_subdir('razercommander', install_dir: pythondir)
subdir('data')
subdir('bin')
meson.add_install_script('scripts/meson_post_install.py')
if get_option('with-flatpak')
# We keep a generic manifest in the repo you can use but
# we want builds to use the local files so simply rewrite it
make_local_manifest = find_program('scripts/make_local_manifest.py')
local_manifest = custom_target('manifest',
input: 'dist/flatpak/org.gabmus.razercommander.json',
output: 'org.gabmus.razercommander.json',
command: [make_local_manifest, '@INPUT@', '@OUTPUT@']
)
# Build a bundle for both testing and releases
build_flatpak = find_program('scripts/build_flatpak.py')
custom_target('flatpak',
input: local_manifest,
output: 'org.gabmus.razercommander.flatpak',
command: [build_flatpak, '@INPUT@', '@OUTPUT@'],
build_always: true
# TODO: This shouldn't build unless explicit
)
endif