From 3a27267c32676a6a004acf2b9a7faf7c1d348d20 Mon Sep 17 00:00:00 2001 From: Louis Moureaux Date: Thu, 19 Jul 2018 15:34:53 +0200 Subject: [PATCH] Compress man pages It looks like it's required when installing them in the system location. See issue #138 and PR #139. --- Makefile | 2 ++ pkg/setup.py | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 8d24b294..5380b5de 100644 --- a/Makefile +++ b/Makefile @@ -57,8 +57,10 @@ preprpm: default man @cp -rf ana_scans.py $(ScriptDir) @cp -rf anaXDAQLatency.py $(ScriptDir) @cp -rf packageFiles4Docker.py $(ScriptDir) + -rm -rf $(ManDir) $(MakeDir) $(ManDir) @cp -rf doc/_build/man/* $(ManDir) + gzip $(ManDir)/* -cp -rf README.md LICENSE CHANGELOG.md MANIFEST.in requirements.txt $(PackageDir) -cp -rf README.md LICENSE CHANGELOG.md MANIFEST.in requirements.txt pkg diff --git a/pkg/setup.py b/pkg/setup.py index 0eb5610b..8db5930f 100644 --- a/pkg/setup.py +++ b/pkg/setup.py @@ -61,7 +61,7 @@ def getdatafiles(): man_sections = {} for file in listdir(mandir): print('Found man page: %s' % file) - section = file.split('.')[-1] + section = file.split('.')[-2] man_sections[section] = man_sections.get(section, []) + [join(mandir, file)] for section in man_sections: data_files.append(('share/man/man%s' % section, man_sections[section]))