Added the package topgrade

This commit is contained in:
Sayantan Santra 2022-12-18 13:31:56 -06:00
parent 3fe92250b4
commit 5b2674baa3
1 changed files with 36 additions and 0 deletions

36
topgrade/lure.sh Normal file
View File

@ -0,0 +1,36 @@
name="topgrade"
version=10.2.4
release=1
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=('49233042fa7361078e00b6b39b59672017c82ea09008ef33a603442eb62142c6')
checksums_aarch64=('5f701edde5240708da787eb6323184b047b4d01f8100a46e3e61655342ff5201')
checksums_armv7=('cf8ed999492ca4a80828bb799135ce69a9bc5381d8480ee5f6814bb567fc1911')
package() {
# binary
install -Dm755 ./topgrade "$pkgdir/usr/local/bin/topgrade"
# manpage
./topgrade --gen-manpage | sed 's/.TH Topgrade 1/.TH Topgrade 8/' > topgrade.8
install -Dm644 ./topgrade.8 "$pkgdir/usr/local/share/man/man8/topgrade.8"
# completions
if $(command -v fish &> /dev/null); 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
}