me
/
guix
Archived
1
0
Fork 0

gnu: postgresql: Install manpages and info manual.

Fixes <https://issues.guix.gnu.org/47606>.

* 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 <maxim.cournoyer@gmail.com>
master
Brice Waegeneire 2021-12-12 19:31:34 +01:00 committed by Maxim Cournoyer
parent 6f22596b1c
commit f0227a18c2
No known key found for this signature in database
GPG Key ID: 1260E46482E63562
1 changed files with 40 additions and 33 deletions

View File

@ -32,7 +32,7 @@
;;; Copyright © 2017 Kristofer Buffington <kristoferbuffington@gmail.com> ;;; Copyright © 2017 Kristofer Buffington <kristoferbuffington@gmail.com>
;;; Copyright © 2018 Amirouche Boubekki <amirouche@hypermove.net> ;;; Copyright © 2018 Amirouche Boubekki <amirouche@hypermove.net>
;;; Copyright © 2018 Joshua Sierles, Nextjournal <joshua@nextjournal.com> ;;; Copyright © 2018 Joshua Sierles, Nextjournal <joshua@nextjournal.com>
;;; Copyright © 2018, 2021 Maxim Cournoyer <maxim.cournoyer@gmail.com> ;;; Copyright © 2018, 2021, 2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>
;;; Copyright © 2019 Jack Hill <jackhill@jackhill.us> ;;; Copyright © 2019 Jack Hill <jackhill@jackhill.us>
;;; Copyright © 2019 Alex Griffin <a@ajgrf.com> ;;; Copyright © 2019 Alex Griffin <a@ajgrf.com>
;;; Copyright © 2019 Gábor Boskovits <boskovits@gmail.com> ;;; Copyright © 2019 Gábor Boskovits <boskovits@gmail.com>
@ -56,6 +56,7 @@
;;; Copyright © 2021 jgart <jgart@dismail.de> ;;; Copyright © 2021 jgart <jgart@dismail.de>
;;; Copyright © 2021 Foo Chuan Wei <chuanwei.foo@hotmail.com> ;;; Copyright © 2021 Foo Chuan Wei <chuanwei.foo@hotmail.com>
;;; Copyright © 2022 Zhu Zihao <all_but_last@163.com> ;;; Copyright © 2022 Zhu Zihao <all_but_last@163.com>
;;; Copyright © 2021 Brice Waegeneire <brice@waegenei.re>
;;; ;;;
;;; This file is part of GNU Guix. ;;; This file is part of GNU Guix.
;;; ;;;
@ -90,6 +91,7 @@
#:use-module (gnu packages curl) #:use-module (gnu packages curl)
#:use-module (gnu packages cyrus-sasl) #:use-module (gnu packages cyrus-sasl)
#:use-module (gnu packages dbm) #:use-module (gnu packages dbm)
#:use-module (gnu packages docbook)
#:use-module (gnu packages emacs) #:use-module (gnu packages emacs)
#:use-module (gnu packages flex) #:use-module (gnu packages flex)
#:use-module (gnu packages freedesktop) #:use-module (gnu packages freedesktop)
@ -1225,38 +1227,43 @@ and high-availability (HA).")
(patches (search-patches "postgresql-disable-resolve_symlinks.patch")))) (patches (search-patches "postgresql-disable-resolve_symlinks.patch"))))
(build-system gnu-build-system) (build-system gnu-build-system)
(arguments (arguments
`(#:configure-flags '("--with-uuid=e2fs" "--with-openssl" (list
;; PostgreSQL installs its own Makefile (should it?). #:configure-flags
;; Prevent it from retaining needless references to #~(list "--with-uuid=e2fs" "--with-openssl"
;; the build tools in order to save size. (string-append "--mandir=" #$output "/share/man")
"MKDIR_P=mkdir -p" "INSTALL_BIN=install -c" ;; PostgreSQL installs its own Makefile (should it?).
"LD=ld" "TAR=tar") ;; Prevent it from retaining needless references to
#:phases ;; the build tools in order to save size.
(modify-phases %standard-phases "MKDIR_P=mkdir -p" "INSTALL_BIN=install -c"
(add-before 'configure 'patch-/bin/sh "LD=ld" "TAR=tar")
(lambda _ #:phases
;; Refer to the actual shell. #~(modify-phases %standard-phases
(substitute* '("src/bin/pg_ctl/pg_ctl.c" (add-before 'configure 'patch-/bin/sh
"src/bin/psql/command.c") (lambda _
(("/bin/sh") (which "sh"))) ;; Refer to the actual shell.
#t)) (substitute* '("src/bin/pg_ctl/pg_ctl.c"
(add-before 'configure 'set-socket-dir "src/bin/psql/command.c")
(lambda _ (("/bin/sh") (which "sh")))))
(substitute* '("src/include/pg_config_manual.h") (add-before 'configure 'set-socket-dir
(("DEFAULT_PGSOCKET_DIR[^\n]*") (lambda _
"DEFAULT_PGSOCKET_DIR \"/var/run/postgresql\"")) (substitute* '("src/include/pg_config_manual.h")
#t)) (("DEFAULT_PGSOCKET_DIR[^\n]*")
(add-after 'build 'build-contrib "DEFAULT_PGSOCKET_DIR \"/var/run/postgresql\""))))
(lambda _ (add-after 'build 'build-contrib
(invoke "make" "-C" "contrib"))) (lambda _
(add-after 'install 'install-contrib (invoke "make" "-C" "contrib")))
(lambda _ (add-after 'install 'install-contrib
(invoke "make" "-C" "contrib" "install")))))) (lambda _
(inputs (invoke "make" "-C" "contrib" "install")))
`(("readline" ,readline) (add-after 'install 'install-manuals
("libuuid" ,util-linux "lib") (lambda _
("openssl" ,openssl) (with-directory-excursion "doc/src/sgml"
("zlib" ,zlib))) (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/") (home-page "https://www.postgresql.org/")
(synopsis "Powerful object-relational database system") (synopsis "Powerful object-relational database system")
(description (description