Created
September 10, 2021 13:27
-
-
Save frostworx/6f1c12bdf5c0f319bcbd0ef18e3e301b to your computer and use it in GitHub Desktop.
PKGBUILD for decklink-12.1 with patch for linux-5.14
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# patch is from here: https://forum.blackmagicdesign.com/viewtopic.php?f=12&t=144876#p788448 | |
# not sure if it is worth to download it from there | |
# Maintainers: Perry Hung <perry@leaflabs.com> Florent Thiery <fthiery@gmail.com> Théo Le Calvar <tlc@kher.nl> | |
pkgbase=decklink | |
pkgname=(decklink mediaexpress) | |
_pkgname=decklink | |
pkgver=12.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" | |
license=('custom') | |
makedepends=('curl') | |
options=('!strip' 'staticlibs') | |
[ "$CARCH" = "i686" ] && _arch='i386' | |
[ "$CARCH" = "x86_64" ] && _arch='x86_64' | |
_pkgsrc_url="https://www.blackmagicdesign.com/api/register/us/download/114f976c4d3642168d24344d5f5b2afc" | |
_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}" | |
"bm_util.c_5.13.4-200.fc34.x86_64.patch" ) | |
sha256sums=('51febf247d22412beea2d637fcc34cc19b1a46df9a5bf0e157d95705bf7c7b73' | |
'20b125b64bd2d8810c4ec78f4204700449a67c6d109b9eb111b92f3fe38c2daa') | |
prepare() { | |
cd $srcdir/Blackmagic_Desktop_Video_Linux_$pkgver/other/${_arch} | |
tar xf desktopvideo-*-${_arch}.tar.gz | |
cd desktopvideo-*/usr/src/blackmagic-io-* | |
patch -p0 --input="${srcdir}/bm_util.c_5.13.4-200.fc34.x86_64.patch" | |
sed "s:^EXTRA_CFLAGS +=:EXTRA_CFLAGS += -Wno-error=incompatible-pointer-types:" -i Makefile | |
cd $srcdir/Blackmagic_Desktop_Video_Linux_$pkgver/other/${_arch} | |
cd desktopvideo-*/usr/src/blackmagic-[0-9]* | |
sed "s:^EXTRA_CFLAGS +=:EXTRA_CFLAGS += -Wno-error=incompatible-pointer-types:" -i Makefile | |
# for p in ${srcdir}/*.patch; | |
# do | |
# echo "Applying ${p}" | |
# patch --forward --strip=1 --input="${p}" | |
# done | |
} | |
package_decklink() { | |
install=decklink.install | |
depends=('dkms' 'qt5-base' 'libpng') | |
mkdir -p "$pkgdir/usr/share/licenses/$pkgbase" | |
chmod 755 "$pkgdir/usr/share/licenses/$pkgbase" | |
ln -s /usr/share/doc/desktopvideo/License.txt "$pkgdir/usr/share/licenses/$pkgbase/DesktopVideo" | |
cd $srcdir/Blackmagic_Desktop_Video_Linux_$pkgver/other/${_arch} | |
cp -a desktopvideo-*-${_arch}/* $pkgdir | |
rm -rf $pkgdir/usr/sbin | |
chmod 755 "$pkgdir/usr" | |
chmod 755 "$pkgdir/usr/share" | |
chmod 755 "$pkgdir/usr/share/doc" | |
} | |
package_mediaexpress() { | |
depends=('glu' 'qt5-base' 'qt5-svg' 'libpng' 'decklink') | |
mkdir -p "$pkgdir/usr/share/licenses/$pkgbase" | |
chmod 755 "$pkgdir/usr/share/licenses/$pkgbase" | |
ln -s /usr/share/doc/mediaexpress/License.txt "$pkgdir/usr/share/licenses/$pkgbase/MediaExpress" | |
cd $srcdir/Blackmagic_Desktop_Video_Linux_$pkgver/other/${_arch} | |
tar xf mediaexpress-*-${_arch}.tar.gz | |
cp -a mediaexpress-*-${_arch}/* $pkgdir | |
chmod 755 "$pkgdir/usr" | |
chmod 755 "$pkgdir/usr/share" | |
chmod 755 "$pkgdir/usr/share/doc" | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment