1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68
|
# Icons
install_subdir('icons',
install_dir: datadir,
exclude_files: ['org.gnome.LightsOff.Source.svg']
)
# Make D-Bus activatable
service_conf = configuration_data()
service_conf.set('bindir', bindir)
service = 'org.gnome.LightsOff.service'
configure_file(
input: service + '.in',
output: service,
install: true,
install_dir: join_paths(datadir, 'dbus-1', 'services'),
configuration: service_conf
)
# Desktop file
desktop = 'org.gnome.LightsOff.desktop'
desktop_file = i18n.merge_file(
input: desktop + '.in',
output: desktop,
type: 'desktop',
po_dir: podir,
install: true,
install_dir: join_paths(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()
]
)
endif
# Metainfo
metainfo = 'org.gnome.LightsOff.metainfo.xml'
metainfo_file = i18n.merge_file(
input: metainfo + '.in',
output: metainfo,
po_dir: podir,
install: true,
install_dir: join_paths(datadir, 'metainfo')
)
appstreamcli = find_program('appstreamcli', required: false)
if appstreamcli.found()
test(
'validate-metainfo', appstreamcli,
args: [
'validate', '--no-net', '--explain', metainfo_file.full_path()
]
)
endif
# Install man page
install_man('@0@.6'.format(meson.project_name()))
# Gschema
install_data('org.gnome.LightsOff.gschema.xml',
install_dir: join_paths(datadir, 'glib-2.0', 'schemas'),
)
|