From d8c9d27ffbc600aa04ecf933aad84c90b9869f1a Mon Sep 17 00:00:00 2001 From: Maxim Cournoyer Date: Thu, 7 Mar 2024 20:21:57 -0500 Subject: gnu: Add man2html. * gnu/packages/man.scm (man2html): New variable. Change-Id: Ia9d290b52af29867f6b3e0fff1aa0af8c788a9cc --- gnu/packages/man.scm | 47 ++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 46 insertions(+), 1 deletion(-) diff --git a/gnu/packages/man.scm b/gnu/packages/man.scm index 71fcf2f4bc..780f6bf6d8 100644 --- a/gnu/packages/man.scm +++ b/gnu/packages/man.scm @@ -10,7 +10,7 @@ ;;; Copyright © 2020 Vincent Legoll ;;; Copyright © 2021 Guillaume Le Vaillant ;;; Copyright © 2021 Jan (janneke) Nieuwenhuizen -;;; Copyright © 2022 Maxim Cournoyer +;;; Copyright © 2022, 2024 Maxim Cournoyer ;;; Copyright © 2022 Imran Iqbal ;;; ;;; This file is part of GNU Guix. @@ -219,6 +219,51 @@ (define-public man-db the traditional flat-text whatis databases.") (license license:gpl2+))) +(define-public man2html + (package + (name "man2html") + (version "1.6g-16") + (source (origin + (method git-fetch) + (uri (git-reference + (url "https://salsa.debian.org/debian/man2html") + (commit (string-append "debian/" version)))) + (file-name (git-file-name name version)) + (sha256 + (base32 + "1cxm8b2x4cjmyidi4gfz9q29zrhaxhbnsiqcmlnyr1bdhjsmk786")))) + (build-system gnu-build-system) + (arguments + (list + #:tests? #f ;no test suite + ;; The source include a man page viewer as well as the man2html + ;; converter. We're only interested in the converter, so we specify the + ;; explicit 'manhtml' target. + #:make-flags #~(list (string-append "bindir=" #$output "/bin") + "manhtml") + #:phases #~(modify-phases %standard-phases + (replace 'configure + (lambda _ + (setenv "CC" #$(cc-for-target)) + (invoke "./configure" + (string-append "-prefix=" #$output)))) + (add-before 'install 'chdir + (lambda _ + (chdir "man2html"))) + (replace 'install + ;; This is needed because the 'manhtml' top level target + ;; doesn't exist in man2html/Makefile. + (lambda* (#:key make-flags #:allow-other-keys + #:rest args) + (apply (assoc-ref %standard-phases 'install) + `(,@args #:make-flags + ,(delete "manhtml" make-flags)))))))) + (home-page "https://salsa.debian.org/debian/man2html") + (synopsis "Man pages to HTML format converter") + (description "@command{man2html} is a command-line tool for converting man +pages into HTML format.") + (license license:gpl2+))) + (define-public mandoc (package (name "mandoc") -- cgit v1.2.3