Skip to content

Commit

Permalink
juise 0.7.2
Browse files Browse the repository at this point in the history
Also, fix sandbox violation.

Closes #865.

Signed-off-by: ilovezfs <[email protected]>
  • Loading branch information
ilovezfs committed May 5, 2016
1 parent e009364 commit d4bfa98
Showing 1 changed file with 15 additions and 8 deletions.
23 changes: 15 additions & 8 deletions Formula/juise.rb
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
class Juise < Formula
desc "JUNOS user interface scripting environment"
homepage "https://github.com/Juniper/juise/wiki"
url "https://github.com/Juniper/juise/releases/download/0.6.1/juise-0.6.1.tar.gz"
sha256 "5985f2b19d017a52de2a77b0246afed86d2b9227acd277113468407db11cd146"
url "https://github.com/Juniper/juise/releases/download/0.7.2/juise-0.7.2.tar.gz"
sha256 "869f18cb6095c2340872bc02235530616fcfc2e88c523c6a05238a521d0afe82"

bottle do
sha256 "da6dcf67dee23e98befee63f93796490a877229679e77befa25246da59756822" => :mavericks
Expand All @@ -19,17 +19,24 @@ class Juise < Formula

depends_on "libtool" => :build
depends_on "libslax"
depends_on "libssh2"
depends_on "pcre"
depends_on "sqlite"

def install
system "sh ./bin/setup.sh" if build.head?
system "sh", "./bin/setup.sh" if build.head?

# Prevent sandbox violation where juise's `make install` tries to
# write to "/usr/local/Cellar/libslax/0.20.1/lib/slax/extensions"
# Reported 5th May 2016: https://github.com/Juniper/juise/issues/34
inreplace "configure",
"SLAX_EXTDIR=\"`$SLAX_CONFIG --extdir | head -1`\"",
"SLAX_EXTDIR=\"#{lib}/slax/extensions\""

system "./configure", "--disable-dependency-tracking",
"--prefix=#{prefix}",
"--with-libssh2-prefix=#{HOMEBREW_PREFIX}",
"--with-sqlite3-prefix=#{Formula["sqlite"].opt_prefix}",
"--enable-libedit"
system "make", "install"
end

test do
assert_equal "libjuice version #{version}", shell_output("#{bin}/juise -V").lines.first.chomp
end
end

0 comments on commit d4bfa98

Please sign in to comment.