lure-repo/topgrade/lure.sh

37 lines
1.9 KiB
Bash

name="topgrade"
version=12.0.2
release=2
desc="Invoke the upgrade procedure of multiple package managers"
architectures=('amd64' 'aarch64' 'armv7')
maintainer='SinTan1729'
homepage='https://github.com/topgrade-rs/topgrade'
license=('GPL3')
provides=('topgrade')
conflicts=('topgrade')
sources_amd64=("${homepage}/releases/download/v${version}/${name}-v${version}-x86_64-unknown-linux-musl.tar.gz")
sources_aarch64=("${homepage}/releases/download/v${version}/${name}-v${version}-aarch64-unknown-linux-musl.tar.gz")
sources_armv7=("${homepage}/releases/download/v${version}/${name}-v${version}-armv7-unknown-linux-gnueabihf.tar.gz")
checksums_amd64=('111b64dfd97fb77ace2d067a0a83ea5ebbdf0cf8c92681fa8bffcdc1e53c78cb')
checksums_aarch64=('683805723bcce9c0a7cc1ecf06edf49a6becaf24ea59a0e6d1bfc697b54aedca')
checksums_armv7=('5f4ceb90fe374d1c03bef0b9b3cdc995c5ea5e7d0cb5feb5c893a6cd50c13623')
package() {
# install binary
install -Dm755 ./topgrade "$pkgdir/usr/bin/topgrade"
# manpage
./topgrade --gen-manpage | sed 's/.TH Topgrade 1/.TH Topgrade 8/' >topgrade.8
install -Dm644 ./topgrade.8 "$pkgdir/usr/share/man/man8/topgrade.8"
# completions
if $(command -v fish &>/dev/null) && [ $(echo $(fish --version | awk '{print $3}')$'\n'3.4.0 | sort -V | head -n1) != '3.4.0' ]; then
./topgrade --gen-completion fish >topgrade.fish
install -Dm644 ./topgrade.fish "${pkgdir}/usr/share/fish/completions/topgrade.fish"
fi
if $(command -v bash &>/dev/null); then
./topgrade --gen-completion bash >topgrade.bash
install -Dm644 ./topgrade.bash "${pkgdir}/usr/share/bash-completion/completions/topgrade"
fi
if $(command -v zsh &>/dev/null); then
./topgrade --gen-completion zsh >topgrade.zsh
install -Dm644 ./topgrade.zsh "${pkgdir}/usr/share/zsh/site-functions/_topgrade"
fi
echo "Please add 'no_self_update = true' to your 'topgrade.toml' file to disable self updates, as it won't work with this installation"
}