diff options
| author | David Goldwich | 2014-03-10 14:17:28 +0100 |
|---|---|---|
| committer | Adam Vandenberg | 2014-06-03 19:59:23 -0700 |
| commit | 086b2104ae9e2703e8a49868b2e29c6a6cd0da16 (patch) | |
| tree | d0ef6615369b0089d74c7feed5fba1cb1ea52adc /Library/Formula | |
| parent | d0786dc3abfb998bd237d7a70ca0959eb1c54972 (diff) | |
| download | homebrew-086b2104ae9e2703e8a49868b2e29c6a6cd0da16.tar.bz2 | |
ncp 1.2.4 (new formula)
Closes #27475.
Signed-off-by: Adam Vandenberg <flangy@gmail.com>
Diffstat (limited to 'Library/Formula')
| -rw-r--r-- | Library/Formula/ncp.rb | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/Library/Formula/ncp.rb b/Library/Formula/ncp.rb new file mode 100644 index 000000000..443c23efa --- /dev/null +++ b/Library/Formula/ncp.rb @@ -0,0 +1,34 @@ +require "formula" + +class Ncp < Formula + homepage "http://www.fefe.de/ncp/" + url "http://dl.fefe.de/ncp-1.2.4.tar.bz2" + sha1 "bd33e5311c249948559d17bfd59df93ae72e1f17" + head "cvs://:pserver:cvs:@cvs.fefe.de:/cvs:ncp" + + depends_on "libowfat" + + def patches + # fixes man and libowfat paths and "strip" command in Makefile + "https://gist.githubusercontent.com/plumbojumbo/9331146/raw/560e46a688ac9493ffbc1464e59cc062c0940532/GNUmakefile.diff" + end + + def install + system "make", "CC=#{ENV.cc}", + "LIBOWFAT_PREFIX=#{Formula['libowfat'].opt_prefix}" + system "make", "PREFIX=#{prefix}", "install" + end + + test do + ping = "Hello, brew!\n" + pong = "" + IO.popen("#{bin}/npush -b 2>/dev/null", "r+") do |push| + push.puts ping + push.close_write + IO.popen("#{bin}/npoll 127.0.0.1 2>/dev/null", "r") do |poll| + pong = poll.gets + end + end + assert_equal ping, pong + end +end |
