name="topgrade" version=10.3.1 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=('c561de3c965e618b9af72ffcba9cecdaaf76027b0e88954fa8328267d433b6a0') checksums_aarch64=('b3ef6a99fdd4777f440402b2d708276b03f7ade80b61a0d73a7039b6896d62c7') checksums_armv7=('9702515aa7ea31d33f2c1b2a2d1f766adab8a6915f2ac499076528305a381c5d') package() { # disable self-update as it won't work echo '#!/bin/sh'$'\n\n''TOPGRADE_NO_SELF_UPGRADE=true /opt/topgrade/topgrade' > topgrade-sh # install binary install -Dm755 ./topgrade "$pkgdir/opt/topgrade/topgrade" install -Dm755 ./topgrade-sh "$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 }