summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: caedf622f2b0965203c3cf918492a72ddb54fa58 (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
pkgname=cargo-binutils
pkgver=0.1.6
pkgrel=1
pkgdesc=''
url="https://github.com/rust-embedded/$pkgname"
arch=('x86_64')
license=('Apache' 'MIT')
depends=('rustup')
makedepends=('cargo')
install="$pkgname.install"
source=("$url/archive/v$pkgver.tar.gz")
sha256sums=('5514aefc982944c9fb965881a533817a4faaad883c871daa6fd5c820ce91ef6f')

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

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

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