This repository has been archived by the owner on May 20, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 291
/
Copy pathPKGBUILD
52 lines (46 loc) · 1.67 KB
/
PKGBUILD
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
50
51
52
# Maintainer: Orhun Parmaksız <[email protected]>
# Maintainer: Caleb Maclennan <[email protected]>
# Contributor: Stephen Gregoratto <[email protected]>
# Contributor: Ossama Hjaji <[email protected]>
pkgname=onefetch
_commit='e42360d1569cfab87d2f4d11a8c42e3401bd699f'
pkgver=2.17.1
pkgrel=1
pkgdesc="Git repository summary on your terminal"
url="https://github.com/o2sh/onefetch"
license=('MIT')
arch=('x86_64')
depends=('libgit2.so')
makedepends=('cargo' 'cmake' 'git')
checkdepends=('git')
source=("$pkgname::git+$url.git#commit=$_commit")
sha512sums=('SKIP')
prepare() {
cd "$pkgname"
cargo fetch --locked --target "$CARCH-unknown-linux-gnu"
mkdir -p completions
}
build() {
cd "$pkgname"
CFLAGS+=' -ffat-lto-objects'
cargo build --frozen --release --all-features
local _completion="target/release/$pkgname --generate"
$_completion bash > "completions/$pkgbase"
$_completion fish > "completions/$pkgbase.fish"
$_completion zsh > "completions/_$pkgbase"
}
check() {
cd "$pkgname"
cargo test --frozen --all-features -- --skip "info::tests::test_style_subtitle"
}
package() {
cd "$pkgname"
install -Dm 755 "target/release/$pkgname" "$pkgdir/usr/bin/$pkgname"
install -Dm 644 README.md -t "$pkgdir/usr/share/doc/$pkgname"
install -Dm 644 LICENSE.md -t "$pkgdir/usr/share/licenses/$pkgname"
install -Dm 644 "docs/$pkgname.1" "$pkgdir/usr/share/man/man1/$pkgname.1"
install -Dm 664 "completions/$pkgname" -t "$pkgdir/usr/share/bash-completion/completions/"
install -Dm 664 "completions/$pkgname.fish" -t "$pkgdir/usr/share/fish/vendor_completions.d/"
install -Dm 664 "completions/_$pkgname" -t "$pkgdir/usr/share/zsh/site-functions/"
}
# vim: ts=2 sw=2 et: