iglunix/templates/rust.build.sh
2021-05-29 10:51:31 +01:00

30 lines
509 B
Bash

pkgname=
pkgver=
_clear_vendor_checksums() {
sed -i 's/\("files":{\)[^}]*/\1/' vendor/$1/.cargo-checksum.json
}
fetch() {
curl "" -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 --all-features
}
package() {
cd $pkgname-$pkgver
install -Dm755 target/release/$pkgname $pkgdir/usr/bin/$pkgname
}
license() {
cd $pkgname-$pkgver
cat LICENSE
# cat COPYING
}