35 lines
1 KiB
Bash
35 lines
1 KiB
Bash
# Maintainer: George Rawlinson <grawlinson@archlinux.org>
|
|
# Contributor: Philipp A. <flying-sheep@web.de>
|
|
# Contributor: Jian Zeng <anonymousknight96 AT gmail.com>
|
|
|
|
pkgname=cargo-expand
|
|
pkgver=1.0.7
|
|
pkgrel=1
|
|
pkgdesc='Cargo subcommand to show result of macro expansion'
|
|
arch=('x86_64')
|
|
url='https://github.com/dtolnay/cargo-expand'
|
|
license=('Apache' 'MIT')
|
|
depends=('gcc-libs')
|
|
makedepends=('rust')
|
|
source=("$pkgname-$pkgver.tar.gz::$url/archive/$pkgver.tar.gz")
|
|
b2sums=('11a1c08503ac60401dad323afbcc2245b4462d5d31c4c1c66757489fe884e9af11c8447f8e7cefb0943d24d3517f1a1660e14778540e75a5f824b76580c5117a')
|
|
|
|
build() {
|
|
cd "$pkgname-$pkgver"
|
|
RUSTUP_TOOLCHAIN=stable cargo build --release --locked --all-features --target-dir=target
|
|
}
|
|
|
|
check() {
|
|
cd "$pkgname-$pkgver"
|
|
RUSTUP_TOOLCHAIN=stable cargo test --locked --target-dir=target
|
|
}
|
|
|
|
package() {
|
|
cd "$pkgname-$pkgver"
|
|
|
|
# binary
|
|
install -vDm755 -t "$pkgdir/usr/bin" "target/release/$pkgname"
|
|
|
|
# licenses
|
|
install -vDm644 -t "$pkgdir/usr/share/licenses/$pkgname" LICENSE*
|
|
}
|