diff options
| author | Adam Vandenberg | 2012-03-18 11:27:32 -0700 |
|---|---|---|
| committer | Adam Vandenberg | 2012-03-18 12:43:59 -0700 |
| commit | ef3d2d3f62a8051621ab96b316803791ccfa0b5e (patch) | |
| tree | 47a8e92199e5d28325087f6be5a7757eddfddbf1 /Library/Formula | |
| parent | 77d0b18eff2fd2d790de91c81f521b3856a9c957 (diff) | |
| download | homebrew-ef3d2d3f62a8051621ab96b316803791ccfa0b5e.tar.bz2 | |
Exim 4.77
Signed-off-by: Adam Vandenberg <flangy@gmail.com>
Diffstat (limited to 'Library/Formula')
| -rw-r--r-- | Library/Formula/exim.rb | 73 |
1 files changed, 47 insertions, 26 deletions
diff --git a/Library/Formula/exim.rb b/Library/Formula/exim.rb index ccc3105dd..b93ec5693 100644 --- a/Library/Formula/exim.rb +++ b/Library/Formula/exim.rb @@ -1,11 +1,31 @@ require 'formula' +class NoBdb5 < Requirement + def message; <<-EOS.undent + This software can fail to compile when Berkeley-DB 5.x is installed. + You may need to try: + brew unlink berkeley-db + brew install dsniff + brew link berkeley-db + EOS + end + def satisfied? + f = Formula.factory("berkeley-db") + not f.installed? + end +end + class Exim < Formula - url 'http://ftp.exim.org/pub/exim/exim4/exim-4.72.tar.gz' homepage 'http://exim.org' - sha1 '261c02c95b4d3aada73840b01f836e6874841c44' + url 'http://ftp.exim.org/pub/exim/exim4/exim-4.77.tar.gz' + sha1 '2c1ba6b8f627b71b3b58fc0cc56e394590dcd1dc' depends_on 'pcre' + depends_on NoBdb5.new + + def options + [['--support-maildir', 'Support delivery in Maildir format']] + end def install cp 'src/EDITME', 'Local/Makefile' @@ -16,6 +36,7 @@ class Exim < Formula s.gsub! '/usr/exim/configure', etc+'exim.conf' s.gsub! '/usr/exim', prefix s.gsub! '/var/spool/exim', var+'spool/exim' + s << "SUPPORT_MAILDIR=yes\n" if ARGV.include? '--support-maildir' # For non-/usr/local HOMEBREW_PREFIX s << "LOOKUP_INCLUDE=-I#{HOMEBREW_PREFIX}/include\n" @@ -29,36 +50,36 @@ class Exim < Formula # The compile script ignores CPPFLAGS ENV.append "CFLAGS", ENV['CPPFLAGS'] + ENV.j1 # See: https://lists.exim.org/lurker/thread/20111109.083524.87c96d9b.en.html system "make" system "make INSTALL_ARG=-no_chown install" - (man8).install 'doc/exim.8' + man8.install 'doc/exim.8' (bin+'exim_ctl').write startup_script end # Inspired by MacPorts startup script. Fixes restart issue due to missing setuid. - def startup_script - return <<-END -#!/bin/sh -PID=#{var}/spool/exim/exim-daemon.pid -case "$1" in -start) - echo "starting exim mail transfer agent" - #{bin}/exim -bd -q30m - ;; -restart) - echo "restarting exim mail transfer agent" - /bin/kill -15 `/bin/cat $PID` && sleep 1 && #{bin}/exim -bd -q30m - ;; -stop) - echo "stopping exim mail transfer agent" - /bin/kill -15 `/bin/cat $PID` - ;; -*) - echo "Usage: #{bin}/exim_ctl {start|stop|restart}" - exit 1 - ;; -esac -END + def startup_script; <<-EOS.undent + #!/bin/sh + PID=#{var}/spool/exim/exim-daemon.pid + case "$1" in + start) + echo "starting exim mail transfer agent" + #{bin}/exim -bd -q30m + ;; + restart) + echo "restarting exim mail transfer agent" + /bin/kill -15 `/bin/cat $PID` && sleep 1 && #{bin}/exim -bd -q30m + ;; + stop) + echo "stopping exim mail transfer agent" + /bin/kill -15 `/bin/cat $PID` + ;; + *) + echo "Usage: #{bin}/exim_ctl {start|stop|restart}" + exit 1 + ;; + esac + EOS end def caveats; <<-EOS.undent |
