summarylogtreecommitdiffstats
path: root/PKGBUILD
diff options
context:
space:
mode:
authorPerry Hung2016-03-30 01:26:34 -0400
committerPerry Hung2016-03-30 01:30:31 -0400
commit98abbb9876ee45618215325e22a9afe2cf86d11f (patch)
treee99e8a144d95addaafbe13041c3121cca095bb1d /PKGBUILD
parentd1168bd47ddb02bfd0ba31212aacf750d9fbdaaf (diff)
downloadaur-98abbb9876ee45618215325e22a9afe2cf86d11f.tar.gz
fetch tarball directly from Blackmagic
Blackmagic hosts Desktop Video versions behind expiring links. Retrieve the archive through one of these temporary links and verify the checksum.
Diffstat (limited to 'PKGBUILD')
-rw-r--r--PKGBUILD16
1 files changed, 13 insertions, 3 deletions
diff --git a/PKGBUILD b/PKGBUILD
index 65729ba6ac3..6a2c13187e7 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -9,16 +9,26 @@ pkgdesc="Drivers for Blackmagic Design DeckLink, Intensity or Multibridge video
arch=('i686' 'x86_64')
url="http://www.blackmagic-design.com/products/"
license=('custom')
+makedepends=('curl')
depends=('linux-headers' 'libxml2' 'libpng12' 'glu' 'qt4')
options=('!strip' 'staticlibs')
install='decklink.install'
-source=("file://Blackmagic_Desktop_Video_Linux_${pkgver%a*}.tar")
-sha256sums=('da743c87b3af7fb50b3d17af67b75b253141896540589aa6119ecaed21979142')
-
[ "$CARCH" = "i686" ] && _arch='i386'
[ "$CARCH" = "x86_64" ] && _arch='x86_64'
+pkgsrc_url="https://www.blackmagicdesign.com/api/register/us/download/3f0844bdcfc24fd1a631aeca0d2cefe6"
+pkgsrc_file=$pkgname-${_dvver}.tar.gz
+pkgsrc_sha256sum="da743c87b3af7fb50b3d17af67b75b253141896540589aa6119ecaed21979142"
+
+prepare() {
+ temp_url=`curl --data '{country":"us","platform":"Linux"}' $pkgsrc_url`
+ curl -o $pkgsrc_file $temp_url
+ shasum=`sha256sum $pkgsrc_file | cut -d " " -f1`
+ [ "${shasum}" != "${pkgsrc_sha256sum}" ] && ( echo "Integrity check failed."; exit 1 )
+ tar xf ${pkgsrc_file}
+}
+
package() {
mkdir -p "$pkgdir/usr/share/licenses/$pkgname"
ln -s /usr/share/doc/desktopvideo/License.txt "$pkgdir/usr/share/licenses/$pkgname/COPYING"