2014-03-10 13:17:28 +00:00
|
|
|
class Ncp < Formula
|
2015-05-19 00:00:59 +00:00
|
|
|
desc "File copy tool for LANs"
|
2014-03-10 13:17:28 +00:00
|
|
|
homepage "http://www.fefe.de/ncp/"
|
|
|
|
url "http://dl.fefe.de/ncp-1.2.4.tar.bz2"
|
2015-08-03 12:55:31 +00:00
|
|
|
sha256 "6cfa72edd5f7717bf7a4a93ccc74c4abd89892360e2e0bb095a73c24b9359b88"
|
2014-12-22 05:43:02 +00:00
|
|
|
head ":pserver:cvs:@cvs.fefe.de:/cvs", :using => :cvs
|
2014-03-10 13:17:28 +00:00
|
|
|
|
|
|
|
depends_on "libowfat"
|
|
|
|
|
2014-06-17 01:22:55 +00:00
|
|
|
# fixes man and libowfat paths and "strip" command in Makefile
|
|
|
|
patch do
|
|
|
|
url "https://gist.githubusercontent.com/plumbojumbo/9331146/raw/560e46a688ac9493ffbc1464e59cc062c0940532/GNUmakefile.diff"
|
2015-08-03 12:55:31 +00:00
|
|
|
sha256 "b269c3a024583918d2279324660f467060f0c2adb57db31c19c05f7bbd958b19"
|
2014-03-10 13:17:28 +00:00
|
|
|
end
|
|
|
|
|
|
|
|
def install
|
|
|
|
system "make", "CC=#{ENV.cc}",
|
2015-08-03 12:55:31 +00:00
|
|
|
"LIBOWFAT_PREFIX=#{Formula["libowfat"].opt_prefix}"
|
2014-03-10 13:17:28 +00:00
|
|
|
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
|