From 50af09de031c8d003cd9e6afb44b774620b45696 Mon Sep 17 00:00:00 2001 From: Jason Woodward Date: Sun, 21 Feb 2021 23:46:20 -0500 Subject: install_man locale support Rather than having to manually build the locale aware man paths with `install_data('foo.fr.1', install_dir: join_paths(get_option('mandir'), 'fr', 'man1'), rename: 'foo.1')` Support doing `install_man('foo.fr.1', locale: 'fr')` --- mesonbuild/modules/rpm.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'mesonbuild/modules/rpm.py') diff --git a/mesonbuild/modules/rpm.py b/mesonbuild/modules/rpm.py index 073e338..9612837 100644 --- a/mesonbuild/modules/rpm.py +++ b/mesonbuild/modules/rpm.py @@ -65,7 +65,10 @@ class RPMModule(ExtensionModule): files_devel.add('%%{_includedir}/%s' % hdr_src) for man in coredata.man: for man_file in man.get_sources(): - files.add('%%{_mandir}/man%u/%s.*' % (int(man_file.split('.')[-1]), man_file)) + if man.locale: + files.add('%%{_mandir}/%s/man%u/%s.*' % (man.locale, int(man_file.split('.')[-1]), man_file)) + else: + files.add('%%{_mandir}/man%u/%s.*' % (int(man_file.split('.')[-1]), man_file)) if files_devel: devel_subpkg = True -- cgit v1.1