summarylogtreecommitdiffstats
path: root/PKGBUILD
diff options
context:
space:
mode:
authorDaniel Bermond2019-09-15 13:20:30 +0000
committerDaniel Bermond2019-09-15 13:44:43 +0000
commitf00d0592dff61a495878b8861fe0fd46c19e8a80 (patch)
tree5425e936cf5a47553c6fdb6e652a0b8789c34af6 /PKGBUILD
parent122e8d5d52f5c64fd266a6aabbceb998fb9551ea (diff)
downloadaur-blackmagic-decklink-sdk.tar.gz
Fix source download with curl 7.66.0
The curl update 7.65.3->7.66.0 breaks download with the following message: Warning: Binary output can mess up your terminal. Use "--output -" to tell Warning: curl to output it to your terminal anyway, or consider "--output Warning: <FILE>" to save to a file. Then it started the download and even acquired the correct total filesize (meaning that the huge download url, the one with a temporary string, was correctly acquired), but then it downloads the source file with zero size. I'm not sure where this is coming from since we were already specifying '-o %o' (--output <FILE>) in the outter curl command, and the inner curl command was not downloading any binary data (it was just getting the download url). I'm mostly sure that this is comming from some makepkg internals because the error does not happen when executing the same curl commands in the terminal. Redefined the download method and it is now downloading fine. The strange redirection message that makepkg was giving is also gone. Now we first get the download url separately and use it later in the DLAGENTS command, instead of doing everything at the same time inside DLAGENTS. I hope this continues to work.
Diffstat (limited to 'PKGBUILD')
-rw-r--r--PKGBUILD64
1 files changed, 32 insertions, 32 deletions
diff --git a/PKGBUILD b/PKGBUILD
index 912af9a1c5ad..415d5efa9ffb 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -2,21 +2,7 @@
_downloadid='a0340cfa110a4a9ebe2f0730ff30abcc'
_referid='d7c7c56fde714ba3a0757e99d07735d5'
-_srcurl="https://www.blackmagicdesign.com/api/register/us/download/${_downloadid}"
-
-pkgname=blackmagic-decklink-sdk
-pkgver=11.4
-pkgrel=1
-pkgdesc='Blackmagic DeckLink SDK'
-arch=('any')
-url='https://www.blackmagicdesign.com/support/family/capture-and-playback'
-license=('custom')
-provides=('decklink-sdk')
-conflicts=('decklink-sdk')
-source=("Blackmagic_DeckLink_SDK_${pkgver}.zip"::"$_srcurl"
- 'LICENSE')
-sha256sums=('9cfab8b1681303ba882a562b888241e32592fe1f4c172e1e7ff65b7f74e73825'
- 'cc90e53ac2ef2442d2d0adfe9214119baa31ec080e75c3b087365efdbccc23df')
+_siteurl="https://www.blackmagicdesign.com/api/register/us/download/${_downloadid}"
_useragent="User-Agent: Mozilla/5.0 (X11; Linux ${CARCH}) \
AppleWebKit/537.36 (KHTML, like Gecko) \
@@ -40,6 +26,22 @@ _reqjson="$( printf '%s' "$_reqjson" | sed 's/[[:space:]]\+/ /g')"
_useragent="$(printf '%s' "$_useragent" | sed 's/[[:space:]]\+/ /g')"
_useragent_escaped="${_useragent// /\\ }"
+_srcurl="$(curl \
+ -s \
+ -H 'Host: www.blackmagicdesign.com' \
+ -H 'Accept: application/json, text/plain, */*' \
+ -H 'Origin: https://www.blackmagicdesign.com' \
+ -H "$_useragent" \
+ -H 'Content-Type: application/json;charset=UTF-8' \
+ -H "Referer: https://www.blackmagicdesign.com/support/download/${_referid}/Linux" \
+ -H 'Accept-Encoding: gzip, deflate, br' \
+ -H 'Accept-Language: en-US,en;q=0.9' \
+ -H 'Authority: www.blackmagicdesign.com' \
+ -H 'Cookie: _ga=GA1.2.1849503966.1518103294; _gid=GA1.2.953840595.1518103294' \
+ --data-ascii "$_reqjson" \
+ --compressed \
+ "$_siteurl")"
+
DLAGENTS=("https::/usr/bin/curl \
-gqb '' -C - --retry 3 --retry-delay 3 \
-H Host:\ sw.blackmagicdesign.com \
@@ -49,23 +51,21 @@ DLAGENTS=("https::/usr/bin/curl \
-H Accept-Language:\ en-US,en;q=0.9 \
-o %o \
--compressed \
- $(curl \
- -s \
- -H 'Host: www.blackmagicdesign.com' \
- -H 'Accept: application/json, text/plain, */*' \
- -H 'Origin: https://www.blackmagicdesign.com' \
- -H "$_useragent" \
- -H 'Content-Type: application/json;charset=UTF-8' \
- -H "Referer: https://www.blackmagicdesign.com/support/download/${_referid}/Linux" \
- -H 'Accept-Encoding: gzip, deflate, br' \
- -H 'Accept-Language: en-US,en;q=0.9' \
- -H 'Authority: www.blackmagicdesign.com' \
- -H 'Cookie: _ga=GA1.2.1849503966.1518103294; _gid=GA1.2.953840595.1518103294' \
- --data-binary "$_reqjson" \
- --compressed \
- "$_srcurl"
- )"
-)
+ %u")
+
+pkgname=blackmagic-decklink-sdk
+pkgver=11.4
+pkgrel=2
+pkgdesc='Blackmagic DeckLink SDK'
+arch=('any')
+url='https://www.blackmagicdesign.com/support/family/capture-and-playback'
+license=('custom')
+provides=('decklink-sdk')
+conflicts=('decklink-sdk')
+source=("Blackmagic_DeckLink_SDK_${pkgver}.zip"::"$_srcurl"
+ 'LICENSE')
+sha256sums=('9cfab8b1681303ba882a562b888241e32592fe1f4c172e1e7ff65b7f74e73825'
+ 'cc90e53ac2ef2442d2d0adfe9214119baa31ec080e75c3b087365efdbccc23df')
package() {
# directories creation