74 lines
2 KiB
Ruby
74 lines
2 KiB
Ruby
class Avfs < Formula
|
|
desc "Virtual file system that facilitates looking inside archives"
|
|
homepage "https://avf.sourceforge.io/"
|
|
url "https://downloads.sourceforge.net/project/avf/avfs/1.0.6/avfs-1.0.6.tar.bz2"
|
|
sha256 "4c1a3a776a01ce7a5b74d66c955269162304edd8c18489fb2186ef728f4be3c3"
|
|
|
|
bottle do
|
|
sha256 "f7b1f3a2a166a4418f6f27707dae144391f6ee2db5fe6029a2369d8de6d2093d" => :mojave
|
|
sha256 "782ac0bc73deff3843c7af2b05e4b82cd99c8062c41014100ca1b2d56a5f5b53" => :high_sierra
|
|
sha256 "810afba90280d2aaef31560b9d0776cce882fc549e9c0575ba9777bd626687b7" => :sierra
|
|
end
|
|
|
|
depends_on "pkg-config" => :build
|
|
depends_on :macos => :sierra # needs clock_gettime
|
|
depends_on "openssl"
|
|
depends_on :osxfuse
|
|
depends_on "xz"
|
|
|
|
# Fix scripts to work on Mac OS X.
|
|
# Nothing the patch fixes has been changed in 1.0.2, so still necessary.
|
|
patch :DATA
|
|
|
|
def install
|
|
args = %W[
|
|
--prefix=#{prefix}
|
|
--disable-debug
|
|
--disable-dependency-tracking
|
|
--disable-silent-rules
|
|
--enable-fuse
|
|
--enable-library
|
|
--with-ssl=#{Formula["openssl"].opt_prefix}
|
|
]
|
|
|
|
system "./configure", *args
|
|
system "make", "install"
|
|
end
|
|
|
|
test do
|
|
system bin/"avfsd", "--version"
|
|
end
|
|
end
|
|
|
|
__END__
|
|
diff --git i/scripts/mountavfs w/scripts/mountavfs
|
|
index 5722dcd..a35e633 100755
|
|
--- i/scripts/mountavfs
|
|
+++ w/scripts/mountavfs
|
|
@@ -14,7 +14,7 @@ else
|
|
MntDir=${HOME}/.avfs
|
|
fi
|
|
|
|
-grep -qE "avfsd ${MntDir}" /proc/mounts || {
|
|
+grep -qE "avfsd.*${MntDir}" < <(mount) || {
|
|
if [ ! -e "$MntDir" ]; then
|
|
mkdir -p "$MntDir"
|
|
fi
|
|
diff --git i/scripts/umountavfs w/scripts/umountavfs
|
|
index 09dc629..a242c21 100644
|
|
--- i/scripts/umountavfs
|
|
+++ w/scripts/umountavfs
|
|
@@ -14,11 +14,11 @@ else
|
|
MntDir="${HOME}/.avfs"
|
|
fi
|
|
|
|
-grep -qE "${MntDir}.*avfsd" /proc/mounts && {
|
|
+grep -qE "avfsd.*${MntDir}" < <(mount) && {
|
|
echo unMounting AVFS on $MntDir...
|
|
if type -p fusermount > /dev/null 2>&1 ; then
|
|
fusermount -u -z "$MntDir"
|
|
else
|
|
- umount -l "$MntDir"
|
|
+ umount "$MntDir"
|
|
fi
|
|
}
|