owncloud client selective sync of folders on Ubuntu/Debian Linux

Since owncloud selective sync only got in after 1.7.0 version of the client i was searching how to use it right away.
But Ubuntu 14.04 ships with owncloud 1.6.2, therefore we need to go around and hack some packages to be able to use this before it reaches ubuntu stable repos:

First install the 1.6.2 client:

sudo apt-get install owncloud-client

Second download packages

cd ~/tmp
wget "http://ftp.us.debian.org/debian/pool/main/o/owncloud-client/owncloud-client_1.7.0~beta1+dfsg-2_amd64.deb"
wget "http://ftp.us.debian.org/debian/pool/main/o/owncloud-client/libowncloudsync0_1.7.0~beta1+dfsg-2_amd64.deb"

Install them

sudo dpkg -i owncloud-client_1.7.0~beta1+dfsg-2_amd64.deb libowncloudsync0_1.7.0~beta1+dfsg-2_amd64.deb

Restart the owncloud client

killall owncloud

There you go!