aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorWolfgang Müller2021-07-15 15:51:32 +0200
committerWolfgang Müller2021-07-15 16:04:28 +0200
commitf9b97a698936a5c0d745f92a5b0e2bba1a1dbdbd (patch)
treea49662a1e741c945a64b15579bc393b4e31b0046
parentaf62385aa1206f03beb18fb4ef94c6ed44aa8e73 (diff)
downloadweltschmerz-f9b97a698936a5c0d745f92a5b0e2bba1a1dbdbd.tar.gz
Install translated manuals
With at least one manual now fully translated, we need to install it to the right place in both the Makefile and meson.build. For the former use a similar loop as is in use for the MO files. For the latter we sadly need to place the manual manually using install_data() because meson only supports localized manuals natively starting at 0.58.0, a version that is only about two months old.
Diffstat (limited to '')
-rw-r--r--Makefile8
-rw-r--r--meson.build5
2 files changed, 12 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index 5504fb2..a12a971 100644
--- a/Makefile
+++ b/Makefile
@@ -12,7 +12,9 @@ MOFILES := $(POFILES:.po=.mo)
.SUFFIXES:
.SUFFIXES: .po .mo
-all: weltschmerz weltschmerz.1 weltschmerz.desktop $(MOFILES)
+MANI18N := weltschmerz.de.1
+
+all: weltschmerz weltschmerz.1 weltschmerz.desktop $(MOFILES) $(MANI18N)
weltschmerz: weltschmerz.vala terminal.vala config.vala configreader.vala utils.vala resources.c
${VALAC} -X -DGETTEXT_PACKAGE=\"weltschmerz\" -X -DLOCALEDIR="\"${LOCALEDIR}\"" \
@@ -36,6 +38,10 @@ install: all
lang=$$(basename "$$mo" .mo); \
install -D -m 644 "$$mo" "${DESTDIR}${LOCALEDIR}/$$lang/LC_MESSAGES/weltschmerz.mo"; \
done
+ for man in $(MANI18N); do \
+ lang=$$(echo $$man | cut -f2 -d.); \
+ install -D -m 644 "$$man" "${DESTDIR}${MANDIR}/$$lang/man1/weltschmerz.1"; \
+ done
clean:
rm -f weltschmerz weltschmerz.desktop resources.c
diff --git a/meson.build b/meson.build
index 4bae2de..9284ba8 100644
--- a/meson.build
+++ b/meson.build
@@ -20,6 +20,11 @@ executable('weltschmerz', sources, dependencies: dependencies, install: true)
install_man('weltschmerz.1')
+# install_man supports locale only on meson >= 0.58.0, so let's wait a bit
+# until we rely on that
+install_data('weltschmerz.de.1',
+ install_dir: join_paths(get_option('mandir'), 'de', 'man1'), rename: 'weltschmerz.1')
+
i18n.merge_file(
input: 'weltschmerz.desktop.in',
output: 'weltschmerz.desktop',