Skip to content

Instantly share code, notes, and snippets.

@stephenrjohnson
Last active December 16, 2015 09:39
Show Gist options
  • Save stephenrjohnson/5414386 to your computer and use it in GitHub Desktop.
Save stephenrjohnson/5414386 to your computer and use it in GitHub Desktop.
require 'formula'
class Muttkg < Formula
homepage 'http://www.mutt.org/'
url 'https://github.com/karelzak/mutt-kz.git'
# sha1 ''
option "with-debug", "Build with debug option enabled"
option "with-notmuch", "Build with not much"
depends_on 'tokyo-cabinet'
depends_on 'automake' => :build
depends_on 'autoconf' => :build
depends_on 'notmuch'
depends_on 'slang' if build.include? 'with-slang'
def install
args = ["--disable-dependency-tracking",
"--disable-warnings",
"--enable-notmuch",
"--prefix=#{prefix}",
"--with-ssl",
"--with-sasl",
"--with-gss",
"--enable-imap",
"--enable-smtp",
"--enable-pop",
"--enable-hcache",
"--with-tokyocabinet",
# This is just a trick to keep 'make install' from trying to chgrp
# the mutt_dotlock file (which we can't do if we're running as an
# unpriviledged user)
"--with-homespool=.mbox"]
args << "--with-slang" if build.include? 'with-slang'
if build.include? 'with-debug'
args << "--enable-debug"
else
args << "--disable-debug"
end
if build.include? 'with-notmuch'
args << "--enable-notmuch"
end
system "./prepare"
system "./configure", *args
system "make install"
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment