Last active
July 23, 2024 15:48
-
-
Save overvenus/4ee527417d5491b52354c61421d4158b to your computer and use it in GitHub Desktop.
corplink-rs brew formula
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Documentation: https://docs.brew.sh/Formula-Cookbook | |
# https://rubydoc.brew.sh/Formula | |
# PLEASE REMOVE ALL GENERATED COMMENTS BEFORE SUBMITTING YOUR PULL REQUEST! | |
class CorplinkRs < Formula | |
desc "使用 rust 实现的飞连客户端" | |
homepage "https://github.com/overvenus/corplink-rs" | |
url "https://github.com/overvenus/corplink-rs/releases/download/4.3/corplink-rs-4.3-macos-arm64.tar.gz" | |
sha256 "e8c3be3fae1a04c80348ad415af53b19b039896b6248c1ab9cc8b57f557b1b6d" | |
license "GPL-2.0" | |
# depends_on "cmake" => :build | |
def install | |
(etc/"corplink-rs").mkpath | |
bin.install "corplink-rs" | |
etc.install "config.json" => "corplink-rs/config.json" | |
end | |
service do | |
run [opt_bin/"corplink-rs", etc/"corplink-rs/config.json"] | |
working_dir etc/"corplink-rs/" | |
require_root true | |
keep_alive true | |
error_log_path var/"log/corplink-rs.log" | |
log_path var/"log/corplink-rs.log" | |
end | |
test do | |
# `test do` will create, run in and delete a temporary directory. | |
# | |
# This test will fail and we won't accept that! For Homebrew/homebrew-core | |
# this will need to be a test that verifies the functionality of the | |
# software. Run the test with `brew test corplink-rs`. Options passed | |
# to `brew install` such as `--HEAD` also need to be provided to `brew test`. | |
# | |
# The installed folder is not in the path, so use the entire path to any | |
# executables being tested: `system "#{bin}/program", "do", "something"`. | |
system "true" | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Install:
brew install --build-from-source --verbose --debug ./corplink-rs.rb
Background service:
sudo brew services start corplink-rs