forked from Homebrew/homebrew-core
-
Notifications
You must be signed in to change notification settings - Fork 5
/
spotifyd.rb
47 lines (41 loc) · 1.96 KB
/
spotifyd.rb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
class Spotifyd < Formula
desc "Spotify daemon"
homepage "https://github.com/Spotifyd/spotifyd"
url "https://github.com/Spotifyd/spotifyd/archive/v0.3.3.tar.gz"
sha256 "7fec8244a0052449d9c598535013dfe2a01bd6a1a55b271a713af4fcbeb98360"
license "GPL-3.0-only"
head "https://github.com/Spotifyd/spotifyd.git", branch: "master"
livecheck do
url :stable
regex(/^v?(\d+(?:\.\d+)+)$/i)
end
bottle do
rebuild 2
sha256 cellar: :any, arm64_monterey: "1108e828b2ed18a151143e3dc3dacdc0460efce76f56eba5d50fdf60bfbe06ae"
sha256 cellar: :any, arm64_big_sur: "fe8f92ca3a00fc2b8dc28a6c6d868c49f0febbe26ad818755045af763102e04f"
sha256 cellar: :any, monterey: "0666848f95b581365fa2563736f2226ae55e6c169d4efd446c3bcebc2028525e"
sha256 cellar: :any, big_sur: "027e2994c8471dcde0b06ceda61c07166fa9083d3a08f4056ba986be37f21db0"
sha256 cellar: :any, catalina: "b2a8c0dffe45b557509e6a70a47d9cd96c6222cdd2ab2d44c7366806ba3d7721"
sha256 cellar: :any, mojave: "2c047d9f19710edd8795e14351e36aac051c5f9397e262f4199cf9beffe1483b"
sha256 cellar: :any_skip_relocation, x86_64_linux: "804c7e8e5855f5082734c558606c650c6004ea4e9cfc11d342f5d802cca0c1b4"
end
depends_on "pkg-config" => :build
depends_on "rust" => :build
depends_on "dbus"
depends_on "portaudio"
def install
ENV["COREAUDIO_SDK_PATH"] = MacOS.sdk_path_if_needed
system "cargo", "install", "--no-default-features",
"--features", "dbus_keyring,portaudio_backend",
*std_cargo_args
end
service do
run [opt_bin/"spotifyd", "--no-daemon", "--backend", "portaudio"]
keep_alive true
end
test do
cmd = "#{bin}/spotifyd --username homebrew_fake_user_for_testing \
--password homebrew --no-daemon --backend portaudio"
assert_match "Authentication failed", shell_output(cmd, 101)
end
end