martin/.github/templates/homebrew.martin.rb.j2
Yuri Astrakhan 17bb3ee594 Fix homebrew
2023-11-20 02:49:53 -05:00

53 lines
1.5 KiB
Django/Jinja

#
# ATTENTION: This is an autogenerated file. See original at
# https://github.com/maplibre/martin/blob/main/.github/templates/homebrew.martin.rb.j2
#
class Martin < Formula
current_version="{{ version }}"
desc "Blazing fast and lightweight tile server with PostGIS, MBTiles, and PMTiles support, plus an mbtiles tool"
homepage "https://github.com/maplibre/martin"
on_macos do
on_arm do
sha256 "{{ macos_arm_sha256 }}"
url "https://github.com/maplibre/martin/releases/download/v#{current_version}/martin-aarch64-apple-darwin.tar.gz"
end
on_intel do
sha256 "{{ macos_intel_sha256 }}"
url "https://github.com/maplibre/martin/releases/download/v#{current_version}/martin-x86_64-apple-darwin.tar.gz"
end
end
on_linux do
on_arm do
sha256 "{{ linux_arm_sha256 }}"
url "https://github.com/maplibre/martin/releases/download/v#{current_version}/martin-aarch64-unknown-linux-musl.tar.gz"
end
on_intel do
sha256 "{{ linux_intel_sha256 }}"
url "https://github.com/maplibre/martin/releases/download/v#{current_version}/martin-x86_64-unknown-linux-musl.tar.gz"
end
end
version "#{current_version}"
def install
bin.install "martin"
bin.install "mbtiles"
end
def caveats; <<~EOS
Martin requires a database connection string.
It can be passed as a command-line argument or as a DATABASE_URL environment variable.
martin postgres://postgres@localhost/db
EOS
end
test do
`#{bin}/martin --version`
`#{bin}/mbtiles --version`
end
end