2013-08-05 14:36:53 +00:00
|
|
|
require 'formula'
|
|
|
|
|
|
|
|
class Yafc < Formula
|
|
|
|
homepage 'http://www.yafc-ftp.com/'
|
2014-02-23 00:12:39 +00:00
|
|
|
url 'http://www.yafc-ftp.com/upload/yafc-1.3.2.tar.xz'
|
|
|
|
sha1 'a4cd5518b84cd40c4503f2e022ba946a8bd5484a'
|
2013-08-05 14:36:53 +00:00
|
|
|
|
|
|
|
depends_on 'readline'
|
2014-02-23 00:12:39 +00:00
|
|
|
depends_on 'libssh' => :recommended
|
|
|
|
|
2014-03-21 15:11:08 +00:00
|
|
|
patch :DATA
|
2013-08-05 14:36:53 +00:00
|
|
|
|
|
|
|
def install
|
2014-02-26 05:00:05 +00:00
|
|
|
readline = Formula["readline"].opt_prefix
|
2014-02-23 00:12:39 +00:00
|
|
|
|
|
|
|
args = ["--prefix=#{prefix}",
|
|
|
|
"--with-readline=#{readline}"]
|
|
|
|
args << "--without-ssh" if build.without? "libssh"
|
|
|
|
|
|
|
|
system "./configure", *args
|
2013-08-05 14:36:53 +00:00
|
|
|
system "make", "install"
|
|
|
|
end
|
|
|
|
|
|
|
|
test do
|
|
|
|
system "#{bin}/yafc", "-V"
|
|
|
|
end
|
|
|
|
end
|
2014-02-23 00:12:39 +00:00
|
|
|
|
|
|
|
__END__
|
|
|
|
# The bash-completion script assumes GNU sed and its 'r' option for
|
|
|
|
# extended regular expressions. OSX's sed calls this 'E' (they're not
|
|
|
|
# entirely compatible, but enough for this use case).
|
|
|
|
diff --git a/completion/yafc b/completion/yafc
|
|
|
|
index 03c452a..87f02e2 100644
|
|
|
|
--- a/completion/yafc
|
|
|
|
+++ b/completion/yafc
|
|
|
|
@@ -8,7 +8,7 @@ _yafc()
|
|
|
|
cur=`_get_cword`
|
|
|
|
|
|
|
|
if [ $COMP_CWORD -eq 1 ] && [ -f ~/.yafc/bookmarks ]; then
|
|
|
|
- COMPREPLY=( $( compgen -W '$( sed -nre "/machine/ s/.* alias '\''([^'\'']*)'\''/\1/ p" \
|
|
|
|
+ COMPREPLY=( $( compgen -W '$( sed -nEe "/machine/ s/.* alias '\''([^'\'']*)'\''/\1/ p" \
|
|
|
|
~/.yafc/bookmarks )' -- "$cur" ) )
|
|
|
|
fi
|