iglunix/templates/rust.build.sh

31 lines
509 B
Bash
Raw Normal View History

2021-01-31 11:09:14 +00:00
pkgname=
pkgver=
2021-05-29 09:51:31 +00:00
_clear_vendor_checksums() {
sed -i 's/\("files":{\)[^}]*/\1/' vendor/$1/.cargo-checksum.json
}
2021-01-31 11:09:14 +00:00
fetch() {
curl "" -o $pkgname-$pkgver.tar.xz
tar -xf $pkgname-$pkgver.tar.xz
2021-05-29 09:51:31 +00:00
cd $pkgname-$pkgver
mkdir -p .cargo
cargo vendor > .cargo/config
2021-01-31 11:09:14 +00:00
}
build() {
cd $pkgname-$pkgver
cargo build --release --locked --all-features
}
package() {
cd $pkgname-$pkgver
2021-05-29 09:51:31 +00:00
install -Dm755 target/release/$pkgname $pkgdir/usr/bin/$pkgname
2021-01-31 11:09:14 +00:00
}
license() {
cd $pkgname-$pkgver
cat LICENSE
# cat COPYING
}