blob: 1cc1ca826e5debb60d83e78c7e420c850189d7a6 (
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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
|
# Maintainer: Vitalii Kuzhdin <vitaliikuzhdin@gmail.com>
pkgname="phylum"
pkgver=7.5.0
pkgrel=1
pkgdesc="Command line interface for the Phylum API"
arch=('aarch64' 'x86_64')
url="https://phylum.io"
_url="https://github.com/phylum-dev/cli"
license=('MIT')
depends=('gcc-libs' 'glibc' 'zlib')
makedepends=('cargo')
_pkgsrc="cli-${pkgver}"
source=("${_pkgsrc}.tar.gz::${_url}/archive/refs/tags/v${pkgver}.tar.gz")
b2sums=('c26126d9892a7326910a173a766647f8d673a91451612579e6292c0a3a3b5583b35222dbaf4828a1e0233c24c32f4229b64737b0a4f550817a6b38f07140a9a9')
prepare() {
cd "${srcdir}/${_pkgsrc}"
export RUSTUP_TOOLCHAIN=stable
cargo fetch --locked --target "$(rustc -vV | sed -n 's/host: //p')"
}
build() {
cd "${srcdir}/${_pkgsrc}"
export RUSTUP_TOOLCHAIN=stable
export CARGO_TARGET_DIR=target
cargo build --frozen --release --all-features
cargo run --package xtask gencomp
}
check() {
cd "${srcdir}/${_pkgsrc}"
export RUSTUP_TOOLCHAIN=stable
cargo test --frozen --all-features
}
package() {
cd "${srcdir}/${_pkgsrc}"
install -vDm644 "README.md" "${pkgdir}/usr/share/doc/${pkgname}/README.md"
install -vDm644 "LICENSE" "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
cd "target"
install -vDm755 "release/${pkgname}" "${pkgdir}/usr/bin/${pkgname}"
cd "completions"
install -vDm644 "${pkgname}.bash" "${pkgdir}/usr/share/bash-completion/completions/${pkgname}"
install -vDm644 "${pkgname}.fish" "${pkgdir}/usr/share/fish/vendor_completions.d/${pkgname}.fish"
install -vDm644 "_${pkgname}" "${pkgdir}/usr/share/zsh/site-functions/_${pkgname}"
}
|