2022-12-18 13:31:56 -06:00
|
|
|
name="topgrade"
|
2023-04-30 15:24:19 -05:00
|
|
|
version=11.0.0
|
|
|
|
release=1
|
2022-12-18 13:31:56 -06:00
|
|
|
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")
|
2023-04-30 15:24:19 -05:00
|
|
|
checksums_amd64=('7d81ddbbba2bb5968959ff2fef20714d0fdea47188119978687b6ada5e7898bb')
|
|
|
|
checksums_aarch64=('30b7ccf9e1bf52fccc97062dece32df28b7c6f70511f9f156ce28a3d9ea2db54')
|
|
|
|
checksums_armv7=('d1d4eb6287d9a833a9ae35882b4ae997f52be1b114456286088ff928d620f258')
|
2022-12-18 13:31:56 -06:00
|
|
|
package() {
|
2023-02-01 10:57:34 -06:00
|
|
|
# install binary
|
2023-04-30 15:24:19 -05:00
|
|
|
install -Dm755 ./topgrade "$pkgdir/usr/local/bin/topgrade"
|
2022-12-18 13:31:56 -06:00
|
|
|
# manpage
|
2023-03-14 14:42:25 -05:00
|
|
|
./topgrade --gen-manpage | sed 's/.TH Topgrade 1/.TH Topgrade 8/' >topgrade.8
|
2022-12-18 13:31:56 -06:00
|
|
|
install -Dm644 ./topgrade.8 "$pkgdir/usr/local/share/man/man8/topgrade.8"
|
|
|
|
# completions
|
2023-03-15 14:02:34 -05:00
|
|
|
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
|
2023-03-14 14:42:25 -05:00
|
|
|
if $(command -v bash &>/dev/null); then
|
|
|
|
./topgrade --gen-completion bash >topgrade.bash
|
|
|
|
install -Dm644 ./topgrade.bash "${pkgdir}/usr/share/bash-completion/completions/topgrade"
|
2022-12-18 13:31:56 -06:00
|
|
|
fi
|
2023-03-14 14:42:25 -05:00
|
|
|
if $(command -v zsh &>/dev/null); then
|
|
|
|
./topgrade --gen-completion zsh >topgrade.zsh
|
2022-12-18 13:31:56 -06:00
|
|
|
install -Dm644 ./topgrade.zsh "${pkgdir}/usr/share/zsh/site-functions/_topgrade"
|
|
|
|
fi
|
2023-04-30 15:24:19 -05:00
|
|
|
echo "Please add 'no_self_update = true' to your 'topgrade.toml' file to disable self updates, as it won't work with this installation"
|
2022-12-18 13:31:56 -06:00
|
|
|
}
|