excalidrawz 1.2.5
[Homebrew/homebrew-cask.git] / Casks / l / libcblite.rb
blobc7a9c36c7df3bd465ca871599aa0b37f52919e20
1 cask "libcblite" do
2   version "3.2.1"
3   sha256 "0edac8996e7620fbb6f61c0ad0062193519b8ab93c55ae4ac47d52fe938f28bc"
5   url "https://packages.couchbase.com/releases/couchbase-lite-c/#{version}/couchbase-lite-c-enterprise-#{version}-macos.zip"
6   name "Couchbase Lite (Enterprise Edition)"
7   desc "Couchbase Lite Libraries for C and C++ (Enterprise Edition)"
8   homepage "https://www.couchbase.com/products/lite"
10   livecheck do
11     url "https://docs.couchbase.com/couchbase-lite/current/c/gs-install.html"
12     regex(/href=.*?couchbase[._-]lite[._-]c[._-]enterprise[._-]v?(\d+(?:\.\d+)+)[._-]macos\.zip/i)
13   end
15   conflicts_with cask: "libcblite-community"
16   depends_on macos: ">= :mojave"
18   artifact "libcblite-#{version}/include/cbl", target: "#{HOMEBREW_PREFIX}/include/cbl"
19   artifact "libcblite-#{version}/include/fleece", target: "#{HOMEBREW_PREFIX}/include/fleece"
20   artifact "libcblite-#{version}/lib/cmake/CouchbaseLite", target: "#{HOMEBREW_PREFIX}/lib/cmake/CouchbaseLite"
21   artifact "libcblite-#{version}/lib/libcblite.#{version}.dylib", target: "#{HOMEBREW_PREFIX}/lib/libcblite.#{version}.dylib"
23   postflight do
24     puts "Creating library symlinks in #{HOMEBREW_PREFIX}/lib"
25     File.symlink("libcblite.#{version}.dylib", "#{HOMEBREW_PREFIX}/lib/libcblite.#{version.major}.dylib")
26     File.symlink("libcblite.#{version.major}.dylib", "#{HOMEBREW_PREFIX}/lib/libcblite.dylib")
27   end
29   uninstall_postflight do
30     if File.symlink?("#{HOMEBREW_PREFIX}/lib/libcblite.#{version.major}.dylib")
31       puts "Removing library symlinks in #{HOMEBREW_PREFIX}/lib"
32       File.unlink("#{HOMEBREW_PREFIX}/lib/libcblite.#{version.major}.dylib", "#{HOMEBREW_PREFIX}/lib/libcblite.dylib")
33     end
34   end
36   # No zap stanza required
37 end