nix-software-center/meson.build

71 lines
1.9 KiB
Meson
Raw Normal View History

2022-08-27 00:48:43 +03:00
project(
'nix-software-center',
'rust',
2023-04-03 02:18:44 +03:00
version: '0.1.2',
2022-08-27 00:48:43 +03:00
meson_version: '>= 0.59',
2023-01-17 21:32:45 +03:00
license: 'GPL-3.0',
2022-08-27 00:48:43 +03:00
)
i18n = import('i18n')
gnome = import('gnome')
base_id = 'dev.vlinkz.NixSoftwareCenter'
dependency('openssl', version: '>= 1.0')
dependency('glib-2.0', version: '>= 2.66')
dependency('gio-2.0', version: '>= 2.66')
2022-09-25 09:43:48 +03:00
dependency('gtk4', version: '>= 4.6.0')
dependency('libadwaita-1', version: '>=1.2.0')
2022-08-27 00:48:43 +03:00
dependency('polkit-gobject-1', version: '>= 0.103')
glib_compile_resources = find_program('glib-compile-resources', required: true)
glib_compile_schemas = find_program('glib-compile-schemas', required: true)
desktop_file_validate = find_program('desktop-file-validate', required: false)
appstream_util = find_program('appstream-util', required: false)
cargo = find_program('cargo', required: true)
version = meson.project_version()
prefix = get_option('prefix')
bindir = prefix / get_option('bindir')
libexecdir = prefix / get_option('libexecdir')
localedir = prefix / get_option('localedir')
datadir = prefix / get_option('datadir')
pkgdatadir = datadir / meson.project_name()
iconsdir = datadir / 'icons'
podir = meson.project_source_root() / 'po'
gettext_package = meson.project_name()
if get_option('profile') == 'development'
profile = 'Devel'
vcs_tag = run_command('git', 'rev-parse', '--short', 'HEAD').stdout().strip()
if vcs_tag == ''
version_suffix = '-devel'
else
version_suffix = '-@0@'.format(vcs_tag)
endif
application_id = '@0@.@1@'.format(base_id, profile)
else
profile = ''
version_suffix = ''
application_id = base_id
endif
meson.add_dist_script(
'build-aux/dist-vendor.sh',
meson.project_build_root() / 'meson-dist' / meson.project_name() + '-' + version,
meson.project_source_root()
)
subdir('data')
subdir('po')
subdir('src')
subdir('nsc-helper/src')
gnome.post_install(
gtk_update_icon_cache: true,
glib_compile_schemas: true,
update_desktop_database: true,
)