diff options
Diffstat (limited to 'Library/Formula/haproxy.rb')
| -rw-r--r-- | Library/Formula/haproxy.rb | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/Library/Formula/haproxy.rb b/Library/Formula/haproxy.rb index ed637ba5e..a96740950 100644 --- a/Library/Formula/haproxy.rb +++ b/Library/Formula/haproxy.rb @@ -6,13 +6,12 @@ class Haproxy <Formula homepage 'http://haproxy.1wt.eu' def install - inreplace 'Makefile', 'PREFIX = /usr/local', "PREFIX = #{prefix}" - inreplace 'Makefile', 'DOCDIR = $(PREFIX)/doc/haproxy', "DOCDIR = #{doc}" - # use our CC, LD, CFLAGS and LDFLAGS - inreplace 'Makefile', 'LDFLAGS = $(ARCH_FLAGS) -g', '' - inreplace 'Makefile', 'CFLAGS = $(ARCH_FLAGS) $(CPU_CFLAGS) $(DEBUG_CFLAGS)', '' - inreplace 'Makefile', 'CC = gcc', '' - inreplace 'Makefile', 'LD = $(CC)', '' + inreplace 'Makefile' do |contents| + contents.change_make_var! 'PREFIX', prefix + contents.change_make_var! 'DOCDIR', doc + # use our CC, LD, CFLAGS and LDFLAGS + contents.remove_make_var! %w[LDFLAGS CFLAGS CC LD] + end # We build generic since the Makefile.osx doesn't appear to work system "make", "TARGET=generic" |
