excalidrawz 1.2.5
[Homebrew/homebrew-cask.git] / Casks / l / libcblite-community.rb
blob6b7f839c2468b0e54f9f313ccf21337b0eaf3a52
1 cask "libcblite-community" do
2   version "3.2.1"
3   sha256 "a20fcc780b90414796c26b4514373822d075bbdb9c5ad7e1e6f5a8364ca3c035"
5   url "https://packages.couchbase.com/releases/couchbase-lite-c/#{version}/couchbase-lite-c-community-#{version}-macos.zip"
6   name "Couchbase Lite (Community Edition)"
7   desc "Couchbase Lite Libraries for C and C++ (Community Edition)"
8   homepage "https://www.couchbase.com/products/lite"
10   livecheck do
11     cask "libcblite"
12   end
14   conflicts_with cask: "libcblite"
15   depends_on macos: ">= :mojave"
17   artifact "libcblite-#{version}/include/cbl", target: "#{HOMEBREW_PREFIX}/include/cbl"
18   artifact "libcblite-#{version}/include/fleece", target: "#{HOMEBREW_PREFIX}/include/fleece"
19   artifact "libcblite-#{version}/lib/cmake/CouchbaseLite", target: "#{HOMEBREW_PREFIX}/lib/cmake/CouchbaseLite"
20   artifact "libcblite-#{version}/lib/libcblite.#{version}.dylib", target: "#{HOMEBREW_PREFIX}/lib/libcblite.#{version}.dylib"
22   postflight do
23     puts "Creating library symlinks in #{HOMEBREW_PREFIX}/lib"
24     File.symlink("libcblite.#{version}.dylib", "#{HOMEBREW_PREFIX}/lib/libcblite.#{version.major}.dylib")
25     File.symlink("libcblite.#{version.major}.dylib", "#{HOMEBREW_PREFIX}/lib/libcblite.dylib")
26   end
28   uninstall_postflight do
29     if File.symlink?("#{HOMEBREW_PREFIX}/lib/libcblite.#{version.major}.dylib")
30       puts "Removing library symlinks in #{HOMEBREW_PREFIX}/lib"
31       File.unlink("#{HOMEBREW_PREFIX}/lib/libcblite.#{version.major}.dylib", "#{HOMEBREW_PREFIX}/lib/libcblite.dylib")
32     end
33   end
35   # No zap stanza required
36 end