Skip to content

Commit

Permalink
Merge pull request #102 from tfuxu/switch-to-libappstream
Browse files Browse the repository at this point in the history
Switch to `libappstream`
  • Loading branch information
ranfdev authored Apr 9, 2024
2 parents f17a9e6 + beb31eb commit 0350a58
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 18 deletions.
26 changes: 12 additions & 14 deletions data/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -26,30 +26,28 @@ if desktop_file_validate.found()
)
endif

# Appdata
appdata_conf = configuration_data()
appdata_conf.set('app-id', application_id)
appdata_conf.set('gettext-package', gettext_package)
appdata_file = i18n.merge_file(
# Translate and install Metainfo file
metainfo_file = i18n.merge_file(
input: configure_file(
input: '@[email protected]'.format(base_id),
output: '@BASENAME@',
configuration: appdata_conf
configuration: configuration_data({
'app-id': application_id,
'gettext-package': gettext_package
})
),
output: '@[email protected]'.format(application_id),
po_dir: podir,
install: true,
install_dir: join_paths(get_option('datadir'), 'metainfo')
)

# Validate Appdata
if appstream_util.found()
test(
'validate-appdata', appstream_util,
args: [
'validate-relax', '--nonet', appdata_file.full_path()
],
depends: appdata_file,
# Validate Metainfo file
appstream_cli = find_program('appstreamcli', required: false)
if appstream_cli.found()
test('Validate metainfo file', appstream_cli,
args: ['validate', '--no-net', '--explain', metainfo_file.full_path()],
depends: metainfo_file
)
endif

Expand Down
1 change: 0 additions & 1 deletion meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ dependency('gtk4', version: '>= 4.0.0')
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)

Expand Down
5 changes: 2 additions & 3 deletions nix/geopard.nix
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
, desktop-file-utils
, gettext
, blueprint-compiler
, appstream-glib
, appstream
, rust-analyzer
}:

Expand All @@ -40,8 +40,7 @@ stdenv.mkDerivation {
cmake
blueprint-compiler
desktop-file-utils
appstream-glib
blueprint-compiler
appstream
cargo
rustPlatform.cargoSetupHook
rustc
Expand Down

0 comments on commit 0350a58

Please sign in to comment.