| 1 |
desktop_file = i18n.merge_file( |
| 2 |
input: 'io.github.diegoivan.pdf_metadata_editor.desktop.in', |
| 3 |
output: 'io.github.diegoivan.pdf_metadata_editor.desktop', |
| 4 |
type: 'desktop', |
| 5 |
po_dir: '../po', |
| 6 |
install: true, |
| 7 |
install_dir: join_paths(get_option('datadir'), 'applications') |
| 8 |
) |
| 9 |
|
| 10 |
desktop_utils = find_program('desktop-file-validate', required: false) |
| 11 |
if desktop_utils.found() |
| 12 |
test('Validate desktop file', desktop_utils, args: [desktop_file]) |
| 13 |
endif |
| 14 |
|
| 15 |
appstream_file = i18n.merge_file( |
| 16 |
input: 'io.github.diegoivan.pdf_metadata_editor.metainfo.xml.in', |
| 17 |
output: 'io.github.diegoivan.pdf_metadata_editor.metainfo.xml', |
| 18 |
po_dir: '../po', |
| 19 |
install: true, |
| 20 |
install_dir: join_paths(get_option('datadir'), 'metainfo') |
| 21 |
) |
| 22 |
|
| 23 |
appstreamcli = find_program('appstreamcli', required: false) |
| 24 |
if appstreamcli.found() |
| 25 |
test('Validate appstream file', |
| 26 |
appstreamcli, |
| 27 |
args: ['validate', '--no-net', '--explain', appstream_file], |
| 28 |
workdir: meson.current_build_dir() |
| 29 |
) |
| 30 |
endif |
| 31 |
|
| 32 |
install_data('io.github.diegoivan.pdf_metadata_editor.gschema.xml', |
| 33 |
install_dir: join_paths(get_option('datadir'), 'glib-2.0/schemas') |
| 34 |
) |
| 35 |
|
| 36 |
compile_schemas = find_program('glib-compile-schemas', required: false) |
| 37 |
if compile_schemas.found() |
| 38 |
test('Validate schema file', |
| 39 |
compile_schemas, |
| 40 |
args: ['--strict', '--dry-run', meson.current_source_dir()]) |
| 41 |
endif |
| 42 |
|
| 43 |
service_conf = configuration_data() |
| 44 |
service_conf.set('bindir', join_paths(get_option('prefix'), get_option('bindir'))) |
| 45 |
configure_file( |
| 46 |
input: 'io.github.diegoivan.pdf_metadata_editor.service.in', |
| 47 |
output: 'io.github.diegoivan.pdf_metadata_editor.service', |
| 48 |
configuration: service_conf, |
| 49 |
install_dir: join_paths(get_option('datadir'), 'dbus-1/services') |
| 50 |
) |
| 51 |
|
| 52 |
subdir('icons') |