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>
This commit is contained in:
		
							parent
							
								
									6f22596b1c
								
							
						
					
					
						commit
						f0227a18c2
					
				
					 1 changed files with 40 additions and 33 deletions
				
			
		| 
						 | 
					@ -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
 | 
				
			||||||
 | 
					      #:configure-flags
 | 
				
			||||||
 | 
					      #~(list "--with-uuid=e2fs" "--with-openssl"
 | 
				
			||||||
 | 
					              (string-append "--mandir=" #$output "/share/man")
 | 
				
			||||||
              ;; PostgreSQL installs its own Makefile (should it?).
 | 
					              ;; PostgreSQL installs its own Makefile (should it?).
 | 
				
			||||||
              ;; Prevent it from retaining needless references to
 | 
					              ;; Prevent it from retaining needless references to
 | 
				
			||||||
              ;; the build tools in order to save size.
 | 
					              ;; the build tools in order to save size.
 | 
				
			||||||
              "MKDIR_P=mkdir -p" "INSTALL_BIN=install -c"
 | 
					              "MKDIR_P=mkdir -p" "INSTALL_BIN=install -c"
 | 
				
			||||||
              "LD=ld" "TAR=tar")
 | 
					              "LD=ld" "TAR=tar")
 | 
				
			||||||
      #:phases
 | 
					      #:phases
 | 
				
			||||||
       (modify-phases %standard-phases
 | 
					      #~(modify-phases %standard-phases
 | 
				
			||||||
          (add-before 'configure 'patch-/bin/sh
 | 
					          (add-before 'configure 'patch-/bin/sh
 | 
				
			||||||
            (lambda _
 | 
					            (lambda _
 | 
				
			||||||
              ;; Refer to the actual shell.
 | 
					              ;; Refer to the actual shell.
 | 
				
			||||||
              (substitute* '("src/bin/pg_ctl/pg_ctl.c"
 | 
					              (substitute* '("src/bin/pg_ctl/pg_ctl.c"
 | 
				
			||||||
                             "src/bin/psql/command.c")
 | 
					                             "src/bin/psql/command.c")
 | 
				
			||||||
                         (("/bin/sh") (which "sh")))
 | 
					                (("/bin/sh") (which "sh")))))
 | 
				
			||||||
                       #t))
 | 
					 | 
				
			||||||
          (add-before 'configure 'set-socket-dir
 | 
					          (add-before 'configure 'set-socket-dir
 | 
				
			||||||
            (lambda _
 | 
					            (lambda _
 | 
				
			||||||
              (substitute* '("src/include/pg_config_manual.h")
 | 
					              (substitute* '("src/include/pg_config_manual.h")
 | 
				
			||||||
                (("DEFAULT_PGSOCKET_DIR[^\n]*")
 | 
					                (("DEFAULT_PGSOCKET_DIR[^\n]*")
 | 
				
			||||||
                "DEFAULT_PGSOCKET_DIR \"/var/run/postgresql\""))
 | 
					                 "DEFAULT_PGSOCKET_DIR \"/var/run/postgresql\""))))
 | 
				
			||||||
             #t))
 | 
					 | 
				
			||||||
          (add-after 'build 'build-contrib
 | 
					          (add-after 'build 'build-contrib
 | 
				
			||||||
            (lambda _
 | 
					            (lambda _
 | 
				
			||||||
              (invoke "make" "-C" "contrib")))
 | 
					              (invoke "make" "-C" "contrib")))
 | 
				
			||||||
          (add-after 'install 'install-contrib
 | 
					          (add-after 'install 'install-contrib
 | 
				
			||||||
            (lambda _
 | 
					            (lambda _
 | 
				
			||||||
             (invoke "make" "-C" "contrib" "install"))))))
 | 
					              (invoke "make" "-C" "contrib" "install")))
 | 
				
			||||||
    (inputs
 | 
					          (add-after 'install 'install-manuals
 | 
				
			||||||
     `(("readline" ,readline)
 | 
					            (lambda _
 | 
				
			||||||
       ("libuuid" ,util-linux "lib")
 | 
					              (with-directory-excursion "doc/src/sgml"
 | 
				
			||||||
       ("openssl" ,openssl)
 | 
					                (invoke "make" "install-man")
 | 
				
			||||||
       ("zlib" ,zlib)))
 | 
					                (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
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Reference in a new issue