aboutsummaryrefslogtreecommitdiff
path: root/mesonbuild/modules
diff options
context:
space:
mode:
authorJason Woodward <woodwardj@jaos.org>2021-02-21 23:46:20 -0500
committerJussi Pakkanen <jpakkane@gmail.com>2021-02-27 14:35:23 +0200
commit50af09de031c8d003cd9e6afb44b774620b45696 (patch)
tree52e16c84d9f9b851a05307e4fa4f053e44bab00c /mesonbuild/modules
parent0047f7439c6bafe964438e2c59a3686201ff24c0 (diff)
downloadmeson-50af09de031c8d003cd9e6afb44b774620b45696.zip
meson-50af09de031c8d003cd9e6afb44b774620b45696.tar.gz
meson-50af09de031c8d003cd9e6afb44b774620b45696.tar.bz2
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')`
Diffstat (limited to 'mesonbuild/modules')
-rw-r--r--mesonbuild/modules/rpm.py5
1 files changed, 4 insertions, 1 deletions
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