forked from gpardikis/homebrew-alt
-
Notifications
You must be signed in to change notification settings - Fork 0
/
hstr.rb
42 lines (33 loc) · 1.05 KB
/
hstr.rb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
require "formula"
class Hstr < Formula
homepage "https://github.com/dvorka/hstr"
url "https://github.com/dvorka/hstr/archive/1.19.tar.gz"
sha256 "1783fa175416e99cb540cbc47092b87dc2362dc2a2f988f59eb66b0d793e4136"
head do
url "https://github.com/dvorka/hstr.git"
end
depends_on "autoconf" => :build
depends_on "automake" => :build
depends_on "libtool" => :build
depends_on "readline"
depends_on "ncurses"
def install
readline = Formula["readline"]
ENV['LIBDIRS'] = readline.opt_lib
ENV['INCDIRS'] = readline.opt_include
system "aclocal"
system "autoreconf -i"
system "./configure", "--prefix=#{prefix}"
system "make", "install"
end
test do
# The installed folder is not in the path, so use the entire path to any
# executables being tested: `system "#{bin}/program", "do", "something"`.
system "hh", "--show-configuration"
end
def caveats; <<-EOS.undent
To enable hh configuration, append to your .profile:
if which -s hh; then eval "$(hh --show-configuration)"; fi
EOS
end
end