pre_install() { # From pre_install.sh # uninstall_legacy_bmdPanelDaemon() # { # # 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 # } # uninstall_legacy_bmdPanelDaemon # # I've commented this out, in case such service could be provided by any package in Arch # There is bmdpaneld file in /opt/resolve/bin/, but I do not know when it is invoked # systemctl stop bmdpaneld if [ -d "/opt/resolve" ]; then echo "Setting 755 mode for /opt/resolve" chmod 755 "/opt/resolve" # to deny renaming of writable dirs fi } # post_install() { # From post_install.sh install_mime_files() # gtk-update-icon-cache "/usr/share/icons/hicolor" -f 2>&1 >> /dev/null # not needed, handled by pacman # update-mime-database "/usr/share/mime/" 2>&1 >> /dev/null # not needed, handled by pacman # udevadm control --reload-rules #2>&1 # not needed, handled by pacman # udevadm trigger #2>&1 # # not needed, handled by pacman # We do not need this, because usb permissions were already set in udev rules # ensure_usb_permissions() # { # # Ensure panel permissions are correctly set for the current session # DEVICES=`lsusb | grep "ID $1" | 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 # } # # ensure_usb_permissions "1edb" # ensure_usb_permissions "096e" # } pre_upgrade() { pre_install } # post_upgrade() { # post_install # } #pre_remove() { # do something here #} post_remove() { # From uninstall.sh # xdg-mime uninstall --novendor "${INSTALL_DIR}/share/resolve.xml" 2>&1 >> /dev/null # not needed, handled by pacman # xdg-icon-resource uninstall --size 128 DaVinci-Resolve 2>&1 >> /dev/null # not needed, removed with package # xdg-icon-resource uninstall --size 128 DaVinci-ResolveProj 2>&1 >> /dev/null # not needed, removed with package # gtk-update-icon-cache "${SHARE_DIR}/icons/hicolor" -f 2>&1 >> /dev/null # not needed, handled by pacman # update-mime-database "${SHARE_DIR}/mime/" 2>&1 >> /dev/null # not needed, handled by pacman # Remove GPUCache dir, because it did not came with package. This is done in original uninstaller. rm -rvf "/opt/resolve/GPUCache" if [ -d "/opt/resolve" ]; then echo "Setting 777 mode for /opt/resolve" # not possible in install file? chmod 777 "/opt/resolve" # to allow to rm files from install dir echo "You may need to remove /opt/resolve manually" fi }