From: John Darrington <jmd@gnu.org>
To: guix-devel@gnu.org
Cc: John Darrington <jmd@gnu.org>
Subject: [PATCH] gnu: Add sendmail
Date: Fri, 16 Sep 2016 18:21:33 +0200 [thread overview]
Message-ID: <1474042893-9690-1-git-send-email-jmd@gnu.org> (raw)
* gnu/packages/mail.scm (sendmail): New variable.
---
gnu/packages/mail.scm | 80 +++++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 80 insertions(+)
diff --git a/gnu/packages/mail.scm b/gnu/packages/mail.scm
index e344683..aff6a2c 100644
--- a/gnu/packages/mail.scm
+++ b/gnu/packages/mail.scm
@@ -1410,3 +1410,83 @@ provides HTML mail archiving with index, mail thread linking,
etc; plus other capabilities including support for MIME and
powerful user customization features.")
(license gpl2+)))
+
+
+(define-public sendmail
+ (package
+ (name "sendmail")
+ (version "8.15.2")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (string-append
+ "ftp://ftp.sendmail.org/pub/sendmail/sendmail."
+ version ".tar.gz"))
+ (sha256
+ (base32
+ "0fdl9ndmspqspdlmghzxlaqk56j3yajk52d7jxcg21b7sxglpy94"))))
+ (build-system gnu-build-system)
+ (arguments
+ `(#:tests? #f ; There are no tests
+ #:phases
+ (modify-phases %standard-phases
+ (add-before 'build 'replace-/bin/sh
+ (lambda _
+ (substitute*
+ (append
+ (list "smrsh/smrsh.c" "sendmail/conf.c" "contrib/mailprio"
+ "contrib/mmuegel" "devtools/bin/configure.sh")
+ (find-files "." ".*\\.m4")
+ (find-files "." ".*\\.cf"))
+ (("/bin/sh") (which "bash")))
+
+ (substitute* "devtools/bin/Build"
+ (("SHELL=/bin/sh") (string-append "SHELL=" (which "bash"))))
+ #t))
+ (replace 'configure
+ (lambda _
+
+ ;; Render harmless any attempts to chown or chmod
+ (substitute* "devtools/bin/install.sh"
+ (("owner=\\$2") "owner=''")
+ (("group=\\$2") "group=''"))
+
+ (with-output-to-file "devtools/Site/site.config.m4"
+ (lambda ()
+ (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))))))
+ (replace 'build
+ (lambda _
+ (system* "sh" "Build")
+ (with-directory-excursion "cf/cf"
+ (begin
+ (copy-file "generic-linux.mc" "sendmail.mc")
+ (zero? (system* "sh" "Build" "sendmail.cf"))))))
+ (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)
+ (with-directory-excursion "cf/cf"
+ (zero? (system* "sh" "Build" "install-cf")))))))))
+ (inputs
+ `(("m4" ,m4)
+ ("perl" ,perl)))
+ (home-page "http://sendmail.org")
+ (synopsis
+ "Highly configurable Mail Transfer Agent (MTA)")
+ (description
+ "Sendmail is a mail transfer agent (MTA) originally developed by Eric
+Allman. It is highly configurable and supports many delivery methods and many
+transfer protocols.")
+ (license (non-copyleft "file://LICENSE"
+ "See LICENSE in the distribution."))))
+
--
2.1.4
next reply other threads:[~2016-09-16 16:22 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-09-16 16:21 John Darrington [this message]
2016-09-17 4:51 ` [PATCH] gnu: Add sendmail Alex Vong
2016-09-17 8:50 ` John Darrington
2016-09-17 9:03 ` John Darrington
2016-09-17 9:38 ` Alex Vong
2016-09-17 10:11 ` John Darrington
2016-09-18 19:14 ` Alex Kost
2016-09-24 8:22 ` Alex Vong
2016-09-24 17:50 ` Alex Kost
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://guix.gnu.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1474042893-9690-1-git-send-email-jmd@gnu.org \
--to=jmd@gnu.org \
--cc=guix-devel@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/guix.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).