addpkg: cargo-geiger 0.11.1-1
This commit is contained in:
parent
496ac9485c
commit
458f4c942e
1 changed files with 45 additions and 0 deletions
45
cargo-geiger/PKGBUILD
Normal file
45
cargo-geiger/PKGBUILD
Normal file
|
@ -0,0 +1,45 @@
|
|||
# Maintainer: George Rawlinson <grawlinson@archlinux.org>
|
||||
|
||||
pkgname=cargo-geiger
|
||||
pkgver=0.11.1
|
||||
pkgrel=1
|
||||
pkgdesc="Detects usage of unsafe Rust in a Rust crate and its dependencies"
|
||||
arch=('x86_64')
|
||||
url="https://github.com/rust-secure-code/cargo-geiger"
|
||||
license=('Apache' 'MIT')
|
||||
depends=('curl')
|
||||
makedepends=('rust')
|
||||
source=("$pkgname-$pkgver.tar.gz::$url/archive/$pkgname-$pkgver.tar.gz")
|
||||
b2sums=('01117f80b72de3cf145bb549cd6a5775b99c3ef37aad4972aa842d03decd68a7bd7ed1a32358070fb6836d64da1fe011a232c7ba46c91f0dbf7b0847681ebb97')
|
||||
|
||||
prepare() {
|
||||
# remove redundant pkgname
|
||||
mv "$pkgname-$pkgname-$pkgver" "$pkgname-$pkgver"
|
||||
|
||||
# download dependencies
|
||||
cd "$pkgname-$pkgver"
|
||||
cargo fetch --locked --target "$CARCH-unknown-linux-gnu"
|
||||
}
|
||||
|
||||
build() {
|
||||
cd "$pkgname-$pkgver"
|
||||
cargo build --release --frozen
|
||||
}
|
||||
|
||||
check() {
|
||||
cd "$pkgname-$pkgver"
|
||||
cargo test --frozen
|
||||
}
|
||||
|
||||
package() {
|
||||
cd "$pkgname-$pkgver"
|
||||
|
||||
# binary
|
||||
install -vDm755 -t "$pkgdir/usr/bin" "target/release/$pkgname"
|
||||
|
||||
# licenses
|
||||
install -vDm644 -t "$pkgdir/usr/share/licenses/$pkgname" cargo-geiger/LICENSE*
|
||||
|
||||
# documentation
|
||||
install -vDm644 -t "$pkgdir/usr/share/doc/$pkgname" *.md
|
||||
}
|
Loading…
Reference in a new issue