blob: ac4134c9a179f88936b01be285ff9e7657b9e06c (
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
50
51
52
53
54
55
56
57
58
59
|
# Maintainer: noraj <printf %s 'YWxleGFuZHJlLnphbm5pQGV1cm9wZS5jb20='|base64 -d>
pkgname=tlrc-git
_pkgname=tlrc
pkgver=v1.8.0.r40.g2a197f2
pkgrel=1
pkgdesc='Official tldr client written in Rust.'
arch=('x86_64' 'aarch64')
url="https://github.com/tldr-pages/$_pkgname"
license=('MIT')
provides=('tldr')
conflicts=('tldr' 'tealdeer' 'tlrc' 'tlrc-bin')
makedepends=('git' 'cargo')
options=('!lto')
source=("git+https://github.com/tldr-pages/$_pkgname.git")
b2sums=('SKIP')
pkgver() {
cd $_pkgname
git describe --long --tags | sed 's/\([^-]*-g\)/r\1/;s/-/./g'
}
prepare() {
cd $_pkgname
export RUSTUP_TOOLCHAIN=stable
cargo fetch --locked --target "$(rustc -vV | sed -n 's/host: //p')"
}
check() {
cd $_pkgname
export RUSTUP_TOOLCHAIN=stable
cargo test --frozen --locked
}
build() {
cd $_pkgname
export RUSTUP_TOOLCHAIN=stable
export CARGO_TARGET_DIR=target
export COMPLETION_DIR=completions
cargo build --release --frozen --locked
}
package() {
cd $_pkgname
install -Dm 755 "target/release/tldr" "$pkgdir/usr/bin/tldr"
install -Dm 644 README.md -t "$pkgdir/usr/share/doc/$_pkgname"
install -Dm644 tldr.1 -t "$pkgdir/usr/share/man/man1"
install -Dm644 completions/tldr.bash "$pkgdir/usr/share/bash-completion/completions/tldr"
install -Dm644 completions/_tldr -t "$pkgdir/usr/share/zsh/site-functions"
install -Dm644 completions/tldr.fish -t "$pkgdir/usr/share/fish/vendor_completions.d"
install -Dm 644 LICENSE "$pkgdir/usr/share/licenses/$_pkgname/LICENSE"
}
|