diff options
author | Zheng Junjie <z572@z572.online> | 2025-02-06 22:48:19 +0800 |
---|---|---|
committer | Zheng Junjie <z572@z572.online> | 2025-02-15 20:06:47 +0800 |
commit | 314cacc3588c0caf7b20c33772aeed6832e793df (patch) | |
tree | dd49d16aef47ff463d057d7618a4e3a11cb87d17 | |
parent | 169ef7616b376c6047dcaa14c7c208504e3b49be (diff) | |
download | guix-314cacc3588c0caf7b20c33772aeed6832e793df.tar.gz guix-314cacc3588c0caf7b20c33772aeed6832e793df.zip |
gnu: opensmtpd: Use G-expressions.
* gnu/packages/mail.scm (opensmtpd)[arguments]<#:phases>: Use G-expressions.
Reviewed-by: 宋文武 <iyzsong@envs.net>
Change-Id: I97dce2865e2b67f0f7cd4f10b0b6cc10a459ceb7
-rw-r--r-- | gnu/packages/mail.scm | 75 |
1 files changed, 37 insertions, 38 deletions
diff --git a/gnu/packages/mail.scm b/gnu/packages/mail.scm index 3e90b3d0b8..3834691e9e 100644 --- a/gnu/packages/mail.scm +++ b/gnu/packages/mail.scm @@ -3338,44 +3338,43 @@ from the Cyrus IMAP project.") (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 |