47 lines
1.2 KiB
Ruby
47 lines
1.2 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/2.4.0/alluxio-2.4.0-bin.tar.gz"
|
|
sha256 "6f664325d79bf3dd5682749b476eef1f99b0557c473f245903300eea2e5459d9"
|
|
|
|
livecheck do
|
|
url "https://downloads.alluxio.io/downloads/files/"
|
|
regex(%r{href=.*?(\d+(?:\.\d+)+)/?["' >]}i)
|
|
end
|
|
|
|
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
|