--- owncloudclient-2.3.3-nightly20170826.orig/debian/owncloud-client-nautilus.install
+++ owncloudclient-2.3.3-nightly20170826/debian/owncloud-client-nautilus.install
@@ -0,0 +1,1 @@
+usr/share/nautilus-python/extensions/syncstate-*.py
--- owncloudclient-2.3.3-nightly20170826.orig/debian/changelog
+++ owncloudclient-2.3.3-nightly20170826/debian/changelog
@@ -0,0 +1,334 @@
+owncloud-client-overlays (2.3.3~nightly20170826-8264) stable; urgency=low
+
+  * version number update by debtransform
+
+ -- debtransform <build@opensuse.org>  Sat, 26 Aug 2017 04:38:34 +0000
+
+owncloud-client-overlays (2.3.3~nightly20170826-1) stable; urgency=low
+
+  * Updated to 2.3.3~nightly20170826
+  * The above changelog entry is autogenerated.
+
+  Automatically generated branding added. Version=2.3.0
+  created by: ./genbranding.pl (V1.13) -o -p isv:ownCloud:community:testing owncloudclient-2.3.0beta1.tar.xz ownCloud.tar.xz
+
+
+ -- ownCloud Jenkins <jenkins@owncloud.com>  Wed, 08 Feb 2017 14:33:06 +0000
+
+owncloud-client-overlays (2.3.0~pre1-2) stable; urgency=low
+
+  * Reverted according to https://github.com/owncloud/client/issues/5470#issuecomment-275680311
+
+ -- Jürgen Weigert <jw@owncloud.com>  Fri, 03 Feb 2017 14:32:37 +0100
+
+owncloud-client-overlays (2.2.4) stable; urgency=low
+
+  Automatically generated branding added. Version=2.2.4
+  created by: ./genbranding.pl (V1.13) -o -p isv:ownCloud:desktop owncloudclient-2.2.4.tar.xz ownCloud.tar.xz
+
+
+ -- ownCloud Jenkins <jenkins@owncloud.com>  Tue, 27 Sep 2016 09:15:49 +0000
+
+owncloud-client-overlays (2.2.3) stable; urgency=low
+
+  Automatically generated branding added. Version=2.2.3
+  created by: ./genbranding.pl (V1.13) -o -p isv:ownCloud:desktop owncloudclient-2.2.3.tar.xz ownCloud.tar.xz
+
+
+ -- ownCloud Jenkins <jenkins@owncloud.com>  Mon, 08 Aug 2016 13:49:54 +0000
+
+owncloud-client-overlays (2.2.2-1) stable; urgency=medium
+
+  * fix missing translations, by adding a separate zip.
+    https://github.com/owncloud/client/issues/4987
+    https://github.com/owncloud/client/issues/4956
+
+ -- Jürgen Weigert <jw@owncloud.com>  Thu, 23 Jun 2016 11:07:16 +0200
+
+owncloud-client-overlays (2.2.2) stable; urgency=low
+
+  Automatically generated branding added. Version=2.2.2
+  created by: ./genbranding.pl (V1.13) -o -p isv:ownCloud:desktop owncloudclient-2.2.2.tar.xz ownCloud.tar.xz
+
+ -- ownCloud Jenkins <jenkins@owncloud.com>  Mon, 20 Jun 2016 16:25:35 +0000
+
+owncloud-client-overlays (2.2.1-6) stable; urgency=low
+
+  * fix https://github.com/owncloud/client/issues/4957
+
+ -- Jürgen Weigert <jw@owncloud.com>  Fri, 10 Jun 2016 13:55:22 +0200
+
+owncloud-client-overlays (2.2.1-5) stable; urgency=low
+
+ * fix https://github.com/owncloud/client/issues/4956
+
+ -- Jürgen Weigert <jw@owncloud.com>  Fri, 10 Jun 2016 13:07:13 +0200
+
+owncloud-client-overlays (2.2.1-4) stable; urgency=low
+
+  Automatically generated branding added. Version=2.2.1
+  created by: ./genbranding.pl (V1.13) -o -p isv:ownCloud:desktop owncloudclient-2.2.1.tar.xz ownCloud.tar.xz
+
+ -- ownCloud Jenkins <jenkins@owncloud.com>  Thu, 09 Jun 2016 11:41:50 +0000
+
+owncloud-client-overlays (2.2.1-3) stable; urgency=low
+
+  * added highdpi-6ccd9e8.patch
+    https://github.com/owncloud/client/issues/3414
+
+ -- Jürgen Weigert <jw@owncloud.com>  Tue, 07 Jun 2016 13:31:12 +0200
+
+owncloud-client-overlays (2.2.1-2) stable; urgency=low
+
+  * added http://ckamm.de/~kamm/tray-patch.patch for ubuntu.
+    https://github.com/owncloud/client/pull/4947/files
+
+ -- Jürgen Weigert <jw@owncloud.com>  Tue, 07 Jun 2016 12:48:59 +0200
+
+owncloud-client-overlays (2.2.1-1) stable; urgency=low
+
+  Automatically generated branding added. Version=2.2.1
+  created by: ./genbranding.pl (V1.13) -o -p isv:ownCloud:community:testing owncloudclient-2.2.1.tar.xz ownCloud.tar.xz
+
+ -- ownCloud Jenkins <jenkins@owncloud.com>  Mon, 06 Jun 2016 09:01:25 +0000
+
+owncloud-client-overlays (2.2.1~rc1) stable; urgency=low
+
+  Automatically generated branding added. Version=2.2.1
+  created by: ./genbranding.pl (V1.13) -o -p isv:ownCloud:community:testing owncloudclient-2.2.1rc1.tar.xz ownCloud.tar.xz
+
+
+ -- ownCloud Jenkins <jenkins@owncloud.com>  Mon, 30 May 2016 10:23:13 +0000
+
+owncloud-client-overlays (2.2.0~rc1-2) stable; urgency=low
+
+  * Require keychain >= 0.6.2 for https://github.com/owncloud/client/issues/4829
+
+ -- Jürgen Weigert <jw@owncloud.com>  Tue, 17 May 2016 16:36:56 +0200
+
+owncloud-client-overlays (2.2.0~rc1) stable; urgency=low
+
+  Automatically generated branding added. Version=2.2.0
+  created by: ./genbranding.pl (V1.13) -o -p isv:ownCloud:community:testing owncloudclient-2.2.0rc1.tar.xz ownCloud.tar.xz
+
+
+ -- ownCloud Jenkins <jenkins@owncloud.com>  Tue, 10 May 2016 15:29:33 +0000
+
+owncloud-client-overlays (2.2.0~beta2) stable; urgency=low
+
+  Automatically generated branding added. Version=2.2.0
+  created by: ./genbranding.pl (V1.13) -o -p isv:ownCloud:community:testing owncloudclient-2.2.0beta2.tar.xz ownCloud.tar.xz
+
+
+ -- ownCloud Jenkins <jenkins@owncloud.com>  Mon, 02 May 2016 14:59:29 +0000
+
+owncloud-client-overlays (2.2.0~beta1) stable; urgency=low
+
+  Automatically generated branding added. Version=2.2.0
+  created by: ./genbranding.pl (V1.13) -o -p isv:ownCloud:community:testing owncloudclient-2.2.0beta1.tar.xz ownCloud.tar.xz
+
+
+ -- ownCloud Jenkins <jenkins@owncloud.com>  Mon, 25 Apr 2016 13:49:24 +0000
+
+owncloud-client-overlays (2.1.1~rc2-1) stable; urgency=low
+
+  * Fix https://github.com/owncloud/client/issues/4107
+
+ -- ownCloud Jenkins <jenkins@owncloud.com>  Mon, 18 Apr 2016 22:55:07 +0200
+
+owncloud-client-overlays (2.1.1~rc2) stable; urgency=low
+
+  Automatically generated branding added. Version=2.1.1
+  created by: ./genbranding.pl (V1.12) -o -p isv:ownCloud:community:testing owncloudclient-2.1.1rc2.tar.xz ownCloud.tar.xz
+
+
+ -- ownCloud Jenkins <jenkins@owncloud.com>  Mon, 08 Feb 2016 16:10:57 +0000
+
+owncloud-client-overlays (2.1.1~rc1) stable; urgency=low
+
+  Automatically generated branding added. Version=2.1.1
+  created by: ./genbranding.pl (V1.12) -o -p isv:ownCloud:community:testing owncloudclient-2.1.1rc1.tar.xz ownCloud.tar.xz
+
+
+ -- ownCloud Jenkins <jenkins@owncloud.com>  Mon, 25 Jan 2016 11:33:42 +0000
+
+owncloud-client-overlays (2.1.1~beta1) stable; urgency=low
+
+  Automatically generated branding added. Version=2.1.1
+  created by: ./genbranding.pl (V1.12) -o -p isv:ownCloud:community:testing owncloudclient-2.1.1beta1.tar.xz ownCloud.tar.xz
+
+
+ -- ownCloud Jenkins <jenkins@owncloud.com>  Mon, 18 Jan 2016 15:52:27 +0000
+
+owncloud-client-overlays (2.1.0~rc1) stable; urgency=low
+
+  Automatically generated branding added. Version=2.1.0
+  created by: ./genbranding.pl (V1.12) -o -p isv:ownCloud:community:testing owncloudclient-2.1.0rc1.tar.xz ownCloud.tar.xz
+
+
+ -- ownCloud Jenkins <jenkins@owncloud.com>  Thu, 26 Nov 2015 14:06:45 +0000
+
+owncloud-client-overlays (2.1.0~rc1) stable; urgency=low
+
+  Automatically generated branding added. Version=2.1.0
+  created by: ./genbranding.pl (V1.12) -o -p isv:ownCloud:community:testing owncloudclient-2.1.0rc1.tar.xz ownCloud.tar.xz
+
+
+ -- ownCloud Jenkins <jenkins@owncloud.com>  Thu, 26 Nov 2015 12:57:27 +0000
+
+owncloud-client-overlays (2.1.0~beta1-2) stable; urgency=low
+
+  * https://github.com/owncloud/client/issues/4145
+    removed dots from descriptions, rephrased to make random capitalization harmless.
+
+ -- Juergen Weigert <jw@owncloud.com>  Thu, 19 Nov 2015 13:22:30 +0100
+
+owncloud-client-overlays (2.1.0~beta1) stable; urgency=low
+
+  Automatically generated branding added. Version=2.1.0
+  created by: ./genbranding.pl (V1.12) -o -p isv:ownCloud:community:testing owncloudclient-2.1.0beta1.tar.xz ownCloud.tar.xz
+
+
+ -- ownCloud Jenkins <jenkins@owncloud.com>  Tue, 17 Nov 2015 14:47:45 +0000
+
+owncloud-client-overlays (2.0.2~rc2) stable; urgency=low
+
+  Automatically generated branding added. Version=2.0.2
+  created by: ./genbranding.pl (V1.12) -o -p isv:ownCloud:community:testing owncloudclient-2.0.2rc2.tar.xz ownCloud.tar.xz
+
+
+ -- ownCloud Jenkins <jenkins@owncloud.com>  Tue, 20 Oct 2015 11:17:05 +0000
+
+owncloud-client-overlays (2.0.2~rc2) stable; urgency=low
+
+  Automatically generated branding added. Version=2.0.2
+  created by: ./genbranding.pl (V1.12) -o -p isv:ownCloud:community:testing owncloudclient-2.0.2rc2.tar.xz ownCloud.tar.xz
+
+
+ -- ownCloud Jenkins <jenkins@owncloud.com>  Tue, 20 Oct 2015 09:50:06 +0000
+
+owncloud-client-overlays (2.0.2~rc1) stable; urgency=low
+
+  Automatically generated branding added. Version=2.0.2
+  created by: ./genbranding.pl (V1.12) -o -p isv:ownCloud:community:testing owncloudclient-2.0.2rc1.tar.xz ownCloud.tar.xz
+
+
+ -- ownCloud Jenkins <jenkins@owncloud.com>  Fri, 16 Oct 2015 09:53:56 +0000
+
+owncloud-client-overlays (2.0.2~rc1) stable; urgency=low
+
+  Automatically generated branding added. Version=2.0.2
+  created by: ./genbranding.pl (V1.12) -o -p isv:ownCloud:community:testing owncloudclient-2.0.2rc1.tar.xz ownCloud.tar.xz
+
+
+ -- ownCloud Jenkins <jenkins@owncloud.com>  Fri, 16 Oct 2015 09:25:50 +0000
+
+owncloud-client-overlays (2.0.0~rc2) stable; urgency=low
+
+  Automatically generated branding added. Version=2.0.0
+  created by: ./genbranding.pl (V1.12) -o -p isv:ownCloud:community:testing owncloudclient-2.0.0rc2.tar.xz ownCloud.tar.xz
+
+
+ -- ownCloud Jenkins <jenkins@owncloud.com>  Fri, 21 Aug 2015 14:08:53 +0000
+
+owncloud-client-overlays (2.0.0~rc1) stable; urgency=low
+
+  Automatically generated branding added. Version=2.0.0
+  created by: ./genbranding.pl (V1.12) -o -p isv:ownCloud:community:testing owncloudclient-2.0.0rc1.tar.xz ownCloud.tar.xz
+
+
+ -- ownCloud Jenkins <jenkins@owncloud.com>  Tue, 18 Aug 2015 11:29:20 +0000
+
+owncloud-client-overlays (2.0.0~beta2) stable; urgency=low
+
+  Automatically generated branding added. Version=2.0.0
+  created by: ./genbranding.pl (V1.12) -o -p isv:ownCloud:community:testing owncloudclient-2.0.0beta2.tar.xz ownCloud.tar.xz
+
+
+ -- ownCloud Jenkins <jenkins@owncloud.com>  Sat, 15 Aug 2015 01:26:27 +0000
+
+owncloud-client-overlays (2.0.0~beta1-2) stable; urgency=low
+
+  Automatically generated branding added. Version=2.0.0
+  created by: ./genbranding.pl (V1.12) -o -p isv:ownCloud:community:testing owncloudclient-2.0.0beta1.tar.xz ownCloud.tar.xz
+
+ -- ownCloud Jenkins <jenkins@owncloud.com>  Fri, 07 Aug 2015 10:53:46 +0000
+
+owncloud-client-overlays (2.0.0~beta1-1) stable; urgency=low
+
+  * pamper debian lintian.
+
+ -- Jürgen Weigert <testy@linux-w510-jw.own.cloud>  Fri, 07 Aug 2015 12:30:22 +0200
+
+owncloud-client-overlays (2.0.0~beta1) stable; urgency=low
+
+  Automatically generated branding added. Version=2.0.0
+  created by: ./genbranding.pl (V1.12) -o -p isv:ownCloud:community:testing owncloudclient-2.0.0beta1.tar.xz ownCloud.tar.xz
+
+
+ -- ownCloud Jenkins <jenkins@owncloud.com>  Fri, 07 Aug 2015 08:58:26 +0000
+
+owncloud-client-overlays (2.0.0~beta1) stable; urgency=low
+
+  Automatically generated branding added. Version=2.0.0
+  created by: ./genbranding.pl (V1.12) -o -p isv:ownCloud:community:testing owncloudclient-2.0.0beta1.tar.xz ownCloud.tar.xz
+
+
+ -- ownCloud Jenkins <jenkins@owncloud.com>  Fri, 07 Aug 2015 07:52:30 +0000
+
+owncloud-client-overlays (1.8.3~rc3) stable; urgency=low
+
+  Automatically generated branding added. Version=1.8.3
+  created by: ./genbranding.pl (V1.12) -o -p isv:ownCloud:community:testing owncloudclient-1.8.3rc3.tar.xz ownCloud.tar.xz
+
+
+ -- ownCloud Jenkins <jenkins@owncloud.com>  Mon, 22 Jun 2015 06:50:30 +0000
+
+owncloud-client-overlays (1.8.3~rc2) stable; urgency=low
+
+  Automatically generated branding added. Version=1.8.3
+  created by: ./genbranding.pl (V1.12) -o -p isv:ownCloud:community:testing owncloudclient-1.8.3rc2.tar.xz ownCloud.tar.xz
+
+
+ -- ownCloud Jenkins <jenkins@owncloud.com>  Wed, 17 Jun 2015 15:16:48 +0000
+
+owncloud-client-overlays (1.8.3~rc1) stable; urgency=low
+
+  Automatically generated branding added. Version=1.8.3
+  created by: ./genbranding.pl (V1.12) -o -p isv:ownCloud:community:testing owncloudclient-1.8.3rc1.tar.xz ownCloud.tar.xz
+
+
+ -- ownCloud Jenkins <jenkins@owncloud.com>  Mon, 15 Jun 2015 10:55:05 +0000
+
+owncloud-client-overlays (1.8.3~rc1) stable; urgency=low
+
+  Automatically generated branding added. Version=1.8.3
+  created by: ./genbranding.pl (V1.12) -o -p isv:ownCloud:community:testing owncloudclient-1.8.3rc1.tar.xz ownCloud.tar.xz
+
+
+ -- ownCloud Jenkins <jenkins@owncloud.com>  Thu, 11 Jun 2015 13:47:48 +0000
+
+owncloud-client-overlays (1.8.3) stable; urgency=low
+
+  Automatically generated branding added. Version=1.8.3
+  created by: ./genbranding.pl (V1.12) -o -p isv:ownCloud:community:testing owncloudclient-1.8.3.tar.xz ownCloud.tar.xz
+
+
+ -- ownCloud Jenkins <jenkins@owncloud.com>  Thu, 11 Jun 2015 13:12:36 +0000
+
+owncloud-client-overlays (1.8.2~rc1) stable; urgency=low
+
+  Automatically generated branding added. Version=1.8.2
+  created by: ./genbranding.pl (V1.12) -o -p isv:ownCloud:community:testing owncloudclient-1.8.2rc1.tar.xz ownCloud.tar.xz
+
+
+ -- ownCloud Jenkins <jenkins@owncloud.com>  Fri, 05 Jun 2015 08:14:58 +0000
+
+owncloud-client-overlays (1.8.2~beta1) stable; urgency=low
+
+  Automatically generated branding added. Version=1.8.2
+  created by: ./genbranding.pl (V1.12) -o -p isv:ownCloud:community:testing owncloudclient-1.8.2beta1.tar.xz ownCloud.tar.xz
+
+
+ -- ownCloud Jenkins <jenkins@owncloud.com>  Fri, 22 May 2015 14:28:18 +0000
+
--- owncloudclient-2.3.3-nightly20170826.orig/debian/rules
+++ owncloudclient-2.3.3-nightly20170826/debian/rules
@@ -0,0 +1,53 @@
+#!/usr/bin/make -f
+# -*- makefile -*-
+# Sample debian/rules that uses debhelper.
+# This file was originally written by Joey Hess and Craig Small.
+# As a special exception, when this file is copied by dh-make into a
+# dh-make output file, you may use that output file without restriction.
+# This special exception was added by Craig Small in version 0.37 of dh-make.
+
+# Uncomment this to turn on verbose mode.
+export DH_VERBOSE=1
+
+export DROOT=$(CURDIR)/debian/owncloud-client
+export SRCDIR=/usr/src/packages/SOURCES
+export DEB_HOST_MULTIARCH ?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH)
+
+export DISTRO_NAME ?= $(shell lsb_release -is)
+export DISTRO_VERSION ?= $(shell lsb_release -rs)
+
+SHELL=/bin/bash
+
+%:
+	dh $@
+
+override_dh_auto_configure:
+	# not sure, when which variables are set.
+	echo source:Version=${source:Version}
+	echo source:Upstream-Version=${source:Upstream-Version}
+	echo binary:Version=${binary:Version}
+
+	# protect against poisonous tar-balls.
+	if [ -d binary ]; then ls -la; echo; echo "A top level directory named 'binary' exists. This kills dpkg-genchangelog."; echo; echo "Please remove that directory."; echo; echo; sleep 30; rm -rf binary; fi
+
+	git_defs=('-DMIRALL_VERSION_BUILD=8264'); \
+	if [ -n "nightly20170826" -a "nightly20170826" != "%nil" ]; then \
+	  git_defs=('-DMIRALL_VERSION_SUFFIX=nightly20170826' '-DMIRALL_VERSION_BUILD=8264'); \
+	fi; \
+
+	dh_auto_configure -- \
+		"$${git_defs[@]}" \
+		-DCMAKE_INSTALL_PREFIX=/usr \
+		-DCMAKE_INSTALL_DOCDIR=/usr/share/doc \
+		-DCMAKE_INSTALL_DATAROOTDIR:PATH=/usr/share \
+		-DDATA_INSTALL_DIR:PATH=/usr/share \
+		-DSYSCONF_INSTALL_DIR=/etc \
+		-DWITH_DOC=FALSE \
+		-DCMAKE_SKIP_RPATH=FALSE \
+		-DCMAKE_INSTALL_RPATH_USE_LINK_PATH=TRUE \
+		-DOEM_THEME_DIR=$(CURDIR)/ownCloud/syncclient \
+		-DBUILD_SHELL_INTEGRATION=ON \
+		-DBUILD_CLIENT=OFF
+
+override_dh_install:
+	dh_install --fail-missing
--- owncloudclient-2.3.3-nightly20170826.orig/debian/compat
+++ owncloudclient-2.3.3-nightly20170826/debian/compat
@@ -0,0 +1,1 @@
+9
--- owncloudclient-2.3.3-nightly20170826.orig/debian/owncloud-client-overlays-icons.install
+++ owncloudclient-2.3.3-nightly20170826/debian/owncloud-client-overlays-icons.install
@@ -0,0 +1,1 @@
+usr/share/icons/hicolor
--- owncloudclient-2.3.3-nightly20170826.orig/debian/owncloud-client-nemo.install
+++ owncloudclient-2.3.3-nightly20170826/debian/owncloud-client-nemo.install
@@ -0,0 +1,1 @@
+usr/share/nemo-python/extensions/syncstate-*.py
--- owncloudclient-2.3.3-nightly20170826.orig/debian/owncloud-client-caja.install
+++ owncloudclient-2.3.3-nightly20170826/debian/owncloud-client-caja.install
@@ -0,0 +1,1 @@
+usr/share/caja-python/extensions/syncstate-*.py
--- owncloudclient-2.3.3-nightly20170826.orig/debian/control
+++ owncloudclient-2.3.3-nightly20170826/debian/control
@@ -0,0 +1,46 @@
+Source: owncloud-client-overlays
+Section: devel
+Priority: optional
+Maintainer: Jürgen Weigert <jw@owncloud.com>
+Standards-Version: 3.9.6
+Build-Depends: debhelper (>= 9), cmake
+
+Package: owncloud-client-overlays-icons
+Architecture: all
+Section: devel
+Depends: owncloud-client (= ${binary:Version}), owncloud-client-overlays-icons, ${misc:Depends}
+Description: overlay icons for owncloud client plugins
+ This package contains overlay icons for owncloud plugins.
+ .
+ This helps users to understand the sync state of files in the
+ synchronized directory.
+
+Package: owncloud-client-nautilus
+Architecture: all
+Section: devel
+Depends: owncloud-client (= ${binary:Version}), owncloud-client-overlays-icons, ${misc:Depends}, python-nautilus, nautilus
+Description: nautilus plugin for owncloud
+ This package contains a nautilus plugin to display overlay icons.
+ .
+ This helps users to understand the sync state of files in the
+ synchronized directory.
+
+Package: owncloud-client-nemo
+Architecture: all
+Section: devel
+Depends: owncloud-client (= ${binary:Version}), owncloud-client-overlays-icons, ${misc:Depends}, python-nemo, nemo
+Description: Nemo plugin for owncloud
+ This package contains a nemo plugin to display overlay icons.
+ .
+ This helps users to understand the sync state of files in the
+ synchronized directory.
+
+Package: owncloud-client-caja
+Architecture: all
+Section: devel
+Depends: owncloud-client (= ${binary:Version}), owncloud-client-overlays-icons, ${misc:Depends}, python-caja, caja
+Description: Caja plugin for owncloud
+ This package contains a caja plugin to display overlay icons.
+ .
+ This helps users to understand the sync state of files in the
+ synchronized directory.
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 20a0de8be..d4eeb78b2 100644
--- owncloudclient-2.3.3-nightly20170826.orig/CMakeLists.txt
+++ owncloudclient-2.3.3-nightly20170826/CMakeLists.txt
@@ -22,16 +22,19 @@ else()
     set(APPLICATION_REV_DOMAIN_INSTALLER ${APPLICATION_REV_DOMAIN})
 endif()
 
-if (NOT DEFINED APPLICATION_SHORTNAME)
-     set ( APPLICATION_SHORTNAME ${APPLICATION_NAME} )
-endif()
-
 # For usage in XML files we preprocess
 string(REPLACE "&" "&amp;" APPLICATION_NAME_XML_ESCAPED "${APPLICATION_NAME}")
 string(REPLACE "<" "&lt;" APPLICATION_NAME_XML_ESCAPED "${APPLICATION_NAME_XML_ESCAPED}")
 string(REPLACE ">" "&gt;" APPLICATION_NAME_XML_ESCAPED "${APPLICATION_NAME_XML_ESCAPED}")
 
-set(PACKAGE "${APPLICATION_SHORTNAME}-client")
+if (NOT DEFINED LINUX_PACKAGE_SHORTNAME)
+    set(LINUX_PACKAGE_SHORTNAME "${APPLICATION_SHORTNAME}")
+endif()
+
+if (NOT DEFINED PACKAGE)
+    set(PACKAGE "${LINUX_PACKAGE_SHORTNAME}-client")
+endif()
+
 set( CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake/modules )
 
 if(NOT CRASHREPORTER_EXECUTABLE)
@@ -120,7 +123,22 @@ if(NO_MSG_HANDLER)
    add_definitions(-DNO_MSG_HANDLER=1)
 endif()
 
-# this option creates only libocsync and libowncloudsync
+# this option builds the shell integration
+option(BUILD_SHELL_INTEGRATION "BUILD_SHELL_INTEGRATION" ON)
+
+# this option builds/installs the generic shell integration icons
+option(BUILD_SHELL_INTEGRATION_ICONS "BUILD_SHELL_INTEGRATION_ICONS" ON)
+
+# this options builds the dolphin integration plugin
+option(BUILD_SHELL_INTEGRATION_DOLPHIN "BUILD_SHELL_INTEGRATION_DOLPHIN" ON)
+
+# this options builds the nautilus (like) integration plugins
+option(BUILD_SHELL_INTEGRATION_NAUTILUS "BUILD_SHELL_INTEGRATION_NAUTILUS" ON)
+
+# this option builds the client
+option(BUILD_CLIENT "BUILD_CLIENT" ON)
+
+# this option creates only libocsync and libowncloudsync (NOTE: BUILD_CLIENT needs to be on)
 option(BUILD_LIBRARIES_ONLY "BUILD_LIBRARIES_ONLY" OFF)
 
 # When this option is enabled, 5xx errors are not added to the blacklist
@@ -153,30 +171,32 @@ if(APPLE)
   set( SOCKETAPI_TEAM_IDENTIFIER_PREFIX "" CACHE STRING "SocketApi prefix (including a following dot) that must match the codesign key's TeamIdentifier/Organizational Unit" )
 endif()
 
-find_package(OpenSSL 1.0.0 REQUIRED)
+if(BUILD_CLIENT)
+    find_package(OpenSSL 1.0.0 REQUIRED)
 
-if(APPLE)
-  find_package(Sparkle)
-endif(APPLE)
+    if(APPLE)
+    find_package(Sparkle)
+    endif(APPLE)
 
-if(UNIX)
-  find_package(INotify REQUIRED)
-else()
-  find_package(INotify)
-endif()
-find_package(Sphinx)
-find_package(PdfLatex)
-
-find_package(SQLite3 3.8.0 REQUIRED)
-# On some OS, we want to use our own, not the system sqlite
-if (USE_OUR_OWN_SQLITE3)
-    include_directories(BEFORE ${SQLITE3_INCLUDE_DIR})
-    if (WIN32)
-        add_definitions(-DSQLITE_API=__declspec\(dllimport\))
+    if(UNIX)
+    find_package(INotify REQUIRED)
+    else()
+    find_package(INotify)
+    endif()
+    find_package(Sphinx)
+    find_package(PdfLatex)
+
+    find_package(SQLite3 3.8.0 REQUIRED)
+    # On some OS, we want to use our own, not the system sqlite
+    if (USE_OUR_OWN_SQLITE3)
+        include_directories(BEFORE ${SQLITE3_INCLUDE_DIR})
+        if (WIN32)
+            add_definitions(-DSQLITE_API=__declspec\(dllimport\))
+        endif()
     endif()
-endif()
 
-find_package(ZLIB)
+    find_package(ZLIB)
+endif()
 
 configure_file(config.h.in ${CMAKE_CURRENT_BINARY_DIR}/config.h)
 
@@ -195,14 +215,19 @@ endif( WIN32 )
 file( GLOB TRANS_FILES ${CMAKE_SOURCE_DIR}/translations/client_*.ts)
 set(TRANSLATIONS ${TRANS_FILES})
 
-add_subdirectory(csync)
-add_subdirectory(src)
-if(NOT BUILD_LIBRARIES_ONLY)
-add_subdirectory(shell_integration)
-add_subdirectory(doc)
-add_subdirectory(doc/dev)
-add_subdirectory(admin)
-endif(NOT BUILD_LIBRARIES_ONLY)
+if(BUILD_CLIENT)
+    add_subdirectory(csync)
+    add_subdirectory(src)
+    if(NOT BUILD_LIBRARIES_ONLY)
+        add_subdirectory(doc)
+        add_subdirectory(doc/dev)
+        add_subdirectory(admin)
+    endif()
+endif()
+
+if(BUILD_SHELL_INTEGRATION)
+    add_subdirectory(shell_integration)
+endif()
 
 if(UNIT_TESTING)
     include(CTest)
@@ -213,7 +238,7 @@ endif(UNIT_TESTING)
 if(BUILD_OWNCLOUD_OSX_BUNDLE)
     install(FILES sync-exclude.lst DESTINATION ${OWNCLOUD_OSX_BUNDLE}/Contents/Resources/)
     configure_file(sync-exclude.lst bin/${OWNCLOUD_OSX_BUNDLE}/Contents/Resources/sync-exclude.lst COPYONLY)
-else()
+elseif(BUILD_CLIENT)
     install( FILES sync-exclude.lst DESTINATION ${SYSCONFDIR}/${APPLICATION_SHORTNAME} )
     configure_file(sync-exclude.lst bin/sync-exclude.lst COPYONLY)
 endif()
diff --git a/OWNCLOUD.cmake b/OWNCLOUD.cmake
index 4022212e6..3aaf84785 100644
--- owncloudclient-2.3.3-nightly20170826.orig/OWNCLOUD.cmake
+++ owncloudclient-2.3.3-nightly20170826/OWNCLOUD.cmake
@@ -1,9 +1,12 @@
 set( APPLICATION_NAME       "ownCloud" )
+set( APPLICATION_SHORTNAME  "ownCloud" )
 set( APPLICATION_EXECUTABLE "owncloud" )
 set( APPLICATION_DOMAIN     "owncloud.com" )
 set( APPLICATION_VENDOR     "ownCloud" )
 set( APPLICATION_UPDATE_URL "https://updates.owncloud.com/client/" CACHE string "URL for updater" )
 
+set( LINUX_PACKAGE_SHORTNAME "owncloud" )
+
 set( THEME_CLASS            "ownCloudTheme" )
 set( APPLICATION_REV_DOMAIN "com.owncloud.desktopclient" )
 set( WIN_SETUP_BITMAP_PATH  "${CMAKE_SOURCE_DIR}/admin/win/nsi" )
diff --git a/OwnCloudCPack.cmake b/OwnCloudCPack.cmake
index cad12d1b9..39eee0080 100644
--- owncloudclient-2.3.3-nightly20170826.orig/OwnCloudCPack.cmake
+++ owncloudclient-2.3.3-nightly20170826/OwnCloudCPack.cmake
@@ -48,7 +48,7 @@ if(WIN32)
     set( CPACK_PACKAGE_DESCRIPTION_FILE  "${CMAKE_SOURCE_DIR}/README.md" ) # File used as a description of a project     /path/to/project/ReadMe.txt
     set( CPACK_PACKAGE_DESCRIPTION_SUMMARY  "${APPLICATION_NAME} Syncing Client" ) #  Description summary of a project
     # CPACK_PACKAGE_EXECUTABLES   List of pairs of executables and labels. Used by the NSIS generator to create Start Menu shortcuts.     ccmake;CMake
-    set( CPACK_PACKAGE_INSTALL_DIRECTORY  ${APPLICATION_SHORTNAME} )     # Installation directory on the target system -> C:\Program Files\fellody
+    set( CPACK_PACKAGE_INSTALL_DIRECTORY  ${APPLICATION_SHORTNAME} )     # Installation directory on the target system -> C:\Program Files\${APPLICATION_SHORTNAME}
     set( CPACK_PACKAGE_INSTALL_REGISTRY_KEY ${APPLICATION_SHORTNAME} )  # Registry key used when installing this project  CMake 2.5.0
     set( CPACK_PACKAGE_NAME  ${APPLICATION_NAME} ) # Package name, defaults to the project name
     set( CPACK_PACKAGE_VENDOR  "http://${APPLICATION_DOMAIN}" )   # Package vendor name
diff --git a/doc/CMakeLists.txt b/doc/CMakeLists.txt
index ad3825223..edf096bed 100644
--- owncloudclient-2.3.3-nightly20170826.orig/doc/CMakeLists.txt
+++ owncloudclient-2.3.3-nightly20170826/doc/CMakeLists.txt
@@ -12,10 +12,13 @@ if(SPHINX_FOUND)
     # assets
     set(LATEX_LOGO          "${CMAKE_CURRENT_SOURCE_DIR}/logo-blue.pdf")
 
-    install(DIRECTORY ${SPHINX_HTML_DIR} DESTINATION ${CMAKE_INSTALL_DOCDIR} OPTIONAL)
+    set(APPLICATION_DOC_DIR "${CMAKE_INSTALL_DOCDIR}/${PACKAGE}")
+    install(DIRECTORY ${SPHINX_HTML_DIR} DESTINATION ${APPLICATION_DOC_DIR} OPTIONAL)
+    install(DIRECTORY ${SPHINX_PDF_DIR} DESTINATION ${APPLICATION_DOC_DIR} OPTIONAL)
+    install(DIRECTORY ${SPHINX_QCH_DIR} DESTINATION ${APPLICATION_DOC_DIR} OPTIONAL)
+
     install(DIRECTORY ${SPHINX_MAN_DIR} DESTINATION ${CMAKE_INSTALL_MANDIR} OPTIONAL)
-    install(DIRECTORY ${SPHINX_PDF_DIR} DESTINATION ${CMAKE_INSTALL_DOCDIR} OPTIONAL)
-    install(DIRECTORY ${SPHINX_QCH_DIR} DESTINATION ${CMAKE_INSTALL_DOCDIR} OPTIONAL)
+
 
     configure_file("${CMAKE_CURRENT_SOURCE_DIR}/conf.py.in" conf.py @ONLY)
 
diff --git a/shell_integration/CMakeLists.txt b/shell_integration/CMakeLists.txt
index 03b2bbc34..85e539879 100644
--- owncloudclient-2.3.3-nightly20170826.orig/shell_integration/CMakeLists.txt
+++ owncloudclient-2.3.3-nightly20170826/shell_integration/CMakeLists.txt
@@ -1,17 +1,23 @@
 if (APPLE)
   add_subdirectory(MacOSX)
 endif()
-add_subdirectory(icons)
+if(BUILD_SHELL_INTEGRATION_ICONS)
+  add_subdirectory(icons)
+endif()
 
 if( UNIX AND NOT APPLE )
-  add_subdirectory(nautilus)
+  if(BUILD_SHELL_INTEGRATION_NAUTILUS)
+    add_subdirectory(nautilus)
+  endif()
 
-  find_package(ECM 1.2.0 NO_MODULE QUIET)
-  set(CMAKE_MODULE_PATH ${ECM_MODULE_PATH} ${ECM_KDE_MODULE_DIR} "${CMAKE_CURRENT_SOURCE_DIR}/cmake")
-  find_package(KF5 "5.16" COMPONENTS KIO)
-  if(KF5_FOUND)
-    add_subdirectory(dolphin)
-  else()
-    message("Dolphin plugin disabled: KDE Frameworks 5.16 not found")
+  if(BUILD_SHELL_INTEGRATION_DOLPHIN)
+    find_package(ECM 1.2.0 NO_MODULE QUIET)
+    set(CMAKE_MODULE_PATH ${ECM_MODULE_PATH} ${ECM_KDE_MODULE_DIR} "${CMAKE_CURRENT_SOURCE_DIR}/cmake")
+    find_package(KF5 "5.16" COMPONENTS KIO)
+    if(KF5_FOUND)
+        add_subdirectory(dolphin)
+    else()
+        message("Dolphin plugin disabled: KDE Frameworks 5.16 not found")
+    endif()
   endif()
 endif()
diff --git a/src/cmd/cmd.cpp b/src/cmd/cmd.cpp
index 553905d8e..78e2a41eb 100644
--- owncloudclient-2.3.3-nightly20170826.orig/src/cmd/cmd.cpp
+++ owncloudclient-2.3.3-nightly20170826/src/cmd/cmd.cpp
@@ -182,8 +182,7 @@ void help()
 }
 
 void showVersion() {
-    const char *binaryName = APPLICATION_EXECUTABLE "cmd";
-    std::cout << binaryName << " version " << qPrintable(Theme::instance()->version()) << std::endl;
+    std::cout << qPrintable(Utility::executableVersionOutput(Theme::instance()));
     exit(0);
 }
 
diff --git a/src/gui/CMakeLists.txt b/src/gui/CMakeLists.txt
index 25aaa06ae..f8ca24502 100644
--- owncloudclient-2.3.3-nightly20170826.orig/src/gui/CMakeLists.txt
+++ owncloudclient-2.3.3-nightly20170826/src/gui/CMakeLists.txt
@@ -5,7 +5,7 @@ add_subdirectory(updater)
 
 #TODO Move resources files
 qt_add_resources(MIRALL_RC_SRC ../../client.qrc)
-if ( IS_DIRECTORY ${OEM_THEME_DIR} )
+if (EXISTS "${OEM_THEME_DIR}/theme.qrc")
     qt_add_resources(MIRALL_RC_SRC ${OEM_THEME_DIR}/theme.qrc)
     set(theme_dir ${OEM_THEME_DIR}/theme)
 else()
diff --git a/src/gui/application.cpp b/src/gui/application.cpp
index 843f8bd0c..5e3f3822f 100644
--- owncloudclient-2.3.3-nightly20170826.orig/src/gui/application.cpp
+++ owncloudclient-2.3.3-nightly20170826/src/gui/application.cpp
@@ -506,20 +506,7 @@ void Application::showHelp()
 
 void Application::showVersion()
 {
-    QString helpText;
-    QTextStream stream(&helpText);
-    stream << _theme->appName().toLatin1().constData()
-           << QLatin1String(" version ")
-           << _theme->version().toLatin1().constData() << endl;
-#ifdef GIT_SHA1
-    stream << "Git revision " << GIT_SHA1 << endl;
-#endif
-    stream << "Using Qt " << qVersion() << ", built against Qt " << QT_VERSION_STR << endl;
-#if QT_VERSION >= QT_VERSION_CHECK(5, 0, 0)
-    stream << "Using '" << QSslSocket::sslLibraryVersionString() << "'" << endl;
-#endif
-
-    displayHelpText(helpText);
+    displayHelpText(Utility::executableVersionOutput(_theme));
 }
 
 void Application::showHint(std::string errorHint)
diff --git a/src/libsync/utility.cpp b/src/libsync/utility.cpp
index 2a140f89e..f6573bae9 100644
--- owncloudclient-2.3.3-nightly20170826.orig/src/libsync/utility.cpp
+++ owncloudclient-2.3.3-nightly20170826/src/libsync/utility.cpp
@@ -18,6 +18,7 @@
 
 #include "version.h"
 #include "configfile.h"
+#include "theme.h"
 
 // Note:  This file must compile without QtGui
 #include <QCoreApplication>
@@ -31,6 +32,7 @@
 #include <QObject>
 #include <QThread>
 #include <QDateTime>
+#include <QSslSocket>
 #include <QSysInfo>
 #if QT_VERSION < QT_VERSION_CHECK(5, 0, 0)
 #include <QTextDocument>
@@ -484,6 +486,24 @@ QByteArray Utility::versionOfInstalledBinary( const QString& command )
     return re;
 }
 
+QString Utility::executableVersionOutput(Theme* theme)
+{
+    QString helpText;
+    QTextStream stream(&helpText);
+    stream << theme->appName().toLatin1().constData()
+           << QLatin1String(" version ")
+           << theme->version().toLatin1().constData() << endl;
+#ifdef GIT_SHA1
+    stream << "Git revision " << GIT_SHA1 << endl;
+#endif
+    stream << "Using Qt " << qVersion() << ", built against Qt " << QT_VERSION_STR << endl;
+#if QT_VERSION >= QT_VERSION_CHECK(5, 0, 0)
+    stream << "Using '" << QSslSocket::sslLibraryVersionString() << "'" << endl;
+#endif
+
+    return helpText;
+}
+
 QString Utility::timeAgoInWords(const QDateTime& dt, const QDateTime& from)
 {
     QDateTime now = QDateTime::currentDateTimeUtc();
diff --git a/src/libsync/utility.h b/src/libsync/utility.h
index 5fb60c729..c874930a0 100644
--- owncloudclient-2.3.3-nightly20170826.orig/src/libsync/utility.h
+++ owncloudclient-2.3.3-nightly20170826/src/libsync/utility.h
@@ -29,6 +29,8 @@ class QSettings;
 
 namespace OCC {
 
+class Theme;
+
 /** \addtogroup libsync
  *  @{
  */
@@ -117,6 +119,9 @@ namespace Utility
     // For Mac and Windows, it returns QString()
     OWNCLOUDSYNC_EXPORT QByteArray versionOfInstalledBinary(const QString& command = QString() );
 
+    // Shared `--version` output for gui and cmd
+    OWNCLOUDSYNC_EXPORT QString executableVersionOutput(Theme* theme);
+
     OWNCLOUDSYNC_EXPORT QString fileNameForGuiUse(const QString& fName);
 
     /**
--- owncloudclient-2.3.3-nightly20170826.orig/shell_integration/nautilus/CMakeLists.txt.orig	2017-08-15 21:04:52.667623400 +0200
+++ owncloudclient-2.3.3-nightly20170826/shell_integration/nautilus/CMakeLists.txt	2017-08-15 21:07:33.747978623 +0200
@@ -3,8 +3,6 @@
 if( UNIX AND NOT APPLE )
 
     configure_file(syncstate.py syncstate.py COPYONLY)
-    configure_file(syncstate.py syncstate_nemo.py COPYONLY)
-    configure_file(syncstate.py syncstate_caja.py COPYONLY)
 
     # Call the setupappname.sh script to set the custom app name.
     set (cmd "${CMAKE_CURRENT_SOURCE_DIR}/setappname.sh")
--- owncloudclient-2.3.3-nightly20170826.orig/shell_integration/nautilus/createnemoplugin.sh.orig	2017-08-15 21:05:09.875669753 +0200
+++ owncloudclient-2.3.3-nightly20170826/shell_integration/nautilus/createnemoplugin.sh	2017-08-15 21:05:32.375730248 +0200
@@ -3,4 +3,5 @@
 # this script creates a plugin for nemo, just be replacing
 # all occurences of Nautilus with Nemo.
 
+cp syncstate.py syncstate_nemo.py
 sed -i.org -e 's/autilus/emo/g' syncstate_nemo.py
--- owncloudclient-2.3.3-nightly20170826.orig/shell_integration/nautilus/createcajaplugin.sh.orig	2017-08-15 21:05:02.935651068 +0200
+++ owncloudclient-2.3.3-nightly20170826/shell_integration/nautilus/createcajaplugin.sh	2017-08-15 21:06:00.091793963 +0200
@@ -3,5 +3,6 @@
 # this script creates a plugin for caja, just by replacing
 # all occurences of Nautilus with Caja (case sensitive).
 
+cp syncstate.py syncstate_caja.py
 sed -i.org -e 's/Nautilus/Caja/g' syncstate_caja.py
 sed -i.org -e 's/nautilus/caja/g' syncstate_caja.py
--- owncloudclient-2.3.3-nightly20170826.orig/shell_integration/icons/CMakeLists.txt.orig	2017-08-15 21:46:11.732915445 +0200
+++ owncloudclient-2.3.3-nightly20170826/shell_integration/icons/CMakeLists.txt	2017-08-15 21:45:52.228872798 +0200
@@ -7,7 +7,7 @@
 	FOREACH( file ${files} )
 	    # the GLOB returns a absolute path. Make it relative by replacing the current src dir by nothing
 	    STRING(REPLACE "${CMAKE_CURRENT_SOURCE_DIR}/${size}/" "" shortFile ${file})
-	    STRING(REPLACE "oC" ${APPLICATION_NAME} brandedName ${shortFile})
+	    STRING(REPLACE "oC" ${APPLICATION_SHORTNAME} brandedName ${shortFile})
 	    install(FILES ${file} DESTINATION ${ICON_DIR}/${size}/apps RENAME ${brandedName})
 	ENDFOREACH(file)
     ENDFOREACH(size)
