diff options
| author | Baptiste Fontaine | 2015-03-26 09:56:52 +0100 |
|---|---|---|
| committer | Brett Koonce | 2015-03-28 23:05:09 -0700 |
| commit | 017f7f9b0ed9bc873882013d5225bbf3c2bf648e (patch) | |
| tree | 35e81f5e36a9fa493b398f86cb7dae93d22c0dcb /Library/Formula/cvsync.rb | |
| parent | 4fce220613fd37deab29d3d2bdf8d808fd4cbd5f (diff) | |
| download | homebrew-017f7f9b0ed9bc873882013d5225bbf3c2bf648e.tar.bz2 | |
cvsync: add test
Closes #38093.
Signed-off-by: Brett Koonce <koonce@gmail.com>
Diffstat (limited to 'Library/Formula/cvsync.rb')
| -rw-r--r-- | Library/Formula/cvsync.rb | 32 |
1 files changed, 18 insertions, 14 deletions
diff --git a/Library/Formula/cvsync.rb b/Library/Formula/cvsync.rb index 67878f42f..7a3d1f90e 100644 --- a/Library/Formula/cvsync.rb +++ b/Library/Formula/cvsync.rb @@ -1,24 +1,24 @@ -require 'formula' - class Cvsync < Formula - homepage 'http://www.cvsync.org/' - url 'http://www.cvsync.org/dist/cvsync-0.24.19.tar.gz' - sha1 'a3c0673bf0f3b81b1eb45ac828a527d2a4e6d2f6' + homepage "http://www.cvsync.org/" + url "http://www.cvsync.org/dist/cvsync-0.24.19.tar.gz" + sha256 "75d99fc387612cb47141de4d59cb3ba1d2965157230f10015fbaa3a1c3b27560" + + depends_on "openssl" def install - ENV['PREFIX'] = prefix - ENV['MANDIR'] = man - ENV['CVSYNC_DEFAULT_CONFIG'] = etc + 'cvsync.conf' - ENV['CVSYNCD_DEFAULT_CONFIG'] = etc + 'cvsyncd.conf' - ENV['HASH_TYPE'] = 'openssl' + ENV["PREFIX"] = prefix + ENV["MANDIR"] = man + ENV["CVSYNC_DEFAULT_CONFIG"] = etc/"cvsync.conf" + ENV["CVSYNCD_DEFAULT_CONFIG"] = etc/"cvsyncd.conf" + ENV["HASH_TYPE"] = "openssl" # Makefile from 2005 assumes Darwin doesn't define `socklen_t' and defines # it with a CC macro parameter making gcc unhappy about double define. - inreplace 'mk/network.mk', - /^CFLAGS \+= \-Dsocklen_t=int/, '' + inreplace "mk/network.mk", + /^CFLAGS \+= \-Dsocklen_t=int/, "" # Remove owner and group parameters from install. - inreplace 'mk/base.mk', + inreplace "mk/base.mk", /^INSTALL_(.{3})_OPTS\?=.*/, 'INSTALL_\1_OPTS?= -c -m ${\1MODE}' # These paths must exist or "make install" fails. @@ -26,6 +26,10 @@ class Cvsync < Formula lib.mkpath man1.mkpath - system 'make install' + system "make", "install" + end + + test do + assert_match "#{version}", shell_output("#{bin}/cvsync -h 2>&1", 1) end end |
