require 'formula' class Dtach instead of #include "config.h" # so it needs . in the include path. ENV.append "CFLAGS", "-I." # Use our own flags, thanks. inreplace "Makefile", /^CC = .*$/, "" inreplace "Makefile", /^CFLAGS = .*$/, "" inreplace "Makefile", /^LIBS = .*$/, "" system "make" bin.install "dtach" end end