[X2Go-Commits] [x2goserver] 03/03: x2goserver/Makefile: generate man pages from Perl POD.

git-admin at x2go.org git-admin at x2go.org
Wed Dec 5 01:49:59 CET 2018


This is an automated email from the git hooks/post-receive script.

x2go pushed a commit to branch master
in repository x2goserver.

commit a835d18ac940b9fcfc4b32ac026cbab43bb606d6
Author: Mihai Moldovan <ionic at ionic.de>
Date:   Wed Dec 5 01:44:53 2018 +0100

    x2goserver/Makefile: generate man pages from Perl POD.
---
 debian/changelog    |  1 +
 x2goserver/Makefile | 26 +++++++++++++++++++++++++-
 2 files changed, 26 insertions(+), 1 deletion(-)

diff --git a/debian/changelog b/debian/changelog
index c83dd4f..86a1060 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -13,6 +13,7 @@ x2goserver (4.1.0.4-0x2go1) UNRELEASED; urgency=medium
   * New upstream version (4.1.0.4):
     - x2goserver/sbin/x2gocleansessions: add newline before POD block.
     - x2goserver-x2goagent/man/man1/x2goagent.1: add version and date.
+    - x2goserver/Makefile: generate man pages from Perl POD.
 
  -- X2Go Release Manager <git-admin at x2go.org>  Thu, 29 Nov 2018 07:57:20 +0100
 
diff --git a/x2goserver/Makefile b/x2goserver/Makefile
index eda2800..fb53980 100755
--- a/x2goserver/Makefile
+++ b/x2goserver/Makefile
@@ -23,6 +23,7 @@ BIN_SCRIPTS=$(shell cd bin && echo *)
 SBIN_SCRIPTS=$(shell cd sbin && echo *)
 LIB_FILES=$(shell cd lib && echo *)
 FEATURE_SCRIPTS=$(shell cd share/x2gofeature.d && echo *.features)
+POD_SCRIPTS="sbin/x2gocleansessions.8"
 
 man_pages = `cd man && find * -type f`
 
@@ -36,7 +37,30 @@ build: build-arch build-indep
 
 build-arch:
 
-build-indep: build_man2html
+build-indep: build_pod2man build_man2html
+
+build_pod2man:
+	for sectioned_script in $(POD_SCRIPTS); do \
+		man_page="$$(basename "$${sectioned_script}")"; \
+		section="$${man_page##*.}"; \
+		script="$${sectioned_script%.*}"; \
+		$(INSTALL_DIR) "man/man$${section}"; \
+		case "$${suite}" in \
+			('1') \
+				suite='General Commands Manual'; \
+				;; \
+			('5') \
+				suite='X2Go Server Configuration'; \
+				;; \
+			('8') \
+				suite='X2Go Server Tool'; \
+				;; \
+			(*) \
+				suite='Unknown - X2Go Server Bug!'; \
+				;; \
+		esac; \
+		pod2man -s "$${section}" -c "$${suite}" -r "Version $$(cat 'VERSION.x2goserver')" "$${script}" > "man/man$${section}/$${man_page}"; \
+	done
 
 build_man2html:
 	if [ -n "$(MAN2HTML_BIN)" ]; then \

--
Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/x2goserver.git


More information about the x2go-commits mailing list