blob: b553872a2aced5e527e958b3b5563ad9d9e89694 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
|
# Maintainer: orhun <orhunparmaksiz@gmail.com>
# https://github.com/orhun/pkgbuilds
pkgname=cargo-binstall
pkgver=0.9.2
pkgrel=1
pkgdesc="Binary installation for Rust projects"
arch=('x86_64')
url="https://github.com/ryankurte/cargo-binstall"
license=('GPL3')
depends=('xz' 'bzip2')
makedepends=('cargo' 'cmake' 'clang')
source=("$pkgname-$pkgver.tar.gz::$url/archive/v$pkgver.tar.gz"
"$pkgname-fix-tests.patch::$url/commit/14823fbae73ed67199d848a67587e38492c57fd8.patch")
sha256sums=('447be15c9d6f319decde988f67b5e551a21e5a0b6600e76fe25d2dab646a2b7c'
'4e6a147516136c456256f579615490cfc981bda7e5342555f11ecd07978b4165')
prepare() {
cd "$pkgname-$pkgver"
patch -Np1 < "../$pkgname-fix-tests.patch"
cargo fetch --locked --target "$CARCH-unknown-linux-gnu"
}
build() {
cd "$pkgname-$pkgver"
CFLAGS+=" -ffat-lto-objects"
cargo build --release --frozen
}
check() {
cd "$pkgname-$pkgver"
cargo test --frozen
}
package() {
cd "$pkgname-$pkgver"
install -Dm 755 "target/release/$pkgname" -t "$pkgdir/usr/bin"
install -Dm 644 README.md -t "$pkgdir/usr/share/doc/$pkgname"
}
|