blob: b740cb0b1c74475e95f73301b5397db592e69bfd (
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
|
# Maintainer: Jonas Malaco <jonas@protocubo.io>
pkgname=cargo-llvm-lines
pkgver=0.4.12
pkgrel=1
pkgdesc="Count the number of lines of LLVM IR across all instantiations of a generic function"
arch=('any')
url='https://github.com/dtolnay/cargo-llvm-lines'
license=('Apache' 'MIT')
depends=('cargo' 'rust-nightly' 'rustfmt')
source=("$pkgname-$pkgver.tar.gz::$url/archive/$pkgver.tar.gz")
sha256sums=('4841e606a2fd642524b48206f5777691d7a66afad54ddea24cb4a3d63113484b')
build() {
cd "$pkgname-$pkgver"
cargo build --release --locked --all-features --target-dir=target
}
check() {
cd "$pkgname-$pkgver"
cargo test --release --locked --target-dir=target
# since currently the above runs no tests (kept only for future
# proofing) run cargo llvm-lines on itself
target/release/cargo-llvm-lines llvm-lines | head -n 8
}
package() {
cd "$pkgname-$pkgver"
install -Dm 755 target/release/${pkgname} -t "${pkgdir}/usr/bin"
install -Dm644 "LICENSE-MIT" "$pkgdir/usr/share/licenses/${pkgname}/LICENSE-MIT"
}
|