summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRovanion Luckey <rovanion.luckey@gmail.com>2021-03-27 18:28:02 +0100
committerGuix Patches Tester <>2021-03-28 12:59:14 +0100
commit11833258c2a28ddcb89e5861bae600c651c1c08f (patch)
treec0746fee82fb7a0f0376e2e2e79bccf390a4cb87
parent510e24f973a918391d8122fd6ad515c0567bf23e (diff)
downloadguix-patches-11833258c2a28ddcb89e5861bae600c651c1c08f.tar
guix-patches-11833258c2a28ddcb89e5861bae600c651c1c08f.tar.gz
gnu: sendmail: Fix output's directory structure.series-7468
* gnu/packages/mail.scm (sendmail)[arguments]<#:phases>: Properly specify output directories in replacement 'configure and 'pre-> install.
-rw-r--r--gnu/packages/mail.scm35
1 files changed, 26 insertions, 9 deletions
diff --git a/gnu/packages/mail.scm b/gnu/packages/mail.scm
index a1168872ba..1b487c8519 100644
--- a/gnu/packages/mail.scm
+++ b/gnu/packages/mail.scm
@@ -2795,23 +2795,41 @@ powerful user customization features.")
(("SHELL=/bin/sh") (string-append "SHELL=" (which "sh"))))
#t))
(replace 'configure
- (lambda _
+ (lambda* (#:key outputs #:allow-other-keys)
;; Render harmless any attempts to chown or chgrp
(substitute* "devtools/bin/install.sh"
(("owner=\\$2") "owner=''")
(("group=\\$2") "group=''"))
- (with-output-to-file "devtools/Site/site.config.m4"
- (lambda ()
- (format #t "
+ (let ((out (assoc-ref outputs "out")))
+ (with-output-to-file "devtools/Site/site.config.m4"
+ (lambda ()
+ ;; See 'devtools/M4/UNIX/defines.m4' for the list of
+ ;; installation directories.
+ (format #t "
define(`confCC', `gcc')
define(`confOPTIMIZE', `-g -O2')
define(`confLIBS', `-lresolv')
define(`confINSTALL', `~a/devtools/bin/install.sh')
define(`confDEPEND_TYPE', `CC-M')
define(`confINST_DEP', `')
-" (getcwd))))
+
+define(`confHFDIR', `~a/etc/mail')
+define(`confSTDIR', `~a/etc/mail')
+define(`confMBINDIR', `~a/sbin')
+define(`confUBINDIR', `~a/bin')
+define(`confSBINDIR', `~a/sbin')
+define(`confEBINDIR', `~a/sbin')
+define(`confMANROOT', `~a/share/man')~%"
+ (getcwd)
+ out out out out out out out))))
+
+ (substitute* "cf/cf/Makefile"
+ (("^MAILDIR=.*")
+ (string-append "MAILDIR = "
+ (assoc-ref outputs "out")
+ "/var/spool/mail\n")))
#t))
(replace 'build
(lambda _
@@ -2823,10 +2841,9 @@ define(`confINST_DEP', `')
(add-before 'install 'pre-install
(lambda _
(let ((out (assoc-ref %outputs "out")))
- (mkdir-p (string-append out "/usr/bin"))
- (mkdir-p (string-append out "/usr/sbin"))
- (mkdir-p (string-append out "/etc/mail"))
- (setenv "DESTDIR" out)
+ (mkdir-p (string-append out "/bin"))
+ (mkdir-p (string-append out "/sbin"))
+ (mkdir-p (string-append out "/var/spool/mail"))
(with-directory-excursion "cf/cf"
(invoke "sh" "Build" "install-cf"))
#t))))