homebrew-core/Formula/alluxio.rb

42 lines
1.1 KiB
Ruby

class Alluxio < Formula
desc "Open Source Memory Speed Virtual Distributed Storage"
homepage "https://www.alluxio.io/"
url "https://downloads.alluxio.io/downloads/files/1.8.2/alluxio-1.8.2-bin.tar.gz"
sha256 "e927f80aabf80ac0b47d4491a4320058bcd15f554fccec1375e8f6dcf243ebb4"
bottle :unneeded
def default_alluxio_conf
<<~EOS
alluxio.master.hostname=localhost
EOS
end
def install
doc.install Dir["docs/*"]
libexec.install Dir["*"]
bin.write_exec_script Dir["#{libexec}/bin/*"]
rm_rf Dir["#{etc}/alluxio/*"]
(etc/"alluxio").install libexec/"conf/alluxio-env.sh.template" => "alluxio-env.sh"
ln_sf "#{etc}/alluxio/alluxio-env.sh", "#{libexec}/conf/alluxio-env.sh"
defaults = etc/"alluxio/alluxio-site.properties"
defaults.write(default_alluxio_conf) unless defaults.exist?
ln_sf "#{etc}/alluxio/alluxio-site.properties", "#{libexec}/conf/alluxio-site.properties"
end
def caveats
<<~EOS
To configure alluxio, edit
#{etc}/alluxio/alluxio-env.sh
#{etc}/alluxio/alluxio-site.properties
EOS
end
test do
system bin/"alluxio", "version"
end
end