xref: /aosp_15_r20/external/coreboot/util/coreboot-configurator/src/resources/meson.build (revision b9411a12aaaa7e1e6a6fb7c5e057f44ee179a49c)
1## SPDX-License-Identifier: GPL-2.0-only
2
3# Polkit Files
4polkit_dir = join_paths(get_option('datadir'), 'polkit-1', 'actions')
5polkit_sources = [
6	'org.coreboot.nvramtool.policy',
7	'org.coreboot.reboot.policy',
8]
9
10install_data(polkit_sources,
11	     install_dir: polkit_dir)
12
13# Desktop Entry
14desktop_dir = join_paths(get_option('datadir'), 'applications')
15desktop_sources = [
16	'coreboot-configurator.desktop',
17]
18
19install_data(desktop_sources,
20	     install_dir: desktop_dir)
21
22# Icon
23inkscape = find_program('inkscape')
24icon_dir = join_paths(get_option('datadir'),'icons', 'hicolor')
25foreach size: get_option('sizes')
26	target_temp_name = '@0@'.format(size)
27	dpi=size.to_int() * 2
28	png = configure_file(
29		input: 'coreboot_configurator.svg',
30		output: target_temp_name + '.png',
31		command: [
32			inkscape,
33			'--export-height=@0@'.format(size),
34			'--export-width=@0@'.format(size),
35			'--export-png=@OUTPUT@',
36			'@INPUT@',
37		]
38	)
39
40	install_data(png,
41		     rename: meson.project_name() + '.png',
42		     install_dir: join_paths(icon_dir, '@0@x@1@'.format(size, size), 'apps'))
43endforeach
44