blob: ef489dfd3e1210e8a73043aae06eff3d6066d195 (
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
|
# Maintainer: Dominik Nakamura <dnaka91@gmail.com>
# https://github.com/dnaka91/pkgbuilds
pkgname=cargo-hatch
pkgver=0.4.2
pkgrel=2
pkgdesc="Hatch new projects like a chick coming out of its egg"
arch=('aarch64' 'i686' 'x86_64')
url="https://github.com/dnaka91/cargo-hatch"
license=('AGPL-3.0-only')
depends=('gcc-libs' 'openssl' 'zlib')
makedepends=('cargo' 'git' 'libgit2' 'libssh2')
source=("$pkgname-$pkgver.tar.gz::$url/archive/v$pkgver.tar.gz")
b2sums=('ea3d9300012e8c663464c68645ac926f6ae75bb13c2d313a464d3efc718e60bef49caf297a6d6c77b65dfdab48b04fb30b8c99ebfc54aff26f4a06021b84840a')
prepare() {
cd "$pkgname-$pkgver"
cargo fetch --locked --target "$CARCH-unknown-linux-gnu"
}
build() {
cd "$pkgname-$pkgver"
export RUSTUP_TOOLCHAIN=stable
export CARGO_TARGET_DIR=target
cargo build --frozen --release --all-features
}
check() {
cd "$pkgname-$pkgver"
export RUSTUP_TOOLCHAIN=stable
cargo test --frozen --all-features
}
package() {
cd "$pkgname-$pkgver"
install -Dm 755 target/release/"$pkgname" -t "$pkgdir"/usr/bin
install -Dm 644 LICENSE -t "$pkgdir"/usr/share/licenses/"$pkgname"
install -Dm 644 README.md -t "$pkgdir"/usr/share/doc/"$pkgname"
install -dm 755 "$pkgdir"/usr/share/{bash-completion/completions,fish/vendor_completions.d,zsh/site-functions}/
./target/release/"$pkgname" hatch completions bash > "$pkgdir"/usr/share/bash-completion/completions/"$pkgname"
./target/release/"$pkgname" hatch completions fish > "$pkgdir"/usr/share/fish/vendor_completions.d/"$pkgname".fish
./target/release/"$pkgname" hatch completions zsh > "$pkgdir"/usr/share/zsh/site-functions/_"$pkgname"
install -dm 755 "$pkgdir"/usr/share/man/man1/
./target/release/"$pkgname" hatch manpages "$pkgdir"/usr/share/man/man1
}
|