summarylogtreecommitdiffstats
path: root/PKGBUILD
diff options
context:
space:
mode:
authorMartin Rys2023-07-25 01:08:24 +0200
committerMartin Rys2023-07-25 01:08:24 +0200
commit6e6da06d1e3384e5a4d73cd71740c8129aceb112 (patch)
tree6f7b65e55f021335de437b9f3c35c6980d339056 /PKGBUILD
parent895c0ff897131e98e976a5c7d066a6b71946b4a0 (diff)
downloadaur-6e6da06d1e3384e5a4d73cd71740c8129aceb112.tar.gz
Bump to 5.814, fix wget || true, tidy up
Diffstat (limited to 'PKGBUILD')
-rw-r--r--PKGBUILD37
1 files changed, 23 insertions, 14 deletions
diff --git a/PKGBUILD b/PKGBUILD
index ca87bca117f4..6568c6c0d6fc 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,6 +1,8 @@
-# Maintainer: Shayne Hartford<shayneehartford@gmail.com>
+# Maintainer: Martin Rys <rys.pw/contact>
+# Previous maintainers:
+# Shayne Hartford<shayneehartford@gmail.com>
pkgname=nvflash
-pkgver=5.792
+pkgver=5.814
pkgrel=1
pkgdesc="A tool to update the the firmware of Nvidia display adapters."
url="https://www.techpowerup.com/download/nvidia-nvflash/"
@@ -8,19 +10,26 @@ arch=('x86_64' 'i686' 'aarch64')
license=('unknown')
makedepends=('wget' 'unzip')
-build() {
- wget \
- --method POST \
- --header 'content-type: application/x-www-form-urlencoded' \
- --body-data 'id=2271&server_id=3' \
- --output-document="${pkgname}-${pkgver}.zip" \
- - "${url}" || true
-
- unzip -o "${pkgname}-${pkgver}.zip"
+prepare() {
+ wget \
+ --method POST \
+ --header 'content-type: application/x-www-form-urlencoded' \
+ --body-data 'id=2271&server_id=8' \
+ --output-document="${pkgname}-${pkgver}.zip" \
+ "${url}"
+
+# Would be nice to get rid of the wget dependency, but I can't figure it out, here's one of my attempts -
+# curl -X POST -L --post301 --post302 \
+# -H 'Content-Type: application/x-www-form-urlencoded' \
+# -H 'User-Agent: Wget/1.21.4' \
+# -d 'id=2271&server_id=8' \
+# -o "${pkgname}-${pkgver}.zip" \
+# "${url}"
+
+ unzip -o "${pkgname}-${pkgver}.zip"
}
package() {
- subd=$(echo "${arch}" | sed "s/x86_64/x64/")
- subd=$(echo "${subd}" | sed "s/i686/x32/")
- install -Dm755 "${srcdir}/${subd}/${pkgname}" "${pkgdir}/usr/bin/${pkgname}"
+ subd=$(echo "${arch}" | sed -e 's/x86_64/x64/' -e 's/i686/x32/')
+ install -Dm755 "${srcdir}/${subd}/${pkgname}" "${pkgdir}/usr/bin/${pkgname}"
}