summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: b65e8e8d0384a9b165a61285bfcb84c236ff3797 (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
pkgname=cargo-binutils
pkgver=0.3.6
pkgrel=1
pkgdesc='Cargo subcommands to invoke the LLVM tools shipped with the Rust toolchain'
url="https://github.com/rust-embedded/$pkgname"
arch=('x86_64')
license=('Apache' 'MIT')
depends=('rust' 'cargo')
install="$pkgname.install"
source=("$url/archive/v$pkgver.tar.gz")
sha256sums=('431fb12a47fafcb7047d41bdf4a4c9b77bea56856e0ef65c12c40f5fcb15f98f')

build() {
	cd "$pkgname-$pkgver"
	cargo build --release
}

package() {
	cd "$pkgname-$pkgver"

	for binary in 'ar' 'cov' 'ld' 'lld' 'nm' 'objcopy' 'objdump' 'profdata' 'readobj' 'size' 'strip'
	do
		install -Dm755 "target/release/rust-$binary" "$pkgdir/usr/bin/rust-$binary"
	done

	for binary in 'cov' 'nm' 'objcopy' 'objdump' 'profdata' 'readobj' 'size' 'strip'
	do
		install -Dm755 "target/release/cargo-$binary" "$pkgdir/usr/bin/cargo-$binary"
	done
}