From f0227a18c2394d3403d0265f3c700cfd9d1ee5b4 Mon Sep 17 00:00:00 2001 From: Brice Waegeneire Date: Sun, 12 Dec 2021 19:31:34 +0100 Subject: gnu: postgresql: Install manpages and info manual. Fixes . * gnu/packages/databases.scm (postgresql)[arguments]: Use gexps and remove trailing #t. [configure-flags]: Add '--mandir'. [phases]{install-manuals}: New phase. [native-inputs]: New field. [inputs]: Use new style. Co-authored-by: Maxim Cournoyer --- gnu/packages/databases.scm | 73 +++++++++++++++++++++++++--------------------- 1 file changed, 40 insertions(+), 33 deletions(-) (limited to 'gnu/packages/databases.scm') diff --git a/gnu/packages/databases.scm b/gnu/packages/databases.scm index f6c1046a51..2e5d49bc12 100644 --- a/gnu/packages/databases.scm +++ b/gnu/packages/databases.scm @@ -32,7 +32,7 @@ ;;; Copyright © 2017 Kristofer Buffington ;;; Copyright © 2018 Amirouche Boubekki ;;; Copyright © 2018 Joshua Sierles, Nextjournal -;;; Copyright © 2018, 2021 Maxim Cournoyer +;;; Copyright © 2018, 2021, 2022 Maxim Cournoyer ;;; Copyright © 2019 Jack Hill ;;; Copyright © 2019 Alex Griffin ;;; Copyright © 2019 Gábor Boskovits @@ -56,6 +56,7 @@ ;;; Copyright © 2021 jgart ;;; Copyright © 2021 Foo Chuan Wei ;;; Copyright © 2022 Zhu Zihao +;;; Copyright © 2021 Brice Waegeneire ;;; ;;; This file is part of GNU Guix. ;;; @@ -90,6 +91,7 @@ #:use-module (gnu packages curl) #:use-module (gnu packages cyrus-sasl) #:use-module (gnu packages dbm) + #:use-module (gnu packages docbook) #:use-module (gnu packages emacs) #:use-module (gnu packages flex) #:use-module (gnu packages freedesktop) @@ -1225,38 +1227,43 @@ and high-availability (HA).") (patches (search-patches "postgresql-disable-resolve_symlinks.patch")))) (build-system gnu-build-system) (arguments - `(#:configure-flags '("--with-uuid=e2fs" "--with-openssl" - ;; PostgreSQL installs its own Makefile (should it?). - ;; Prevent it from retaining needless references to - ;; the build tools in order to save size. - "MKDIR_P=mkdir -p" "INSTALL_BIN=install -c" - "LD=ld" "TAR=tar") - #:phases - (modify-phases %standard-phases - (add-before 'configure 'patch-/bin/sh - (lambda _ - ;; Refer to the actual shell. - (substitute* '("src/bin/pg_ctl/pg_ctl.c" - "src/bin/psql/command.c") - (("/bin/sh") (which "sh"))) - #t)) - (add-before 'configure 'set-socket-dir - (lambda _ - (substitute* '("src/include/pg_config_manual.h") - (("DEFAULT_PGSOCKET_DIR[^\n]*") - "DEFAULT_PGSOCKET_DIR \"/var/run/postgresql\"")) - #t)) - (add-after 'build 'build-contrib - (lambda _ - (invoke "make" "-C" "contrib"))) - (add-after 'install 'install-contrib - (lambda _ - (invoke "make" "-C" "contrib" "install")))))) - (inputs - `(("readline" ,readline) - ("libuuid" ,util-linux "lib") - ("openssl" ,openssl) - ("zlib" ,zlib))) + (list + #:configure-flags + #~(list "--with-uuid=e2fs" "--with-openssl" + (string-append "--mandir=" #$output "/share/man") + ;; PostgreSQL installs its own Makefile (should it?). + ;; Prevent it from retaining needless references to + ;; the build tools in order to save size. + "MKDIR_P=mkdir -p" "INSTALL_BIN=install -c" + "LD=ld" "TAR=tar") + #:phases + #~(modify-phases %standard-phases + (add-before 'configure 'patch-/bin/sh + (lambda _ + ;; Refer to the actual shell. + (substitute* '("src/bin/pg_ctl/pg_ctl.c" + "src/bin/psql/command.c") + (("/bin/sh") (which "sh"))))) + (add-before 'configure 'set-socket-dir + (lambda _ + (substitute* '("src/include/pg_config_manual.h") + (("DEFAULT_PGSOCKET_DIR[^\n]*") + "DEFAULT_PGSOCKET_DIR \"/var/run/postgresql\"")))) + (add-after 'build 'build-contrib + (lambda _ + (invoke "make" "-C" "contrib"))) + (add-after 'install 'install-contrib + (lambda _ + (invoke "make" "-C" "contrib" "install"))) + (add-after 'install 'install-manuals + (lambda _ + (with-directory-excursion "doc/src/sgml" + (invoke "make" "install-man") + (invoke "make" "postgres.info") + (install-file "postgres.info" + (string-append #$output "/share/info")))))))) + (native-inputs (list docbook-xml docbook2x libxml2 perl texinfo)) + (inputs (list readline `(,util-linux "lib") openssl zlib)) (home-page "https://www.postgresql.org/") (synopsis "Powerful object-relational database system") (description -- cgit v1.2.3