summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorViech2021-05-16 13:56:03 +0200
committerViech2021-05-16 13:56:03 +0200
commit34d344e6c9dee7144b68eabdff842a258c761064 (patch)
treebd3d099dc58ea2669be2c38cf5526dc428b243fd
parent04ec7020bff39fd641f3cc1d147a936b7d4abcb7 (diff)
downloadaur-34d344e6c9dee7144b68eabdff842a258c761064.tar.gz
Simplify asset download via torrent: Use aria2c directly.
-rw-r--r--.SRCINFO8
-rw-r--r--PKGBUILD31
2 files changed, 21 insertions, 18 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 9c758414e86c..0e30ab4492c9 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,13 +1,13 @@
pkgbase = unvanquished-data
pkgdesc = Game assets for Unvanquished.
pkgver = 0.52.0
- pkgrel = 1
+ pkgrel = 2
url = https://www.unvanquished.net
arch = any
license = GPL3
- makedepends = aria2>=1.18.7-2
- source = https://raw.githubusercontent.com/Unvanquished/Unvanquished/v0.52.0/download-paks
- md5sums = 6b0bce3c6cefac4c92a922afc9e47a11
+ makedepends = aria2
+ source = https://cdn.unvanquished.net/unvanquished_0.52.0.torrent
+ md5sums = e87178fed12eb1222285fd57f64cf914
pkgname = unvanquished-data
diff --git a/PKGBUILD b/PKGBUILD
index 3ba4cf183894..8add950cfb83 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,31 +1,34 @@
# Maintainer: Viech <viech unvanquished net>
-# NOTE: For 0.52.0 only, we do not copy old assets from the system because:
-# 1. The new script does not allow seeding the download like this yet.
-# 2. A full redownload is necessary for this release anyway.
-
pkgname=unvanquished-data
pkgver=0.52.0
-pkgrel=1
+pkgrel=2
pkgdesc='Game assets for Unvanquished.'
arch=('any')
url='https://www.unvanquished.net'
license=('GPL3')
-makedepends=('aria2>=1.18.7-2')
-source=("https://raw.githubusercontent.com/Unvanquished/Unvanquished/v${pkgver}/download-paks")
-md5sums=('6b0bce3c6cefac4c92a922afc9e47a11')
+makedepends=('aria2')
+source=("https://cdn.unvanquished.net/unvanquished_${pkgver}.torrent")
+md5sums=('e87178fed12eb1222285fd57f64cf914')
# Disable package compression since assets are already compressed.
PKGEXT='.pkg.tar'
prepare() {
- chmod +x "${srcdir}/download-paks"
+ cd "${srcdir}"
+
+ # Download the assets via torrent.
+ aria2c -V --seed-time=0 "unvanquished_${pkgver}.torrent"
}
-package() {
- # Create installation directory.
- install -dm755 "${pkgdir}/usr/share/unvanquished/pkg/"
+check() {
+ cd "${srcdir}/unvanquished_${pkgver}/pkg/"
- # Download assets.
- ./download-paks "${pkgdir}/usr/share/unvanquished/pkg/" "${srcdir}"
+ md5sum -c md5sums
+}
+
+package() {
+ install -d -m 755 "${pkgdir}/usr/share/unvanquished/pkg/"
+ install -m 644 "${srcdir}/unvanquished_${pkgver}/pkg/"*".dpk" \
+ "${pkgdir}/usr/share/unvanquished/pkg/"
}