aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAdam Vandenberg2012-07-09 11:56:28 -0700
committerAdam Vandenberg2012-07-09 11:56:28 -0700
commit60c10395394447a742f09bec52423c50994c0b14 (patch)
treed0049aa73fcc34a4c46d38e134d32a7a2681e338
parent00e5950d6581e51ffb95a721a6d85d36c64797b7 (diff)
downloadhomebrew-60c10395394447a742f09bec52423c50994c0b14.tar.bz2
imapfilter: fix for non-/usr/local installs
The PREFIX needs to be passed to make, since it gets baked into the share path which is given as as a -D define to the compiler. Also add caveats about configuration, and install the samples. Fixes #8915.
-rw-r--r--Library/Formula/imapfilter.rb14
1 files changed, 11 insertions, 3 deletions
diff --git a/Library/Formula/imapfilter.rb b/Library/Formula/imapfilter.rb
index dfa9e96c3..a4d6d0e52 100644
--- a/Library/Formula/imapfilter.rb
+++ b/Library/Formula/imapfilter.rb
@@ -13,12 +13,20 @@ class Imapfilter < Formula
s.change_make_var! 'CFLAGS', "#{s.get_make_var 'CFLAGS'} #{ENV.cflags}"
end
- # find Homebrew's libpcre
+ # find Homebrew's libpcre and lua
ENV.append 'LDFLAGS', "-L#{HOMEBREW_PREFIX}/lib"
-
ENV.append 'LDFLAGS', '-liconv'
- system "make", "LDFLAGS=#{ENV.ldflags}"
+ system "make", "PREFIX=#{prefix}", "MANDIR=#{man}", "LDFLAGS=#{ENV.ldflags}"
system "make", "PREFIX=#{prefix}", "MANDIR=#{man}", "install"
+
+ prefix.install 'samples'
+ end
+
+ def caveats; <<-EOS.undent
+ You will need to create a ~/.imapfilter/config.lua file.
+ Samples can be found in:
+ #{prefix}/samples
+ EOS
end
def test