archrelease: copy trunk to community-any
[ArchLinux/community.git] / halp / repos / community-x86_64 / PKGBUILD
blob3c5dd843d10ab06706311ef575cef4add76ea6c6
1 # Maintainer: Orhun Parmaksız <orhun@archlinux.org>
3 pkgname=halp
4 pkgver=0.1.6
5 pkgrel=1
6 pkgdesc="A CLI tool to get help with CLI tools"
7 arch=('x86_64')
8 url="https://github.com/orhun/halp"
9 license=('MIT' 'Apache')
10 depends=('gcc-libs')
11 makedepends=('cargo')
12 source=("$pkgname-$pkgver.tar.gz::$url/archive/v$pkgver.tar.gz")
13 sha512sums=('2512bbbbae98a68abb3e82473bd3cce6345473104d29f9ff383419bce30342c7180be885ff43156a9872552c290cb6f9be62e510956f96cf43aa8269d5b47f2b')
14 options=('!lto')
16 prepare() {
17   cd "$pkgname-$pkgver"
18   cargo fetch --locked --target "$CARCH-unknown-linux-gnu"
19   mkdir completions/
20   mkdir man/
23 build() {
24   cd "$pkgname-$pkgver"
25   cargo build --release --frozen
26   OUT_DIR=completions/ "./target/release/$pkgname-completions"
27   OUT_DIR=man/ "./target/release/$pkgname-mangen"
30 check() {
31   cd "$pkgname-$pkgver"
32   OUT_DIR=target cargo test --frozen
35 package() {
36   cd "$pkgname-$pkgver"
37   install -Dm 755 "target/release/$pkgname" -t "$pkgdir/usr/bin"
38   install -Dm 644 README.md -t "$pkgdir/usr/share/doc/$pkgname"
39   install -Dm 644 LICENSE-MIT -t "$pkgdir/usr/share/licenses/$pkgname"
40   install -Dm 644 "completions/$pkgname.bash" "$pkgdir/usr/share/bash-completion/completions/$pkgname"
41   install -Dm 644 "completions/$pkgname.fish" -t "$pkgdir/usr/share/fish/vendor_completions.d"
42   install -Dm 644 "completions/_$pkgname" -t "$pkgdir/usr/share/zsh/site-functions"
43   install -Dm 644 "man/$pkgname.1" -t "$pkgdir/usr/share/man/man1"
46 # vim: ts=2 sw=2 et: