mv ${packageDir}/etc/xdg/xfce4/helpers.rc{,.new}

mkdir -p ${packageDir}/install
cat << "EOF" > ${packageDir}/install/post-install
# Handle config files:
config() {
  local new old
  new="$1"
  old=${1%.new}
  if [ ! -r $old ]; then
    mv $new $old
  elif [ "$(md5sum $old | cut -f 1 -d ' ')" = "$(md5sum $new | cut -f 1 -d ' ')" ]; then
    rm $new
  else
    echo "You have a new config file \"${ROOT}/${new}\" at your consideration."
  fi
}

config etc/xdg/xfce4/helpers.rc.new

if [ -x /usr/bin/gtk-update-icon-cache ]; then
  /usr/bin/gtk-update-icon-cache -qfi /usr/share/icons/hicolor
fi

EOF

