1
0
Fork 0
mirror of https://github.com/SinTan1729/aur-packages.git synced 2024-12-26 16:18:35 -06:00
aur-packages/topgrade-bin/PKGBUILD

38 lines
1.9 KiB
Text
Raw Normal View History

2022-12-01 16:25:59 -06:00
# Maintainer: Sintan Santorum <c1scu0hh at anonaddy dot me>
pkgname="topgrade-bin"
_pkgname="topgrade"
pkgver=10.2.1
2022-12-01 22:29:42 -06:00
pkgrel=3
2022-12-01 16:25:59 -06:00
pkgdesc="Invoke the upgrade procedure of multiple package managers"
arch=('x86_64' 'aarch64' 'armv7')
url='https://github.com/topgrade-rs/topgrade'
license=('GPL3')
provides=('topgrade')
conflicts=('topgrade')
source_x86_64=("topgrade.tar.gz::$url/releases/download/v$pkgver/$_pkgname-v$pkgver-x86_64-unknown-linux-musl.tar.gz")
source_aarch64=("topgrade.tar.gz::$url/releases/download/v$pkgver/$_pkgname-v$pkgver-aarch64-unknown-linux-musl.tar.gz")
source_armv7=("topgrade.tar.gz::$url/releases/download/v$pkgver/$_pkgname-v$pkgver-armv7-unknown-linux-gnueabihf.tar.gz")
b2sums_x86_64=('37509bb0ff9af7dc6024580c18990b9ea51caa007a0a751af276b92473d17ec1b10dd26f38b3ad9a2ca4e4edad224057002b54ae36454a0992557734deff511c')
b2sums_aarch64=('515e7f431640fe461557fe19aca6eb4442fe71cbfb7440b4cf90a7787f4ba5ba9d54360609b3e311be9a59ba1aabe8c4d79cbdbd87cf68405a359a9ec6e77ed1')
b2sums_armv7=('3d856d765f6066cd5a5773d81c3dc1e152056740825d07e5a93666d13e70cec450ceb37694179003f0b090dfb7737b345175c2e66168b24615a0cb1437defd4d')
package() {
# binary
install -Dm755 ./topgrade "$pkgdir/usr/local/bin/topgrade"
# manpage
2022-12-01 22:29:42 -06:00
./topgrade --gen-manpage | sed 's/.TH Topgrade 1/.TH Topgrade 8/' > topgrade.8
install -Dm644 ./topgrade.8 "$pkgdir/usr/local/man/man8/topgrade.8"
2022-12-01 17:00:36 -06:00
# completions
if $(command -v fish &> /dev/null); then
2022-12-01 22:29:42 -06:00
./topgrade --gen-completion fish > topgrade.fish
install -Dm644 ./topgrade.fish "${pkgdir}/usr/share/fish/completions/topgrade.fish"
2022-12-01 17:00:36 -06:00
fi
if $(command -v bash &> /dev/null); then
2022-12-01 22:29:42 -06:00
./topgrade --gen-completion bash > topgrade.bash
install -Dm644 ./topgrade.bash "${pkgdir}/usr/share/bash-completion/completions/topgrade"
2022-12-01 17:00:36 -06:00
fi
if $(command -v zsh &> /dev/null); then
2022-12-01 22:29:42 -06:00
./topgrade --gen-completion zsh > topgrade.zsh
install -Dm644 ./topgrade.zsh "${pkgdir}/usr/share/zsh/site-functions/_topgrade"
2022-12-01 17:00:36 -06:00
fi
2022-12-01 16:25:59 -06:00
}