summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrew Shark2019-09-26 23:51:36 +0300
committerAndrew Shark2019-09-26 23:51:36 +0300
commit344eb3a82fed1922d8801594b08b7d8b0001d04a (patch)
tree4545a5f564b443926d05328ea18845c1646a3bba
parent0543e50e5a01e4efe74cfd5a6772622d5594805a (diff)
downloadaur-344eb3a82fed1922d8801594b08b7d8b0001d04a.tar.gz
Added custom DLAGENTS
-rw-r--r--.SRCINFO4
-rw-r--r--PKGBUILD79
2 files changed, 61 insertions, 22 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 53265953352..86eb269afe0 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,7 +1,7 @@
pkgbase = davinci-resolve-beta
pkgdesc = Professional A/V post-production software suite from Blackmagic Design
pkgver = 16.1b3
- pkgrel = 1
+ pkgrel = 2
url = https://www.blackmagicdesign.com/support/family/davinci-resolve-and-fusion
install = davinci-resolve.install
arch = any
@@ -26,7 +26,7 @@ pkgbase = davinci-resolve-beta
conflicts = davinci-resolve-studio
conflicts = davinci-resolve-studio-beta
options = !strip
- source = local://DaVinci_Resolve_16.1b3_Linux.zip
+ source = DaVinci_Resolve_16.1b3_Linux.zip::https://sw.blackmagicdesign.com/DaVinciResolve/v16.1b3/DaVinci_Resolve_16.1b3_Linux.zip?Key-Pair-Id=APKAJTKA3ZJMJRQITVEA&Signature=pFiH0VmoaB33QyFhUv+52ZSMLrNgxjJNP8lEsQjtbSw4SxUoGbqLog4/crS+RmOx8t3bqsyZ6UG0I+/XqVOPQrw8k5w85X9Ppm+LW+/jL+joMu+sBCUc0gC+N3cChxuFKifXzUeemD2lPx1RzcCUHLPgOcUa4jMRLBBfcN6xwLhfhBk+cPWMmoDGIJE+JF/FIh0rY9YurLN4f8CIPWuXND3kqFWrjQcZ++4kSUTqR6riV7rjm+zZXHBQdJ2g5BBjqmam8uP3m2ev8qq4Jx3yH9uvnh4C0Mw5Pb5f0EcOaNaPVHsKbZ7R7iEvgG5Q41K+2V84G+agQEp5jvBDTYYQ9A==&Expires=1569541576
sha256sums = af6b84176a5aeb66432452e038f540b86d13cdec82d91e648338bd0a585e0d06
pkgname = davinci-resolve-beta
diff --git a/PKGBUILD b/PKGBUILD
index 989eac1f53b..7d7d930d769 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,17 +1,71 @@
# Maintainer: Alex S. <shantanna_at_hotmail_dot_com>
# Contributor: Jonathon Fernyhough <jonathon_at_manjaro_dot_org>
-# You'll need to download the package archive from
-# https://www.blackmagicdesign.com/support/
-
# Hardware support is limited. Nvidia cards should work fine.
# If you're running a hybrid setup, try with primusrun/optirun.
+# This was originally written by Daniel Bermond in blackmagic-decklink-sdk pkgbuild
+# It is sufficient to just replace _downloadid to correspond new release version
+# It can be obtained from chromium -> Developer Tools -> Network -> XHR -> click latest-version and copy downloadId
+_downloadid='6e39672489484c28a6f26bcf7bbdc539' # dr 16.1b3
+_referid='d7c7c56fde714ba3a0757e99d07735d5'
+_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) \
+ Chrome/77.0.3865.75 \
+ Safari/537.36"
+
+_reqjson="{ \
+ \"platform\": \"Linux\", \
+ \"country\": \"us\", \
+ \"firstname\": \"Arch\", \
+ \"lastname\": \"Linux\", \
+ \"email\": \"someone@archlinux.org\", \
+ \"phone\": \"202-555-0194\", \
+ \"state\": \"New York\", \
+ \"city\": \"AUR\", \
+ \"hasAgreedToTerms\": true, \
+ \"product\": \"Desktop Video ${pkgver} SDK\" \
+}"
+
+_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 \
+ -H Upgrade-Insecure-Requests:\ 1 \
+ -H ${_useragent_escaped} \
+ -H Accept:\ text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8 \
+ -H Accept-Language:\ en-US,en;q=0.9 \
+ -o %o \
+ --compressed \
+ %u")
+
+
pkgname=davinci-resolve-beta
_pkgname=resolve
resolve_app_name=com.blackmagicdesign.resolve
pkgver=16.1b3
-pkgrel=1
+pkgrel=2
arch=('any')
url="https://www.blackmagicdesign.com/support/family/davinci-resolve-and-fusion"
license=('Commercial')
@@ -39,22 +93,7 @@ fi
_archive=${_archive_name}.zip
_installer_binary=${_archive_name}.run
-# Trying to make the user's life easier ;o)
-msg2 "Trying to fetch the archive file if available..."
-DOWNLOADS_DIR=`xdg-user-dir DOWNLOAD`
-
-if [ ! -f ${PWD}/${_archive} ]; then
- if [ -f $DOWNLOADS_DIR/${_archive} ]; then
- ln -sfn $DOWNLOADS_DIR/${_archive} ${PWD}
- else
- msg2 ""
- msg2 "The package can be downloaded here: https://www.blackmagicdesign.com/support/family/davinci-resolve-and-fusion"
- msg2 "Please remember to put a downloaded package ${_archive}into the build directory ${PWD} or $DOWNLOADS_DIR"
- msg2 ""
- fi
-fi
-
-source=("local://${_archive}")
+source=("${_archive}"::"$_srcurl")
prepare()
{