blob: 335ddfd4d2bf488492b6ab85eb1696572aa72a75 (
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
|
# Maintainer: orhun <orhunparmaksiz@gmail.com>
# https://github.com/orhun/pkgbuilds
pkgname=cargo-patch
pkgver=0.3.2
pkgrel=1
pkgdesc="Cargo subcommand for patching dependencies using patch files"
arch=('x86_64')
url="https://github.com/mettke/cargo-patch"
license=('MIT')
depends=('curl')
makedepends=('cargo')
source=("$pkgname-$pkgver.tar.gz::$url/archive/v$pkgver.tar.gz")
sha512sums=('f6bdff204b6fd9d5efe31678404a6ef40168a0aa8400f1b6550d7c40e25f0c5013c33a15c516ea58bff1226e2bca04cf7201c21be9d5ebcff16d68512af5a90f')
prepare() {
cd "$pkgname-$pkgver"
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"
install -Dm 644 LICENSE -t "$pkgdir/usr/share/licenses/$pkgname"
}
|