iglunix/extra/librespot/build.sh

31 lines
633 B
Bash

pkgname=librespot
pkgver=0.2.0
_clear_vendor_checksums() {
sed -i 's/\("files":{\)[^}]*/\1/' vendor/$1/.cargo-checksum.json
}
fetch() {
curl -L "https://github.com/librespot-org/librespot/archive/refs/tags/v$pkgver.tar.gz" -o $pkgname-$pkgver.tar.xz
tar -xf $pkgname-$pkgver.tar.xz
cd $pkgname-$pkgver
mkdir -p .cargo
cargo vendor > .cargo/config
}
build() {
cd $pkgname-$pkgver
cargo build --release --locked --no-default-features --features alsa-backend
}
package() {
cd $pkgname-$pkgver
install -Dm755 target/release/$pkgname $pkgdir/usr/bin/$pkgname
}
license() {
cd $pkgname-$pkgver
cat LICENSE
# cat COPYING
}