blob: b0baab062ddbc8f95e97b4c365beb2c7359c4ca3 (
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
|
# Maintainer: Mark Wagie <mark dot wagie at proton dot me>
# Co-Maintainer: Thomas Schoenauer <t.schoenauer@hgs-wt.at>
# Contributor: Roey Darwish Dror <roey.ghost@gmail.com>
pkgname=topgrade
pkgver=16.0.2
pkgrel=1
pkgdesc="Upgrade all the things"
arch=('x86_64' 'aarch64')
url="https://topgrade-rs.github.io"
license=('GPL-3.0-or-later')
depends=('gcc-libs')
makedepends=('cargo')
source=("$pkgname-$pkgver.tar.gz::https://github.com/topgrade-rs/topgrade/archive/refs/tags/v$pkgver.tar.gz")
sha256sums=('9cbaf60a44a1ba76c51d4a44e4fe4e7567ffbbb8c5c3b5751dfbdafd161f8230')
prepare() {
cd "$pkgname-$pkgver"
export RUSTUP_TOOLCHAIN=stable
cargo fetch --locked --target "$(rustc -vV | sed -n 's/host: //p')"
}
build() {
cd "$pkgname-$pkgver"
CFLAGS+=" -ffat-lto-objects"
export RUSTUP_TOOLCHAIN=stable
export CARGO_TARGET_DIR=target
cargo build --frozen --release
# Generate completions
for shell in bash fish zsh; do
./"target/release/$pkgname" --gen-completion "${shell}" > "$pkgname.${shell}"
done
# Generate man page
./"target/release/$pkgname" --gen-manpage > "$pkgname.1"
}
check() {
cd "$pkgname-$pkgver"
export RUSTUP_TOOLCHAIN=stable
cargo test --frozen
}
package() {
cd "$pkgname-$pkgver"
install -Dm755 "target/release/$pkgname" -t "$pkgdir/usr/bin/"
install -Dm644 "$pkgname.1" -t "$pkgdir/usr/share/man/man1/"
install -Dm644 "$pkgname.bash" "$pkgdir/usr/share/bash-completion/completions/$pkgname"
install -Dm644 "$pkgname.fish" -t "$pkgdir/usr/share/fish/vendor_completions.d/"
install -Dm644 "$pkgname.zsh" "$pkgdir/usr/share/zsh/site-functions/_$pkgname"
install -Dm644 config.example.toml -t "$pkgdir/usr/share/doc/$pkgname/"
}
|