diff --git a/debian/control b/debian/control index 3ec505a..aa58554 100644 --- a/debian/control +++ b/debian/control @@ -97,6 +97,16 @@ Breaks: qubes-core-agent (<< 4.0.0-1) Description: Qubes integration for Nautilus Nautilus addons for inter-VM file copy/move/open. +Package: qubes-core-agent-thunar +Architecture: any +Depends: + thunar, + qubes-core-agent-qrexec, +Replaces: qubes-core-agent (<< 4.0.0-1) +Breaks: qubes-core-agent (<< 4.0.0-1) +Description: Qubes integration for Thunar + Thunar addons for inter-VM file copy/move/open. + Package: qubes-core-agent-dom0-updates Architecture: any Depends: diff --git a/debian/qubes-core-agent-thunar.install b/debian/qubes-core-agent-thunar.install new file mode 100644 index 0000000..388f13b --- /dev/null +++ b/debian/qubes-core-agent-thunar.install @@ -0,0 +1,3 @@ +usr/lib/qubes/qvm-actions.sh +usr/lib/qubes/uca_qubes.xml +etc/xdg/xfce4/xfconf/xfce-perchannel-xml/thunar.xml diff --git a/debian/qubes-core-agent-thunar.postinst b/debian/qubes-core-agent-thunar.postinst new file mode 100755 index 0000000..2751d1a --- /dev/null +++ b/debian/qubes-core-agent-thunar.postinst @@ -0,0 +1,56 @@ +#!/bin/bash +# postinst script for core-agent-linux +# +# see: dh_installdeb(1) + +set -e + +# The postinst script may be called in the following ways: +# * 'configure' +# * 'abort-upgrade' +# * 'abort-remove' 'in-favour' +# +# * 'abort-remove' +# * 'abort-deconfigure' 'in-favour' +# 'removing' +# +# +# For details, see http://www.debian.org/doc/debian-policy/ or +# https://www.debian.org/doc/debian-policy/ch-maintainerscripts.html or +# the debian-policy package + + +case "${1}" in + configure) + # There is no system-wide Thunar custom actions. There is only a default + # file and a user file created from the default one. Qubes actions need + # to be placed after all already defined actions and before + # the end of file. + if [ -f /etc/xdg/Thunar/uca.xml ] ; then + cp -p /etc/xdg/Thunar/uca.xml{,.bak} + sed -i '$e cat /usr/lib/qubes/uca_qubes.xml' /etc/xdg/Thunar/uca.xml + fi + if [ -f /home/user/.config/Thunar/uca.xml ] ; then + cp -p /home/user/.config/Thunar/uca.xml{,.bak} + sed -i '$e cat /usr/lib/qubes/uca_qubes.xml' /home/user/.config/Thunar/uca.xml + fi + ;; + + abort-upgrade|abort-remove|abort-deconfigure) + exit 0 + ;; + + *) + echo "postinst called with unknown argument \`${1}'" >&2 + exit 1 + ;; +esac + +# dh_installdeb will replace this with shell code automatically +# generated by other debhelper scripts. + +#DEBHELPER# + +exit 0 + +# vim: set ts=4 sw=4 sts=4 et : diff --git a/debian/qubes-core-agent-thunar.postrm b/debian/qubes-core-agent-thunar.postrm new file mode 100755 index 0000000..d19a93a --- /dev/null +++ b/debian/qubes-core-agent-thunar.postrm @@ -0,0 +1,57 @@ +#!/bin/sh +# postrm script for core-agent-linux +# +# see: dh_installdeb(1) + +set -e + +# The prerm script may be called in the following ways: +# * 'remove' +# * 'purge' +# * 'upgrade' +# * 'disappear' +# +# The postrm script is called after the package's files have been removed +# or replaced. The package whose postrm is being called may have previously been +# deconfigured and only be "Unpacked", at which point subsequent package changes +# do not consider its dependencies. Therefore, all postrm actions may only rely +# on essential packages and must gracefully skip any actions that require the +# package's dependencies if those dependencies are unavailable.[48] +# +# * 'failed-upgrade' +# +# Called when the old postrm upgrade action fails. The new package will be +# unpacked, but only essential packages and pre-dependencies can be relied on. +# Pre-dependencies will either be configured or will be "Unpacked" or +# "Half-Configured" but previously had been configured and was never removed. +# +# * 'abort-install' +# * 'abort-install' +# * 'abort-upgrade' +# +# Called before unpacking the new package as part of the error handling of +# preinst failures. May assume the same state as preinst can assume. +# +# For details, see http://www.debian.org/doc/debian-policy/ or +# https://www.debian.org/doc/debian-policy/ch-maintainerscripts.html or +# the debian-policy package + +if [ "${1}" = "remove" ] ; then + if [ -f /etc/xdg/Thunar/uca.xml ] ; then + mv /etc/xdg/Thunar/uca.xml{,.uninstall} + mv /etc/xdg/Thunar/uca.xml{.bak,} + fi + if [ -f /home/user/.config/Thunar/uca.xml ] ; then + mv /home/user/.config/Thunar/uca.xml{,.uninstall} + mv /home/user/.config/Thunar/uca.xml{.bak,} + fi +fi + +# dh_installdeb will replace this with shell code automatically +# generated by other debhelper scripts. + +#DEBHELPER# + +exit 0 + +# vim: set ts=4 sw=4 sts=4 et :