znapzend 0.15.3 (new formula)

New formula to install znapzend zfs backup tool.

all the props and flowers and 🎂  to ilovezfs for coding the test in large parts with help from mikemcquaid and bfontaine

-definitely not for claustrophobics - removed space that was upsetting brew audit

use fake zfs command and make sure that znapzend calls it with the right parameters

Closes Homebrew/homebrew#49630.

Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
This commit is contained in:
Justin Scholz 2016-02-28 12:32:00 +01:00 committed by Xu Cheng
parent e2537c1c9d
commit 71c9969eb7

34
Formula/znapzend.rb Normal file
View file

@ -0,0 +1,34 @@
class Znapzend < Formula
desc "zfs backup with remote capabilities and mbuffer integration"
homepage "http://www.znapzend.org"
url "https://github.com/oetiker/znapzend/releases/download/v0.15.3/znapzend-0.15.3.tar.gz"
sha256 "27f7c218f4e71beac7b2ba52386a7742506d45c0b3fd40104f44ccef0f373b6e"
depends_on "perl" if MacOS.version <= :mavericks
def install
system "./configure", "--disable-silent-rules",
"--prefix=#{prefix}"
system "make", "install"
end
test do
fake_zfs = testpath/"zfs"
fake_zfs.write <<-EOS.undent
#!/bin/sh
for word in "$@"; do echo $word; done >> znapzendzetup_said.txt
exit 0
EOS
chmod 0755, fake_zfs
ENV.prepend_path "PATH", testpath
system "#{bin}/znapzendzetup", "list"
assert_equal <<-EOS.undent, (testpath/"znapzendzetup_said.txt").read
list
-H
-o
name
-t
filesystem,volume
EOS
end
end