diff options
-rw-r--r-- | .SRCINFO | 4 | ||||
-rw-r--r-- | PKGBUILD | 2 | ||||
-rw-r--r-- | decklink.install | 49 |
3 files changed, 38 insertions, 17 deletions
@@ -1,9 +1,9 @@ # Generated by mksrcinfo v8 -# Thu Feb 1 11:23:03 UTC 2018 +# Thu Feb 1 12:08:32 UTC 2018 pkgbase = decklink pkgdesc = Drivers for Blackmagic Design DeckLink, Intensity or Multibridge video editing cards pkgver = 10.9.10 - pkgrel = 3 + pkgrel = 4 url = https://www.blackmagicdesign.com/support/family/capture-and-playback install = decklink.install arch = i686 @@ -1,7 +1,7 @@ # Maintainers: Perry Hung <perry@leaflabs.com> Florent Thiery <fthiery@gmail.com> pkgname=decklink pkgver=10.9.10 -pkgrel=3 +pkgrel=4 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" diff --git a/decklink.install b/decklink.install index 077c31151f39..4f38d74b3f30 100644 --- a/decklink.install +++ b/decklink.install @@ -1,3 +1,33 @@ +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 @@ -8,11 +38,13 @@ 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" @@ -21,36 +53,25 @@ post_install() { depmod -a echo ">>> Loading modules..." - modprobe blackmagic - modprobe blackmagic-io - modprobe snd_blackmagic-io + load_modules update-desktop-database -q } ## arg 1: the new package version ## arg 2: the old package version -pre_upgrade() { - lsmod | grep blackmagic && modprobe -r blackmagic || true - lsmod | grep snd_blackmagic_io && rmmod -f snd_blackmagic_io || true - lsmod | grep blackmagic_io && rmmod -f blackmagic_io || true - rm -f "/lib/modules/*/kernel/drivers/*blackmagic*.ko" -} - -## 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() { - lsmod | grep blackmagic && modprobe -r blackmagic || true + unload_modules } ## arg 1: the old package version post_remove() { - rm -f "/lib/modules/*/kernel/drivers/*blackmagic*.ko" + remove_module_files } # vim:set ts=2 sw=2 et: |