summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorThéo Le Calvar2019-02-21 11:24:30 +0100
committerThéo Le Calvar2019-02-21 11:24:30 +0100
commita7278365ee6b084c7219709aa3f88df85954f608 (patch)
treea400c8274110a39e90e7296c3e675c0341339855
parent2ea94cc0054b0152442a77d4f38023151db0512f (diff)
downloadaur-a7278365ee6b084c7219709aa3f88df85954f608.tar.gz
apply fix from @lukas2511, remove decklink.install file (unused)
-rw-r--r--PKGBUILD41
-rw-r--r--decklink.install77
2 files changed, 23 insertions, 95 deletions
diff --git a/PKGBUILD b/PKGBUILD
index f1aea952268..3d996a4605a 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,7 +1,7 @@
-# Maintainers: Perry Hung <perry@leaflabs.com> Florent Thiery <fthiery@gmail.com>
+# Maintainers: Perry Hung <perry@leaflabs.com> Florent Thiery <fthiery@gmail.com> Théo Le Calvar <tlc@kher.nl>
pkgname=decklink
pkgver=10.11.4
-pkgrel=1
+pkgrel=2
pkgdesc="Drivers for Blackmagic Design DeckLink, Intensity or Multibridge video editing cards"
arch=('i686' 'x86_64')
url="https://www.blackmagicdesign.com/support/family/capture-and-playback"
@@ -13,22 +13,23 @@ options=('!strip' 'staticlibs')
[ "$CARCH" = "i686" ] && _arch='i386'
[ "$CARCH" = "x86_64" ] && _arch='x86_64'
-pkgsrc_url="https://www.blackmagicdesign.com/api/register/us/download/f9a1f5fda76447838a8d0e5fb363dcd8"
-pkgsrc_file=$pkgname-${pkgver}.tar.gz
-pkgsrc_sha256sum="f6ef48313309a0a06e54a66e2bfd1421ff6ece93394045d2fc23669e6fbc9e0f"
-
-prepare() {
- if [ -f $pkgsrc_file ]; then
- echo "File $pkgsrc_file found, skipping download"
- else
- echo "Downloading package"
- temp_url=`curl $pkgsrc_url -H 'User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:53.0) Gecko/20100101 Firefox/53.0' -H 'Content-Type: application/json;charset=utf-8' --data '{"country":"us","platform":"Linux"}'`
- curl -o $pkgsrc_file $temp_url
- fi
- shasum=`sha256sum $pkgsrc_file | cut -d " " -f1`
- [ "${shasum}" != "${pkgsrc_sha256sum}" ] && ( echo "Integrity check failed."; exit 1 )
- tar xf ${pkgsrc_file}
-}
+_pkgsrc_url="https://www.blackmagicdesign.com/api/register/us/download/f9a1f5fda76447838a8d0e5fb363dcd8"
+_pkgsrc_file=${pkgname}-${pkgver}.tar.gz
+
+DLAGENTS=("https::/usr/bin/curl \
+ -o %o \
+ -H Referer:\ %u \
+ $(curl \
+ -s \
+ -H "User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:53.0) Gecko/20100101 Firefox/53.0" \
+ -H 'Content-Type: application/json;charset=utf-8' \
+ --data "{\"country\":\"us\",\"platform\":\"Linux\"}" \
+ "${_pkgsrc_url}" \
+ )"
+)
+
+source=("${_pkgsrc_file}"::"${_pkgsrc_url}")
+sha256sums=("f6ef48313309a0a06e54a66e2bfd1421ff6ece93394045d2fc23669e6fbc9e0f")
package() {
mkdir -p "$pkgdir/usr/share/licenses/$pkgname"
@@ -41,6 +42,10 @@ package() {
cp -a desktopvideo-*-${_arch}/* $pkgdir
rm -rf $pkgdir/usr/sbin
+ sed -ir 's/\.a/.o/' $pkgdir/usr/src/blackmagic-*/Makefile
+ mv $(echo $pkgdir/usr/src/blackmagic-$pkgver*)/bmd-support.{a,o_shipped}
+ mv $(echo $pkgdir/usr/src/blackmagic-io-$pkgver*)/blackmagic.{a,o_shipped}
+
find ${pkgdir} -name dkms.conf -exec sed -i 's|POST_INSTALL="../../lib/blackmagic/blackmagic-loader $PACKAGE_NAME $PACKAGE_VERSION"||' {} \;
tar xf mediaexpress-*-${_arch}.tar.gz
diff --git a/decklink.install b/decklink.install
deleted file mode 100644
index 4f38d74b3f3..00000000000
--- a/decklink.install
+++ /dev/null
@@ -1,77 +0,0 @@
-load_modules() {
- modprobe blackmagic
- modprobe blackmagic-io
- modprobe snd_blackmagic-io
-}
-
-unload_module() {
- echo Unloading $1
- rmmod -f $1 || true
-}
-
-unload_modules() {
- unload_module blackmagic
- unload_module snd_blackmagic_io
- unload_module blackmagic_io
-}
-
-remove_module_files() {
- rm -f /lib/modules/*/kernel/drivers/*blackmagic*.ko
- rm -rf /var/lib/dkms/blackmagic*
- rm -rf /usr/src/blackmagic*
- depmod -a
-}
-
-pre_upgrade() {
- unload_modules
- remove_module_files
-}
-
-
-## arg 1: the new package version
-pre_install() {
- true
-}
-
-## arg 1: the new package version
-post_install() {
- ldconfig
-
- cd /usr/src/blackmagic-${1%%-*}*
- #sed -i 's/..\/..\/lib\/blackmagic/\/usr\/lib\/blackmagic\/DesktopVideo/' dkms.conf
- make
- install -D -m 0644 blackmagic.ko "/lib/modules/$(uname -r)/kernel/drivers"
- make clean
-
- cd /usr/src/blackmagic-io-${1%%-*}*
- #sed -i 's/..\/..\/lib\/blackmagic/\/usr\/lib\/blackmagic\/DesktopVideo/' dkms.conf
- make
- install -D -m 0644 blackmagic-io.ko "/lib/modules/$(uname -r)/kernel/drivers"
- install -D -m 0644 snd_blackmagic-io.ko "/lib/modules/$(uname -r)/kernel/drivers"
-
- echo ">>> Updating module dependencies. Please wait..."
- depmod -a
-
- echo ">>> Loading modules..."
- load_modules
-
- update-desktop-database -q
-}
-
-## arg 1: the new package version
-## arg 2: the old package version
-post_upgrade() {
- post_install $1
-}
-
-## arg 1: the old package version
-pre_remove() {
- unload_modules
-}
-
-## arg 1: the old package version
-post_remove() {
- remove_module_files
-}
-
-# vim:set ts=2 sw=2 et: