[bug#76101,2/2] gnu: opensmtpd: Use G-expressions.
Commit Message
* gnu/packages/mail.scm (opensmtpd)[arguments]<#:phases>: Use G-expressions.
Change-Id: I97dce2865e2b67f0f7cd4f10b0b6cc10a459ceb7
---
gnu/packages/mail.scm | 75 +++++++++++++++++++++----------------------
1 file changed, 37 insertions(+), 38 deletions(-)
@@ -3336,44 +3336,43 @@ (define-public opensmtpd
(string-append "ac_cv_path_ZCAT="
#$(this-package-input "gzip") "/bin/zcat"))
#:phases
- `(modify-phases %standard-phases
- ;; Fix some incorrectly hard-coded external tool file names.
- (add-after 'unpack 'patch-FHS-file-names
- (lambda* (#:key inputs #:allow-other-keys)
- (substitute* "mk/pathnames"
- ;; avoids warning smtpd: couldn't enqueue offline message
- ;; smtpctl exited abnormally
- (("(-DPATH_SMTPCTL=).*\\\\" all def)
- (string-append def "\\\"/run/privileged/bin/smtpctl\\\" \\"))
- (("(-DPATH_MAKEMAP=).*\\\\" all def)
- (string-append def "\\\"/run/privileged/bin/makemap\\\" \\")))
- (substitute* "usr.sbin/smtpd/smtpctl.c"
- ;; ‘gzcat’ is auto-detected at compile time, but ‘cat’ isn't.
- (("/bin/cat" file) (search-input-file inputs file)))
- (substitute* "usr.sbin/smtpd/mda_unpriv.c"
- (("/bin/sh" file) (search-input-file inputs file)))))
- ;; Avoid install smtpd.conf to /etc.
- (add-after 'unpack 'fix-smtpd.conf-install-path
- (lambda _
- (let ((etc (string-append (assoc-ref %outputs "out")
- "/etc")))
- (mkdir-p etc)
- (substitute* "mk/smtpd/Makefile.am"
- (("\\$\\(DESTDIR\\)\\$\\(sysconfdir\\)/smtpd\\.conf")
- (string-append etc "/smtpd.conf"))))))
- ;; OpenSMTPD provides a single smtpctl utility to control both the
- ;; daemon and the local submission subsystem. To accomodate systems
- ;; that require historical interfaces such as sendmail, newaliases or
- ;; makemap, smtpctl operates in compatibility mode if called with the
- ;; historical name.
- (add-after 'install 'install-compability-links
- (lambda* (#:key outputs #:allow-other-keys)
- (let* ((out (assoc-ref outputs "out"))
- (sbin (string-append out "/sbin/")))
- (for-each (lambda (command)
- (symlink "smtpctl" (string-append sbin command)))
- (list "mailq" "makemap" "newaliases"
- "send-mail" "sendmail"))))))))
+ #~(modify-phases %standard-phases
+ ;; Fix some incorrectly hard-coded external tool file names.
+ (add-after 'unpack 'patch-FHS-file-names
+ (lambda* (#:key inputs #:allow-other-keys)
+ (substitute* "mk/pathnames"
+ ;; avoids warning smtpd: couldn't enqueue offline message
+ ;; smtpctl exited abnormally
+ (("(-DPATH_SMTPCTL=).*\\\\" all def)
+ (string-append def "\\\"/run/privileged/bin/smtpctl\\\" \\"))
+ (("(-DPATH_MAKEMAP=).*\\\\" all def)
+ (string-append def "\\\"/run/privileged/bin/makemap\\\" \\")))
+ (substitute* "usr.sbin/smtpd/smtpctl.c"
+ ;; ‘gzcat’ is auto-detected at compile time, but ‘cat’ isn't.
+ (("/bin/cat" file) (search-input-file inputs file)))
+ (substitute* "usr.sbin/smtpd/mda_unpriv.c"
+ (("/bin/sh" file) (search-input-file inputs file)))))
+ ;; Avoid install smtpd.conf to /etc.
+ (add-after 'unpack 'fix-smtpd.conf-install-path
+ (lambda _
+ (let ((etc (string-append #$output "/etc")))
+ (mkdir-p etc)
+ (substitute* "mk/smtpd/Makefile.am"
+ (("\\$\\(DESTDIR\\)\\$\\(sysconfdir\\)/smtpd\\.conf")
+ (string-append etc "/smtpd.conf"))))))
+ ;; OpenSMTPD provides a single smtpctl utility to control both the
+ ;; daemon and the local submission subsystem. To accomodate systems
+ ;; that require historical interfaces such as sendmail, newaliases or
+ ;; makemap, smtpctl operates in compatibility mode if called with the
+ ;; historical name.
+ (add-after 'install 'install-compability-links
+ (lambda* (#:key outputs #:allow-other-keys)
+ (let* ((out (assoc-ref outputs "out"))
+ (sbin (string-append out "/sbin/")))
+ (for-each (lambda (command)
+ (symlink "smtpctl" (string-append sbin command)))
+ (list "mailq" "makemap" "newaliases"
+ "send-mail" "sendmail"))))))))
(synopsis "Lightweight SMTP daemon")
(description
"OpenSMTPD is an implementation of server-side @acronym{SMTP, Simple Mail