From ecd0a85821c99fe5bc16727693537d3653d92505 Mon Sep 17 00:00:00 2001 From: rafasc Date: Mon, 14 Dec 2015 19:31:06 +0000 Subject: [PATCH] Include version on filename of downloaded sources Some aur helpers cache downloaded sources to prevent unnecessary file transfers. Ckan.exe doesn't have a version descriptive name. So when the user tries to upgrade the package the helper may use the previous version present on cache (because the file name matches) but it will fail to build because the checksum differ. (Or reinstall the previous version if the user decides to skip the checksum). --- PKGBUILD | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/PKGBUILD b/PKGBUILD index d917141..022edfa 100644 --- a/PKGBUILD +++ b/PKGBUILD @@ -2,7 +2,7 @@ pkgname=ckan pkgver=1.16.0 -pkgrel=1 +pkgrel=2 pkgdesc='All you need to find, install, and manage mods for Kerbal Space Program (ksp)' arch=('any') url="https://github.com/KSP-CKAN/CKAN/" @@ -10,13 +10,12 @@ license=('MIT') depends=('curl' 'mono') conflicts=('ckan-git') -source=("https://github.com/KSP-CKAN/CKAN/releases/download/v${pkgver}/ckan.exe") +source=("${pkgname}-v${pkgver}.exe::https://github.com/KSP-CKAN/CKAN/releases/download/v${pkgver}/ckan.exe") sha256sums=('15c0c4a2fe876a560a53d0c706e0398bbc0e8058c355d7fa31e12c66acad4ca0') package() { mkdir -p "$pkgdir/usr/bin/" - cp "$srcdir/ckan.exe" "$pkgdir/usr/bin/ckan" + cp "$srcdir/$pkgname-v$pkgver.exe" "$pkgdir/usr/bin/ckan" chmod 755 "$pkgdir/usr/bin/ckan" } -