# SPDX-FileCopyrightText: 2022 Emmanuele Bassi # SPDX-License-Identifier: GPL-3.0-or-later project('paket', 'rust', version: '2024.10', license: ['GPL-3.0'], meson_version: '>= 0.59.0', default_options: [ 'warning_level=2', ], ) dependency('gtk4', version: '>= 4.16') dependency('libadwaita-1', version: '>= 1.6') dependency('gstreamer-1.0', version: '>= 1.20') dependency('gstreamer-video-1.0', version: '>= 1.20') dependency('webkitgtk-6.0') # Needed for camerabin dependency('gstreamer-plugins-bad-1.0', version: '>= 1.20') i18n = import('i18n') gnome = import('gnome') fs = import('fs') cargo = find_program('cargo', required: true) if get_option('profile') == 'development' profile = '.Devel' if fs.is_dir('.git') vcs_tag = run_command('git', 'rev-parse', '--short', 'HEAD', check: true).stdout().strip() if vcs_tag == '' version_suffix = '-devel' else version_suffix = '-@0@'.format(vcs_tag) endif else version_suffix = '-devel' endif else profile = '' version_suffix = '' endif application_id = 'de.j4ne.Paket@0@'.format(profile) pkgdatadir = get_option('prefix') / get_option('datadir') / meson.project_name() gnome.compile_resources('paket', 'paket.gresource.xml', gresource_bundle: true, install: true, install_dir: pkgdatadir, ) subdir('src') subdir('po') meson.add_dist_script( 'build-aux/dist-vendor.sh', meson.project_source_root(), meson.project_build_root() / 'meson-dist' / '@0@-@1@'.format(meson.project_name(), meson.project_version()), ) gnome.post_install( glib_compile_schemas: true, gtk_update_icon_cache: true, update_desktop_database: true, ) summary({ 'prefix': get_option('prefix'), 'libdir': get_option('libdir'), 'datadir': get_option('datadir'), 'bindir': get_option('bindir'), }, section: 'Directories', ) summary({ 'Profile': get_option('profile'), }, section: 'Build options', )