kiss-repository

personal kiss repository
git clone git://git.ckyln.com/~cem/kiss-repository.git
Log | Files | Refs | Submodules | README | LICENSE

build (672B)


      1 #!/bin/sh -e
      2 
      3 export CARGO_HOME=$PWD
      4 
      5 (
      6     cd vendor
      7 
      8     for crate in *.crate; do
      9         tar xf "$crate"
     10 
     11         # Strip the filename from the sha256sum output.
     12         sha256=$(sha256sum "$crate")
     13         sha256=${sha256%% *}
     14 
     15         printf '{"package":"%s","files":{}}\n' "$sha256" \
     16                > "${crate%.crate}/.cargo-checksum.json"
     17     done
     18 )
     19 
     20 mkdir -p .cargo
     21 
     22 cat <<EOF > .cargo/config
     23 [source.crates-io]
     24 replace-with = "vendored-sources"
     25 
     26 [source.vendored-sources]
     27 directory = "vendor"
     28 EOF
     29 
     30 
     31 cargo build \
     32     --release \
     33     --frozen \
     34     --no-default-features \
     35     --features alsa_backend
     36 
     37 install -Dm755 target/release/spotifyd "$1/usr/bin/spotifyd"