File: meson.build

package info (click to toggle)
parlatype-libreoffice-extension 2.1-2
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, bullseye, sid
  • size: 392 kB
  • sloc: python: 855; xml: 76; sh: 63; makefile: 4
file content (55 lines) | stat: -rw-r--r-- 1,346 bytes parent folder | download
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
extension_dir = join_paths(base_lo_dir, 'share', 'extensions', 'parlatype')
script_dir = join_paths(base_lo_dir, 'share', 'Scripts', 'python')

# description.xml is generated in 3 steps:
# 1) Configure the version
# 2) Merge translations for <display-name>
# 3) Generate <extension-description> links and text files
#    in description/ for en and all translated languages
#    using description_translation.xml and a flaky script

desc = configuration_data()
desc.set('VERSION', meson.project_version())
description_in_in = configure_file(
	input: 'description.xml.in.in.in',
	output: 'description.xml.in.in',
	configuration: desc
)

description_in = i18n.merge_file(
	input: description_in_in,
	output: 'description.xml.in',
	type: 'xml',
	po_dir: '../po',
	data_dirs: [ '../po' ],
	install: false,
)

i18n_script = find_program('i18n_description.sh', required: true)

description = custom_target(
	'description',
	input: description_in,
	output: 'description.xml',
	command: [ i18n_script, meson.source_root(), meson.build_root() ],
	install: bundled,
	install_dir: extension_dir,
)

subdir('META-INF')
subdir('options')
subdir('toolbar')

if bundled
	subdir('python')

	install_subdir(
		join_paths(meson.current_build_dir(), 'description'),
		install_dir: extension_dir,
	)

	install_subdir(
		'images',
		install_dir: extension_dir
	)
endif