blob: 4fb31cee8e2ade353ec53ea527968b3db2493d39 (
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
|
# Maintainer: iff <iff@ik.me>
pkgname="pay-respects-git"
_pkgname="pay-respects"
pkgver=0.6.12.r0.g340504a
pkgrel=1
pkgdesc="Command suggestions, command-not-found and thefuck replacement written in Rust (All modules)"
arch=('x86_64' 'aarch64' 'armv7h' 'i686')
url="https://github.com/iffse/pay-respects"
license=('AGPL-3.0-or-later')
provides=('pay-respects')
install="$_pkgname.install"
conflicts=('pay-respects')
makedepends=('cargo' 'git' 'openssl' 'pkg-config')
optdepends=(
'curl: AI requests'
)
source=($pkgname::git+$url)
sha1sums=('SKIP')
pkgver() {
cd "$pkgname"
git describe --long --tags | sed 's/^v//;s/\([^-]*-g\)/r\1/;s/-/./g'
}
prepare() {
cd "$pkgname"
export RUSTUP_TOOLCHAIN=stable
cargo fetch --locked --target "$(rustc -vV | sed -n 's/host: //p')"
}
build() {
cd "$pkgname"
export RUSTUP_TOOLCHAIN=stable
export CARGO_TARGET_DIR=target
export _DEF_PR_LIB=/usr/lib/pay-respects
cargo build --frozen --release --workspace --all-features
}
package() {
cd "$pkgname"
install -Dm755 "target/release/pay-respects" "$pkgdir/usr/bin/pay-respects"
install -Dm755 "target/release/_pay-respects-module-100-runtime-rules" "$pkgdir/usr/lib/pay-respects/_pay-respects-module-100-runtime-rules"
install -Dm755 "target/release/_pay-respects-fallback-100-request-ai" "$pkgdir/usr/lib/pay-respects/_pay-respects-fallback-100-request-ai"
install -Dm644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
}
# vim: ft=sh
|