blob: 02d70df47e5449c23dc55bc51690bfa226854322 (
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: justbispo <aur.fyxy0@slmail.me>
# Maintainer: George Rawlinson <grawlinson@archlinux.org>
pkgname=codeberg-cli
pkgver=0.4.6
pkgrel=1
pkgdesc='CLI Tool for Codeberg similar to gh and glab'
arch=('x86_64')
url='https://codeberg.org/Aviac/codeberg-cli'
license=('AGPL3')
depends=('gcc-libs' 'openssl')
makedepends=('cargo')
options=('!lto')
source=("$pkgname-$pkgver.tar.gz::https://static.crates.io/crates/$pkgname/$pkgname-$pkgver.crate")
sha256sums=('e95c41ffd5cb6566a2daefbc4a2c391b9daee5d9c0df5b1e7105c55a72e43356')
prepare() {
cd "$srcdir/$pkgname-$pkgver"
export RUSTUP_TOOLCHAIN=stable
cargo fetch --locked --target "$(rustc -vV | sed -n 's/host: //p')"
}
build() {
cd "$srcdir/$pkgname-$pkgver"
export RUSTUP_TOOLCHAIN=stable
export CARGO_TARGET_DIR=target
cargo build --frozen --release --all-features
for shell in bash fish zsh; do
./target/release/berg completion "$shell" > "$shell-completion"
done
}
check() {
cd "$srcdir/$pkgname-$pkgver"
export RUSTUP_TOOLCHAIN=stable
cargo test --frozen --all-features
}
package() {
cd "$srcdir/$pkgname-$pkgver"
install -Dm755 -t "$pkgdir/usr/bin/" "target/release/berg"
install -Dm644 -t "$pkgdir/usr/share/doc/$pkgname/README.md" "README.md"
install -Dm644 -t "$pkgdir/usr/share/licenses/$pkgname/LICENSE" "LICENSE"
install -Dm644 bash-completion "$pkgdir/usr/share/bash-completion/completions/berg"
install -Dm644 fish-completion "$pkgdir/usr/share/fish/vendor_completions.d/berg.fish"
install -Dm644 zsh-completion "$pkgdir/usr/share/zsh/site-functions/_berg"
}
|