42 lines
1.3 KiB
Ruby
42 lines
1.3 KiB
Ruby
class Onedrive < Formula
|
|
desc "Folder synchronization with OneDrive"
|
|
homepage "https://github.com/abraunegg/onedrive"
|
|
url "https://github.com/abraunegg/onedrive/archive/v2.4.22.tar.gz"
|
|
sha256 "2adee749cc8cf7229f1525074fe500a279d01de65ae5c58e135a2ac8aea1364a"
|
|
license "GPL-3.0-only"
|
|
|
|
bottle do
|
|
sha256 cellar: :any_skip_relocation, x86_64_linux: "91b6fdce37acf5f799cf84e11cda197da012adcb5dc9f69dd4b95e485f97867c"
|
|
end
|
|
|
|
depends_on "ldc" => :build
|
|
depends_on "pkg-config" => :build
|
|
depends_on "curl"
|
|
depends_on :linux
|
|
depends_on "sqlite"
|
|
depends_on "systemd"
|
|
|
|
def install
|
|
system "./configure", *std_configure_args, "--with-systemdsystemunitdir=no"
|
|
system "make", "install"
|
|
bash_completion.install "contrib/completions/complete.bash" => "onedrive"
|
|
zsh_completion.install "contrib/completions/complete.zsh" => "_onedrive"
|
|
fish_completion.install "contrib/completions/complete.fish" => "onedrive.fish"
|
|
end
|
|
|
|
service do
|
|
run [opt_bin/"onedrive", "--monitor"]
|
|
keep_alive true
|
|
error_log_path var/"log/onedrive.log"
|
|
log_path var/"log/onedrive.log"
|
|
working_dir Dir.home
|
|
end
|
|
|
|
test do
|
|
assert_match <<~EOS, pipe_output("#{bin}/onedrive 2>&1", "")
|
|
Enter the response uri: Invalid response uri entered
|
|
Could not initialize the OneDrive API
|
|
EOS
|
|
end
|
|
end
|