diff --git a/data/icons/meson.build b/data/icons/meson.build index a2752b5..8b2b310 100644 --- a/data/icons/meson.build +++ b/data/icons/meson.build @@ -3,11 +3,11 @@ application_id = 'eu.callcc.audrey' scalable_dir = 'hicolor' / 'scalable' / 'apps' install_data( scalable_dir / ('@0@.svg').format(application_id), - install_dir: get_option('datadir') / 'icons' / scalable_dir + install_dir: get_option('datadir') / 'icons' / scalable_dir, ) symbolic_dir = 'hicolor' / 'symbolic' / 'apps' install_data( symbolic_dir / ('@0@-symbolic.svg').format(application_id), - install_dir: get_option('datadir') / 'icons' / symbolic_dir + install_dir: get_option('datadir') / 'icons' / symbolic_dir, ) diff --git a/data/meson.build b/data/meson.build index ccc00ff..5c5b81e 100644 --- a/data/meson.build +++ b/data/meson.build @@ -1,10 +1,10 @@ desktop_file = i18n.merge_file( - input: 'eu.callcc.audrey.desktop.in', - output: 'eu.callcc.audrey.desktop', - type: 'desktop', - po_dir: '../po', - install: true, - install_dir: get_option('datadir') / 'applications' + input: 'eu.callcc.audrey.desktop.in', + output: 'eu.callcc.audrey.desktop', + type: 'desktop', + po_dir: '../po', + install: true, + install_dir: get_option('datadir') / 'applications', ) desktop_utils = find_program('desktop-file-validate', required: false) @@ -13,25 +13,35 @@ if desktop_utils.found() endif appstream_file = i18n.merge_file( - input: 'eu.callcc.audrey.metainfo.xml.in', - output: 'eu.callcc.audrey.metainfo.xml', - po_dir: '../po', - install: true, - install_dir: get_option('datadir') / 'metainfo' + input: 'eu.callcc.audrey.metainfo.xml.in', + output: 'eu.callcc.audrey.metainfo.xml', + po_dir: '../po', + install: true, + install_dir: get_option('datadir') / 'metainfo', ) appstreamcli = find_program('appstreamcli', required: false, disabler: true) -test('Validate appstream file', appstreamcli, - args: ['validate', '--no-net', '--explain', appstream_file]) - -install_data('eu.callcc.audrey.gschema.xml', - install_dir: get_option('datadir') / 'glib-2.0' / 'schemas' +test( + 'Validate appstream file', + appstreamcli, + args: ['validate', '--no-net', '--explain', appstream_file], ) -compile_schemas = find_program('glib-compile-schemas', required: false, disabler: true) -test('Validate schema file', - compile_schemas, - args: ['--strict', '--dry-run', meson.current_source_dir()]) +install_data( + 'eu.callcc.audrey.gschema.xml', + install_dir: get_option('datadir') / 'glib-2.0' / 'schemas', +) + +compile_schemas = find_program( + 'glib-compile-schemas', + required: false, + disabler: true, +) +test( + 'Validate schema file', + compile_schemas, + args: ['--strict', '--dry-run', meson.current_source_dir()], +) service_conf = configuration_data() @@ -40,7 +50,7 @@ configure_file( input: 'eu.callcc.audrey.service.in', output: 'eu.callcc.audrey.service', configuration: service_conf, - install_dir: get_option('datadir') / 'dbus-1' / 'services' + install_dir: get_option('datadir') / 'dbus-1' / 'services', ) subdir('icons') diff --git a/meson.build b/meson.build index b8247d6..5656131 100644 --- a/meson.build +++ b/meson.build @@ -1,7 +1,9 @@ -project('audrey', ['c', 'vala'], - version: '0.1.0', # AUDREY_VERSION - meson_version: '>= 1.0.0', - default_options: [ 'warning_level=0', 'werror=false', ], +project( + 'audrey', + ['c', 'vala'], + version: '0.1.0', # AUDREY_VERSION + meson_version: '>= 1.0.0', + default_options: ['warning_level=0', 'werror=false'], ) i18n = import('i18n') @@ -12,15 +14,18 @@ valac = meson.get_compiler('vala') srcdir = meson.project_source_root() / 'src' config_h = configuration_data() -config_h.set_quoted('PACKAGE_VERSION', meson.project_version ()) +config_h.set_quoted('PACKAGE_VERSION', meson.project_version()) config_h.set_quoted('GETTEXT_PACKAGE', 'audrey') config_h.set_quoted('LOCALEDIR', get_option('prefix') / get_option('localedir')) configure_file(output: 'config.h', configuration: config_h) -config_dep = valac.find_library ('config', dirs: srcdir) +config_dep = valac.find_library('config', dirs: srcdir) config_inc = include_directories('.') -add_project_arguments('-DGETTEXT_PACKAGE="' + meson.project_name () + '"', language: 'c') +add_project_arguments( + '-DGETTEXT_PACKAGE="' + meson.project_name() + '"', + language: 'c', +) subdir('data') @@ -28,7 +33,7 @@ subdir('src') subdir('po') gnome.post_install( - glib_compile_schemas: true, - gtk_update_icon_cache: true, + glib_compile_schemas: true, + gtk_update_icon_cache: true, update_desktop_database: true, ) diff --git a/meson.format b/meson.format new file mode 100644 index 0000000..c158b45 --- /dev/null +++ b/meson.format @@ -0,0 +1 @@ +indent_by = ' ' diff --git a/src/meson.build b/src/meson.build index 10c3448..b49c0c4 100644 --- a/src/meson.build +++ b/src/meson.build @@ -20,17 +20,10 @@ audrey_deps = [ dependency('sqlite3'), ] -blueprints = custom_target('blueprints', - input: files( - 'ui/play_queue.blp', - 'ui/setup.blp', - 'ui/window.blp', - ), - output: [ - 'play_queue.ui', - 'setup.ui', - 'window.ui', - ], +blueprints = custom_target( + 'blueprints', + input: files('ui/play_queue.blp', 'ui/setup.blp', 'ui/window.blp'), + output: ['play_queue.ui', 'setup.ui', 'window.ui'], command: [ find_program('blueprint-compiler'), 'batch-compile', @@ -40,14 +33,17 @@ blueprints = custom_target('blueprints', ], ) -audrey_sources += gnome.compile_resources('audrey-resources', +audrey_sources += gnome.compile_resources( + 'audrey-resources', 'audrey.gresource.xml', c_name: 'audrey', dependencies: blueprints, ) -executable('audrey', audrey_sources, +executable( + 'audrey', + audrey_sources, dependencies: audrey_deps, include_directories: config_inc, - install: true, + install: true, )