summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlex2019-04-11 10:26:54 +0200
committerAlex2019-04-11 10:26:54 +0200
commit58a94c99e7a90c8712c689e21d72b4e8c2d8a55a (patch)
treedce1e165d2aa8825e018f6759a01d2555f8b51b8
parente14db81387d995049a9c6e46e0f9381f1622e0a2 (diff)
downloadaur-58a94c99e7a90c8712c689e21d72b4e8c2d8a55a.tar.gz
Update to v16.0b1
-rw-r--r--.SRCINFO19
-rw-r--r--PKGBUILD185
-rw-r--r--davinci-resolve-beta.install100
3 files changed, 214 insertions, 90 deletions
diff --git a/.SRCINFO b/.SRCINFO
index c368cd38702..a12e50c5f79 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,10 +1,13 @@
pkgbase = davinci-resolve-beta
- pkgdesc = Professional A/V post-production software suite
- pkgver = 15.0b8
- pkgrel = 0
- url = https://www.blackmagicdesign.com/
- arch = x86_64
+ pkgdesc = Professional A/V post-production software suite from Blackmagic Design
+ pkgver = 16.0b1
+ pkgrel = 1
+ url = https://www.blackmagicdesign.com/products/davinciresolve
+ install = davinci-resolve-beta.install
+ arch = any
license = Commercial
+ makedepends = libarchive
+ makedepends = xdg-user-dirs
depends = glu
depends = gtk2
depends = gstreamer
@@ -19,12 +22,12 @@ pkgbase = davinci-resolve-beta
depends = qt5-webkit
depends = qt5-webengine
depends = qt5-websockets
- conflicts = davinci-resolve
+ conflicts = davinci-resolve-beta
conflicts = davinci-resolve-studio
conflicts = davinci-resolve-studio-beta
options = !strip
- source = local://DaVinci_Resolve_15.0b8_Linux.zip
- sha256sums = ff4497d32a5053a585219919631fe2a8df8e7dda40a8d8ac4d9ab874195d912d
+ source = local://DaVinci_Resolve_16.0b1_Linux.zip
+ sha256sums = 7f4517cc08dde962e515ec1bdfbc65b0f1e55368f8d82d31987590e62a6be9c0
pkgname = davinci-resolve-beta
diff --git a/PKGBUILD b/PKGBUILD
index a2ba6199dd2..ba558760202 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -2,111 +2,132 @@
# Contributor: Jonathon Fernyhough <jonathon_at_manjaro_dot_org>
# You'll need to download the package archive from
-# https://www.blackmagicdesign.com/products/davinciresolve
+# 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.
pkgname=davinci-resolve-beta
_pkgname=resolve
-pkgver=15.0b8
-pkgrel=0
-pkgdesc='Professional A/V post-production software suite'
-arch=('x86_64')
-url="https://www.blackmagicdesign.com/"
+resolve_app_name=com.blackmagicdesign.resolve
+pkgver=16.0b1
+pkgrel=1
+pkgdesc='Professional A/V post-production software suite from Blackmagic Design'
+arch=('any')
+url="https://www.blackmagicdesign.com/products/davinciresolve"
license=('Commercial')
depends=('glu' 'gtk2' 'gstreamer' 'libpng12' 'lib32-libpng12' 'ocl-icd' 'openssl-1.0'
- 'opencl-driver' 'qt4' 'qt5-base' 'qt5-svg' 'qt5-webkit'
- 'qt5-webengine' 'qt5-websockets')
+ 'opencl-driver' 'qt4' 'qt5-base' 'qt5-svg' 'qt5-webkit' 'qt5-webengine' 'qt5-websockets')
+makedepends=('libarchive' 'xdg-user-dirs')
options=('!strip')
-conflicts=('davinci-resolve' 'davinci-resolve-studio' 'davinci-resolve-studio-beta')
-
-if [ ! -f ${pkgdir}/DaVinci_Resolve_${pkgver}_Linux.zip ]; then
- if [ -f $HOME/Downloads/DaVinci_Resolve_${pkgver}_Linux.zip ]; then
- ln -sfn $HOME/Downloads/DaVinci_Resolve_${pkgver}_Linux.zip ${pkgdir}
- else
- msg2 "Please remember to put a package archive DaVinci_Resolve_${pkgver}_Linux.zip in ${pkgdir} or in your Downloads directory."
- sleep 3
- fi
+conflicts=('davinci-resolve-beta' 'davinci-resolve-studio' 'davinci-resolve-studio-beta')
+install=${pkgname}.install
+
+# 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}/DaVinci_Resolve_${pkgver}_Linux.zip ]; then
+ if [ -f $DOWNLOADS_DIR/DaVinci_Resolve_${pkgver}_Linux.zip ]; then
+ ln -sfn $DOWNLOADS_DIR/DaVinci_Resolve_${pkgver}_Linux.zip ${PWD}
+ else
+ msg2 ""
+ msg2 "The package can be downloaded here: https://www.blackmagicdesign.com/products/davinciresolve/"
+ msg2 "Please remember to put a downloaded package DaVinci_Resolve_${pkgver}_Linux.zip into the build directory ${PWD} or $DOWNLOADS_DIR"
+ msg2 ""
+ fi
fi
source=("local://DaVinci_Resolve_${pkgver}_Linux.zip")
-sha256sums=('ff4497d32a5053a585219919631fe2a8df8e7dda40a8d8ac4d9ab874195d912d')
+sha256sums=('7f4517cc08dde962e515ec1bdfbc65b0f1e55368f8d82d31987590e62a6be9c0')
+
+prepare()
+{
+ # Remove udev rules (The official installer does not remove these files. This leads to the conflict "exists in the file system".)
+ confiles=$(find /usr/lib/udev/rules.d -name 75-davincipanel.rules -o -name 75-sdx.rules 2> /dev/null | awk -F/ '{print $NF}'
+ find /opt/resolve/configs -name log-conf.xml -o -name config.dat 2> /dev/null | awk -F/ '{print $NF}'
+ )
+ if [ "${confiles}" ]; then
+ msg2 "The file(s) $(echo ${confiles} | xargs | sed 's/ /, /g') already exist in your filesystem."
+ msg2 "This can lead to a conflict and the installation will fail."
+ msg2 "Please restart the installation with the --overwrite option."
+ fi
+}
-package() {
- mkdir -p "${pkgdir}/opt/${_pkgname}/"{bin,configs,Media}
+package()
+{
+ msg2 "Creating missing folders..."
+ mkdir -p -m 0775 "${pkgdir}/opt/${_pkgname}/"{configs,DolbyVision,easyDCP,Fairlight,GPUCache,logs,Media,"Resolve Disk Database",.crashreport,.license,.LUT}
+ mkdir -p "${pkgdir}/usr/share/"{applications,desktop-directories,icons/hicolor,mime/packages}
+# mkdir -p "${pkgdir}/tmp/${_pkgname}/"{logs,GPUCache}
+ mkdir -p "${pkgdir}/usr/lib/udev/rules.d"
+ mkdir -p "${pkgdir}/etc/xdg/menus"
msg2 "Extracting from bundle..."
+ msg "Please wait, this take a while..."
cd "${srcdir}" || exit
- ./DaVinci_Resolve_${pkgver}_Linux.sh --tar xf -C "${pkgdir}/opt/${_pkgname}"
+ bsdtar x -f DaVinci_Resolve_${pkgver}_Linux.run -C "${pkgdir}/opt/${_pkgname}"
- msg2 "Extracting library archives..."
+ msg2 "Add lib symlinks..."
cd "${pkgdir}/opt/${_pkgname}/" || exit
- gunzip -f LUT/trim_lut0.dpx.gz
- for archive in libs/*tgz; do
- tar xf "${archive}" -C libs/
- rm -f "${archive}"
- done
+ ln -s /usr/lib/libcrypto.so.1.0.0 libs/libcrypto.so.10
+ ln -s /usr/lib/libssl.so.1.0.0 libs/libssl.so.10
- msg2 "Relocate binaries and config..."
+ msg2 "Install launchers and configs..."
cd "${pkgdir}/opt/${_pkgname}/" || exit
- local _binaries=(
- BMDPanelFirmware
- DPDecoder
- ShowDpxHeader
- TestIO
- bandwidthTest
- bmdpaneld
- deviceQuery
- oclBandwidthTest
- oclDeviceQuery
- qt.conf
- )
- for binary in "${_binaries[@]}"; do
- mv "rsf/${binary}" "bin/${binary}"
+ install -Dm666 share/default-config.dat "${pkgdir}/opt/${_pkgname}/configs/config.dat"
+ install -Dm666 share/log-conf.xml "${pkgdir}/opt/${_pkgname}/configs/log-conf.xml"
+ install -Dm666 share/default_cm_config.bin "${pkgdir}/opt/${_pkgname}/DolbyVision/config.bin"
+ install -Dm644 share/DaVinciResolve.desktop "${pkgdir}/usr/share/applications/${resolve_app_name}.desktop"
+ install -Dm644 share/DaVinciResolvePanelSetup.desktop "${pkgdir}/usr/share/applications/${resolve_app_name}-Panels.desktop"
+ install -Dm644 share/DaVinciResolveInstaller.desktop "${pkgdir}/usr/share/applications/${resolve_app_name}-Installer.desktop"
+ install -Dm644 share/DaVinciResolveCaptureLogs.desktop "${pkgdir}/usr/share/applications/${resolve_app_name}-CaptureLogs.desktop"
+ install -Dm644 share/DaVinciResolve.directory "${pkgdir}/usr/share/desktop-directories/${resolve_app_name}.directory"
+ install -Dm644 share/DaVinciResolve.menu "${pkgdir}/etc/xdg/menus/${resolve_app_name}.menu"
+
+ for _file in $(find ${pkgdir}/usr/share ${pkgdir}/etc -type f -name *.desktop -o -name *.directory -o -name *.menu | xargs)
+ do
+ sed -i "s|RESOLVE_INSTALL_LOCATION|/opt/${_pkgname}|g" $_file
done
- mv resolve bin/resolve
- mv rsf/Control Control
- install -Dm666 rsf/default-config-linux.dat "${pkgdir}/opt/${_pkgname}/configs/config.dat"
- msg2 "Add lib symlinks..."
- cd "${pkgdir}/opt/${_pkgname}/" || exit
- ln -s /usr/lib/libcrypto.so.1.0.0 libs/libcrypto.so.10
- ln -s /usr/lib/libssl.so.1.0.0 libs/libssl.so.10
- ln -s /usr/lib/libgstbase-1.0.so libs/libgstbase-0.10.so.0
- ln -s /usr/lib/libgstreamer-1.0.so libs/libgstreamer-0.10.so.0
+ # This will help adding the app to favorites and prevent glitches on many desktops.
+ echo "StartupWMClass=resolve" >> "${pkgdir}/usr/share/applications/${resolve_app_name}.desktop"
- msg2 "Creating launchers..."
- cd "${srcdir}" || exit
- cat > "${srcdir}/DaVinci Resolve.desktop" << EOF
-#!/usr/bin/env xdg-open
-[Desktop Entry]
-Type=Application
-Name=DaVinci Resolve
-Comment=Professional non-linear editing
-Exec=/opt/${_pkgname}/bin/start-resolve
-Icon=/opt/${_pkgname}/rsf/DV_Resolve.png
-Terminal=false
-Categories=Multimedia;AudioVideo;Application;
-EOF
- install -Dm644 DaVinci\ Resolve.desktop "${pkgdir}/usr/share/applications/DaVinci Resolve.desktop"
-
- cat > "${srcdir}/start-resolve" << EOF
-#!/bin/sh
-mkdir -p /tmp/${_pkgname}/{logs,GPUCache}
-cd /opt/${_pkgname}
-exec bin/resolve "\$@"
-EOF
- install -Dm755 start-resolve "${pkgdir}/opt/${_pkgname}/bin/start-resolve"
-
- msg2 "Making sure file ownership is 'correct'..."
- chown -R root:root "${pkgdir}/opt"
- chmod 0777 "${pkgdir}/opt/${_pkgname}/configs"
- chmod 0777 "${pkgdir}/opt/${_pkgname}/Media"
-
- msg2 "Any final tweaks..."
- ln -s "/tmp/${_pkgname}/logs" "${pkgdir}/opt/${_pkgname}/logs"
- ln -s "/tmp/${_pkgname}/GPUCache" "${pkgdir}/opt/${_pkgname}/GPUCache"
+ msg2 "Creating and installing udev rules..."
+ echo 'SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_device", ATTRS{idVendor}=="096e", MODE="0666"' > "${pkgdir}/usr/lib/udev/rules.d/75-davincipanel.rules"
+ echo 'SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_device", ATTRS{idVendor}=="1edb", MODE="0666"' > "${pkgdir}/usr/lib/udev/rules.d/75-sdx.rules"
+ chmod 644 "${pkgdir}/usr/lib/udev/rules.d/"{75-davincipanel.rules,75-sdx.rules}
+
+# Not sure we need it
+# msg2 "Any final tweaks..."
+# ln -s "/tmp/${_pkgname}/logs" "${pkgdir}/opt/${_pkgname}/logs"
+# ln -s "/tmp/${_pkgname}/GPUCache" "${pkgdir}/opt/${_pkgname}/GPUCache"
+
+ msg2 "Installing Application icons..."
+ # Obviously not working without root rights.
+# XDG_DATA_DIRS="${pkgdir}/usr/share/icons/hicolor" xdg-icon-resource install --size 64 "${pkgdir}/opt/${_pkgname}/graphics/DV_Resolve.png" DaVinci-Resolve 2>&1 >> /dev/null
+# XDG_DATA_DIRS="${pkgdir}/usr/share/icons/hicolor" xdg-icon-resource install --size 64 "${pkgdir}/opt/${_pkgname}/graphics/DV_ResolveProj.png" DaVinci-ResolveProj 2>&1 >> /dev/null
+# XDG_DATA_DIRS="${pkgdir}/usr/share/icons/hicolor" xdg-icon-resource install --size 64 --context mimetypes "${pkgdir}/opt/${_pkgname}/graphics/DV_ResolveProj.png" application-x-resolveproj 2>&1 >> /dev/null
+# XDG_DATA_DIRS="${pkgdir}/usr/share/mime/packages" xdg-mime install --novendor "${pkgdir}/opt/${_pkgname}/share/resolve.xml" 2>&1 >> /dev/null
+ install -D -m644 graphics/DV_Resolve.png "${pkgdir}/usr/share/icons/hicolor/64x64/apps/DV_Resolve.png"
+ install -D -m644 graphics/DV_ResolveProj.png "${pkgdir}/usr/share/icons/hicolor/64x64/apps/DV_ResolveProj.png"
+
+ install -D -m644 share/resolve.xml "${pkgdir}/usr/share/mime/packages/resolve.xml"
+
+ msg2 "Setting the right permissions..."
+
+ if [ ! "$(logname 2>&1 >/dev/null)" ]; then
+ _user=$(logname)
+ _group=$(id -g -n ${_user})
+ else
+ _user=root
+ _group=root
+ fi
+
+ chown -R ${_user}:${_group} "${pkgdir}/opt/${_pkgname}/"{*,.*}
+ chown -R ${_user}:root "${pkgdir}/opt/${_pkgname}/"{configs,DolbyVision,easyDCP,Fairlight,logs,Media,'Resolve Disk Database',.crashreport,.license,.LUT}
msg2 "Done!"
}
+
+# vim: fileencoding=utf-8 sts=4 sw=4 noet
diff --git a/davinci-resolve-beta.install b/davinci-resolve-beta.install
new file mode 100644
index 00000000000..7cb3f99396d
--- /dev/null
+++ b/davinci-resolve-beta.install
@@ -0,0 +1,100 @@
+# These are fragments from the original code.
+# I do not see any need for it yet, but maybe I will be able to find out later.
+
+# echo "Removing old files..."
+# DIRS_TO_REMOVE=(
+# "Onboarding"
+# "libs"
+# "plugins"
+# "UI_Resource")
+
+# if [[ -d ${/opt/${_pkgname}} ]]; then
+# echo "Removing old files"
+# for dir in "${DIRS_TO_REMOVE[@]}"; do
+# rm -rf "/opt/${_pkgname}/$dir"
+# done
+# fi
+
+#if [[ $EUID -ne 0 ]]; then
+# # Script being run as non-root user
+# USER_UID=$EUID
+#else
+# # Script being run as root
+# USER_UID=$SUDO_UID
+# if [ -z "$USER_UID" ]; then
+# USER_UID=$PKEXEC_UID
+# fi
+# if [ -z "$USER_UID" ]; then
+# USER_UID=0
+# fi
+#fi
+
+#USER_HOME=`awk -v val=$USER_UID -F ":" '\$3==val{print \$6;exit}' /etc/passwd`
+
+# TODO: We should talk to the BMD developers about it. Pretty sensitive subject systemd @_@
+# if [[ -d ${/opt/${_pkgname}} && ${/opt/${_pkgname}} == /home/resolve* ]]; then
+# chown $USER_UID "$/opt/${_pkgname}"
+# else
+# # Uninstall the panel daemon only on Standalone install
+# # Uninstall BMD panel daemon
+# SVC_NAME=bmdpaneld
+
+# # Kill the daemon in case it is running
+# killall -9 ${SVC_NAME}
+
+# if [ -f /etc/init.d/${SVC_NAME} ]; then
+# echo "#Uninstalling BMD panel service..."
+# service ${SVC_NAME} stop
+# /sbin/chkconfig --del ${SVC_NAME}
+# rm -f /etc/init.d/${SVC_NAME}
+# fi
+# mkdir -m 0775 -p "$/opt/${_pkgname}"
+# chown $USER_UID "$/opt/${_pkgname}" -R
+# fi
+
+post_install()
+{
+ echo "Updating icon cache..."
+ gtk-update-icon-cache "share/icons/hicolor" -f 2>&1 >> /dev/null
+ update-mime-database "share/mime/" 2>&1 >> /dev/null
+
+ echo "Installing the default app associations..."
+ if [ ! "$(grep -ir 'application/x-resolveproj=com.blackmagicdesign.resolve.desktop' /usr/share/applications/defaults.list)" ]; then
+ echo "application/x-resolveproj=com.blackmagicdesign.resolve.desktop" /usr/share/applications/defaults.list
+ fi
+
+ if [ ! "$(grep -ir 'application/x-resolveproj=com.blackmagicdesign.resolve.desktop;' /usr/share/applications/mimeinfo.cache)" ]; then
+ echo "/application\/x-resolveproj=com.blackmagicdesign.resolve.desktop;/d" /usr/share/applications/mimeinfo.cache
+ fi
+
+ # reload the udev rules
+ udevadm control --reload-rules 2>&1
+ udevadm trigger 2>&1
+
+ # Ensure panel permissions are correctly set for the current session
+ DEVICES=`lsusb | grep "ID 1edb\|ID 096e" | sed -e "s/:/ /g" | awk '{print"/dev/bus/usb/"$2"/"$4}'`
+ for DEV in $DEVICES
+ do
+ echo "Fixing usb permissions for $DEV"
+ chmod a+w $DEV
+ done
+}
+
+post_remove()
+{
+ # Remove entry from /usr/share/applications/defaults.list
+ if [ "$(grep -ir 'application/x-resolveproj=com.blackmagicdesign.resolve.desktop' /usr/share/applications/defaults.list)" ]; then
+ sed -i '/application\/x-resolveproj=com.blackmagicdesign.resolve.desktop/d' /usr/share/applications/defaults.list
+ fi
+
+ # Removing entry from /usr/share/applications/mimeinfo.cache
+ if [ "$(grep -ir 'application/x-resolveproj=com.blackmagicdesign.resolve.desktop;' /usr/share/applications/mimeinfo.cache)" ]; then
+ sed -i '/application\/x-resolveproj=com.blackmagicdesign.resolve.desktop;/d' /usr/share/applications/mimeinfo.cache
+ fi
+
+ # Remove udev rules
+ for rules in /usr/lib/udev/rules.d/75-davincipanel.rules /usr/lib/udev/rules.d/75-sdx.rules
+ do
+ [[ -f $rules ]] && rm -rf $rules
+ done
+}