aboutsummaryrefslogtreecommitdiff
path: root/personal/spotifyd/build
diff options
context:
space:
mode:
authorCem Keylan <cem@ckyln.com>2020-08-07 11:58:04 +0300
committerCem Keylan <cem@ckyln.com>2020-08-07 11:58:04 +0300
commit451895be6a833b5c281229e22759c1cc04f3880b (patch)
tree8fb64754f3a996afa0ba102f161cab6d14043926 /personal/spotifyd/build
parentf8d167bae73112fd2f7e6da1d7dca34c70039b00 (diff)
downloadrepository-451895be6a833b5c281229e22759c1cc04f3880b.tar.gz
spotifyd: add new package at 0.2.24
Diffstat (limited to 'personal/spotifyd/build')
-rwxr-xr-xpersonal/spotifyd/build37
1 files changed, 37 insertions, 0 deletions
diff --git a/personal/spotifyd/build b/personal/spotifyd/build
new file mode 100755
index 0000000..6e81884
--- /dev/null
+++ b/personal/spotifyd/build
@@ -0,0 +1,37 @@
+#!/bin/sh -e
+
+export CARGO_HOME=$PWD
+
+(
+ cd vendor
+
+ for crate in *.crate; do
+ tar xf "$crate"
+
+ # Strip the filename from the sha256sum output.
+ sha256=$(sha256sum "$crate")
+ sha256=${sha256%% *}
+
+ printf '{"package":"%s","files":{}}\n' "$sha256" \
+ > "${crate%.crate}/.cargo-checksum.json"
+ done
+)
+
+mkdir -p .cargo
+
+cat <<EOF > .cargo/config
+[source.crates-io]
+replace-with = "vendored-sources"
+
+[source.vendored-sources]
+directory = "vendor"
+EOF
+
+
+cargo build \
+ --release \
+ --frozen \
+ --no-default-features \
+ --features alsa_backend
+
+install -Dm755 target/release/spotifyd "$1/usr/bin/spotifyd"