2019-12-17 16:41:03 +01:00
|
|
|
application_id = 'org.freedesktop.MalcontentControl'
|
|
|
|
|
2019-12-19 14:41:17 +01:00
|
|
|
if not cc.has_function('atexit')
|
|
|
|
error('atexit() needed for generated GResource files')
|
|
|
|
endif
|
|
|
|
|
|
|
|
resources = gnome.compile_resources(
|
|
|
|
'resources',
|
|
|
|
'malcontent-control.gresource.xml',
|
2020-07-06 11:59:45 +02:00
|
|
|
source_dir: meson.current_source_dir(),
|
2019-12-19 14:41:17 +01:00
|
|
|
)
|
|
|
|
|
2019-12-17 16:41:03 +01:00
|
|
|
malcontent_control = executable('malcontent-control',
|
|
|
|
[
|
|
|
|
'application.c',
|
|
|
|
'application.h',
|
2020-01-08 16:16:28 +01:00
|
|
|
'carousel.c',
|
|
|
|
'carousel.h',
|
2019-12-17 16:41:03 +01:00
|
|
|
'main.c',
|
2020-01-08 16:16:28 +01:00
|
|
|
'user-image.c',
|
|
|
|
'user-image.h',
|
2020-01-10 17:59:47 +01:00
|
|
|
'user-selector.c',
|
|
|
|
'user-selector.h',
|
2019-12-19 14:41:17 +01:00
|
|
|
] + resources,
|
2019-12-17 16:41:03 +01:00
|
|
|
dependencies: [
|
2020-01-08 16:16:28 +01:00
|
|
|
dependency('accountsservice'),
|
2019-12-17 16:41:03 +01:00
|
|
|
dependency('gio-2.0', version: '>= 2.44'),
|
|
|
|
dependency('glib-2.0', version: '>= 2.54.2'),
|
|
|
|
dependency('gobject-2.0', version: '>= 2.54'),
|
|
|
|
dependency('gtk+-3.0'),
|
2020-01-28 15:30:26 +01:00
|
|
|
dependency('polkit-gobject-1'),
|
2019-12-17 16:41:03 +01:00
|
|
|
libmalcontent_dep,
|
2020-01-30 12:43:46 +01:00
|
|
|
libmalcontent_ui_dep,
|
2019-12-17 16:41:03 +01:00
|
|
|
],
|
|
|
|
include_directories: root_inc,
|
|
|
|
install: true,
|
|
|
|
)
|
|
|
|
|
2019-12-19 14:38:51 +01:00
|
|
|
desktop_file = i18n.merge_file('desktop-file',
|
|
|
|
type: 'desktop',
|
|
|
|
input: '@0@.desktop.in'.format(application_id),
|
|
|
|
output: '@0@.desktop'.format(application_id),
|
2020-07-06 11:59:45 +02:00
|
|
|
po_dir: join_paths(meson.current_source_dir(), '..', 'po'),
|
2019-12-19 14:38:51 +01:00
|
|
|
install: true,
|
|
|
|
install_dir: join_paths(get_option('datadir'), 'applications'),
|
|
|
|
)
|
|
|
|
|
|
|
|
desktop_file_validate = find_program('desktop-file-validate', required: false)
|
|
|
|
if desktop_file_validate.found()
|
|
|
|
test(
|
|
|
|
'validate-desktop',
|
|
|
|
desktop_file_validate,
|
|
|
|
args: [
|
|
|
|
desktop_file.full_path(),
|
|
|
|
],
|
|
|
|
suite: ['malcontent-control'],
|
|
|
|
)
|
|
|
|
endif
|
|
|
|
|
2019-12-19 14:39:35 +01:00
|
|
|
appdata_file = i18n.merge_file('appdata-file',
|
|
|
|
input: '@0@.appdata.xml.in'.format(application_id),
|
|
|
|
output: '@0@.appdata.xml'.format(application_id),
|
2020-07-06 11:59:45 +02:00
|
|
|
po_dir: join_paths(meson.current_source_dir(), '..', 'po'),
|
2019-12-19 14:39:35 +01:00
|
|
|
install: true,
|
|
|
|
install_dir: join_paths(get_option('datadir'), 'metainfo'),
|
|
|
|
)
|
|
|
|
|
|
|
|
appstream_util = find_program('appstream-util', required: false)
|
|
|
|
if appstream_util.found()
|
|
|
|
test(
|
|
|
|
'validate-appdata', appstream_util,
|
|
|
|
args: [
|
|
|
|
'validate-relax', '--nonet', appdata_file.full_path(),
|
|
|
|
],
|
|
|
|
suite: ['malcontent-control'],
|
|
|
|
)
|
|
|
|
endif
|
|
|
|
|
2019-12-19 14:41:17 +01:00
|
|
|
xmllint = find_program('xmllint', required: false)
|
|
|
|
if xmllint.found()
|
|
|
|
gtk_prefix = dependency('gtk+-3.0').get_pkgconfig_variable('prefix')
|
|
|
|
test(
|
|
|
|
'validate-ui', xmllint,
|
|
|
|
args: [
|
|
|
|
'--nonet', '--noblanks', '--noout',
|
|
|
|
'--relaxng', join_paths(gtk_prefix, 'share', 'gtk-3.0', 'gtkbuilder.rng'),
|
2020-01-08 16:16:28 +01:00
|
|
|
files(
|
|
|
|
'carousel.ui',
|
|
|
|
'main.ui',
|
2020-01-10 17:59:47 +01:00
|
|
|
'user-selector.ui',
|
2020-01-08 16:16:28 +01:00
|
|
|
),
|
2019-12-19 14:41:17 +01:00
|
|
|
],
|
|
|
|
suite: ['malcontent-control'],
|
|
|
|
)
|
|
|
|
endif
|
|
|
|
|
2020-01-28 15:30:26 +01:00
|
|
|
policy_file = i18n.merge_file('policy-file',
|
|
|
|
input: '@0@.policy.in'.format(application_id),
|
|
|
|
output: '@0@.policy'.format(application_id),
|
2020-07-06 11:59:45 +02:00
|
|
|
po_dir: join_paths(meson.current_source_dir(), '..', 'po'),
|
2020-01-28 15:30:26 +01:00
|
|
|
install: true,
|
|
|
|
install_dir: join_paths(get_option('datadir'), 'polkit-1', 'actions'),
|
|
|
|
)
|
|
|
|
if xmllint.found()
|
|
|
|
test(
|
|
|
|
'validate-policy', xmllint,
|
|
|
|
args: [
|
|
|
|
'--nonet', '--noblanks', '--noout',
|
|
|
|
policy_file,
|
|
|
|
],
|
|
|
|
suite: ['malcontent-control'],
|
|
|
|
)
|
|
|
|
endif
|
|
|
|
|
2020-02-19 14:46:03 +01:00
|
|
|
# FIXME: Add tests
|
|
|
|
subdir('icons')
|
2019-12-17 16:41:03 +01:00
|
|
|
#subdir('tests')
|