update rust package template

This commit is contained in:
Ella-0 2021-05-29 10:51:31 +01:00
parent 43bcff2ab3
commit a176f5879d

View file

@ -1,9 +1,16 @@
pkgname= pkgname=
pkgver= pkgver=
_clear_vendor_checksums() {
sed -i 's/\("files":{\)[^}]*/\1/' vendor/$1/.cargo-checksum.json
}
fetch() { fetch() {
curl "" -o $pkgname-$pkgver.tar.xz curl "" -o $pkgname-$pkgver.tar.xz
tar -xf $pkgname-$pkgver.tar.xz tar -xf $pkgname-$pkgver.tar.xz
cd $pkgname-$pkgver
mkdir -p .cargo
cargo vendor > .cargo/config
} }
build() { build() {
@ -13,7 +20,7 @@ build() {
package() { package() {
cd $pkgname-$pkgver cd $pkgname-$pkgver
install -Dm 755 target/release/${pkgname} -t "${pkgdir}/usr/bin" install -Dm755 target/release/$pkgname $pkgdir/usr/bin/$pkgname
} }
license() { license() {