This shows you the differences between two versions of the page.
— |
building_owncloud_client_for_raspberry_pi_232 [2018/11/01 20:07] (current) sgripon created |
||
---|---|---|---|
Line 1: | Line 1: | ||
+ | ====== Building owncloud client for Raspberry pi's raspbian ====== | ||
+ | ~~socialite~~ | ||
+ | I use my Raspberry pi as an owncloud client to synchronize my NAS and my server. Unfortunately, | ||
+ | |||
+ | **Update!**: | ||
+ | |||
+ | **DISCLAIMER :!:** Tested on raspbian jessie on raspi 1 and 3. Feedback welcome on twitter. | ||
+ | |||
+ | **Note:** if you need a newer version of the client, just tweet me [[https:// | ||
+ | ===== Download binaries ===== | ||
+ | |||
+ | If you don't want to compile by yourself, you can get the debian package installer from [[http:// | ||
+ | |||
+ | To install: | ||
+ | |||
+ | sudo dpkg -i owncloud-client-2.3.2_armhf.deb | ||
+ | |||
+ | If there are missing dependencies, | ||
+ | |||
+ | sudo apt-get install -f | ||
+ | | ||
+ | If not, you should be able to install manually missing packages with apt-get. | ||
+ | |||
+ | |||
+ | ===== ppa ===== | ||
+ | |||
+ | I also experiment ppa. You can try it by adding my ppa to the source.list. Add line: | ||
+ | |||
+ | deb http:// | ||
+ | | ||
+ | to / | ||
+ | |||
+ | Then: | ||
+ | |||
+ | sudo apt-get update | ||
+ | sudo apt-get install owncloud-client | ||
+ | |||
+ | ===== Raspberry pi emulator ===== | ||
+ | |||
+ | I use raspberry pi emulator to build owncloud. See [[raspberry_pi_emulator|Raspberry pi emulator]]. This is to avoid too much writing on SD card and breaking it too quickly. | ||
+ | ===== Build ===== | ||
+ | |||
+ | Most of the build instructions are from owncloud official website (http:// | ||
+ | |||
+ | Get owncloud client sources from official web site here: https:// | ||
+ | |||
+ | This tutorial assumes that the work is done on raspbian in folder / | ||
+ | |||
+ | On your pi: | ||
+ | |||
+ | <code bash> | ||
+ | cd / | ||
+ | </ | ||
+ | | ||
+ | Some dependencies are necessary to build the two packages. | ||
+ | |||
+ | <code bash> | ||
+ | sudo apt-get install libssl-dev | ||
+ | sudo apt-get install libsqlite3-dev | ||
+ | sudo apt-get install libqt4-dev libqtkeychain0 qtkeychain-dev libqt4-sql-sqlite | ||
+ | </ | ||
+ | |||
+ | You will need to install cmake if not already done to build both: | ||
+ | |||
+ | <code bash> | ||
+ | sudo apt-get install cmake | ||
+ | </ | ||
+ | ===== Let's build ===== | ||
+ | |||
+ | The following script downloads and builds the source code (remove download command (//wget//) if already done). The script must be invoked with the desired client version: | ||
+ | |||
+ | ./ | ||
+ | | ||
+ | The script should work for future versions unless ownlcoud changes files naming. | ||
+ | |||
+ | <file bash oc-build.sh> | ||
+ | #!/bin/sh | ||
+ | | ||
+ | # Download and extract source from official website | ||
+ | if [ ! -f owncloudclient-$1.tar.xz ]; then | ||
+ | wget https:// | ||
+ | fi | ||
+ | |||
+ | tar -xf owncloudclient-$1.tar.xz | ||
+ | |||
+ | # Build | ||
+ | mkdir client-build | ||
+ | cd client-build | ||
+ | cmake -DWITH_DOC=TRUE -DCMAKE_BUILD_TYPE=" | ||
+ | make | ||
+ | |||
+ | </ | ||
+ | |||
+ | Then, installation. The following script must be run as root: | ||
+ | |||
+ | <code bash> | ||
+ | sudo ./ | ||
+ | </ | ||
+ | |||
+ | <file bash oc-install.sh> | ||
+ | #!/bin/sh | ||
+ | |||
+ | cd client-build | ||
+ | |||
+ | # Prepare a redistribuable package | ||
+ | make package | ||
+ | |||
+ | make install | ||
+ | |||
+ | # It seems that libocsync and libowncloudsync shared libraries must be installed manually: | ||
+ | cp csync/ | ||
+ | cp src/ | ||
+ | ldconfig | ||
+ | </ | ||
+ | ===== Build a debian package ===== | ||
+ | |||
+ | In / | ||
+ | |||
+ | cd / | ||
+ | mkdir -p deb/ | ||
+ | | ||
+ | First thing is to copy all needed files to this new folder. We are lucky, the "make install" | ||
+ | |||
+ | cd deb/ | ||
+ | rsync --files-from / | ||
+ | |||
+ | Add also libraries installed manually: | ||
+ | |||
+ | cp / | ||
+ | cp / | ||
+ | |||
+ | Then, follow tutorial [[How To Build a Debian Package]]. | ||
+ | |||
+ | The full script to build the debian package: | ||
+ | |||
+ | <file bash oc-build-deb.sh> | ||
+ | #!/bin/sh | ||
+ | |||
+ | DIR=`pwd` | ||
+ | |||
+ | mkdir -p deb/ | ||
+ | cd deb/ | ||
+ | |||
+ | rsync --files-from $DIR/ | ||
+ | |||
+ | cp / | ||
+ | cp / | ||
+ | |||
+ | mkdir DEBIAN | ||
+ | |||
+ | cat << | ||
+ | Package: owncloud-client | ||
+ | Version: $1+debian+rpi1 | ||
+ | Homepage: https:// | ||
+ | Depends: libc6 (>= 2.13-28), libgcc1 (>= 1:4.4.0), libqt4-network (>= 4: | ||
+ | Priority: optional | ||
+ | Section: net | ||
+ | Architecture: | ||
+ | Essential: no | ||
+ | Installed-Size: | ||
+ | Maintainer: Sebastien Gripon < | ||
+ | Description: | ||
+ | | ||
+ | | ||
+ | the files on one computer, it will flow across the others using these desktop | ||
+ | sync clients. | ||
+ | EOT | ||
+ | |||
+ | cat << | ||
+ | #!/bin/sh | ||
+ | set -e | ||
+ | |||
+ | echo " | ||
+ | ldconfig | ||
+ | echo " | ||
+ | EOT | ||
+ | |||
+ | chmod 0755 DEBIAN/ | ||
+ | |||
+ | # Build package | ||
+ | cd $DIR/deb | ||
+ | dpkg-deb --build owncloud-client | ||
+ | |||
+ | # Rename package | ||
+ | mv owncloud-client.deb owncloud-client-$1_armhf.deb | ||
+ | </ | ||
+ | |||
+ | Must be invoked as sudo with version number as argument: | ||
+ | sudo ./ | ||
+ | |||
+ | ===== Launch at startup ===== | ||
+ | |||
+ | If you want to launch owncloud client automatically at startup, just add this line: | ||
+ | | ||
+ | @owncloud | ||
+ | |||
+ | at the end of /// | ||
+ | |||
+ | Note that owncloud client needs a graphical session to be launched so if you want to launch the client at raspi boot, it must be configured to start X automatically. | ||
+ | ===== Older Versions ===== | ||
+ | |||
+ | Older versions can have a different build sequence: | ||
+ | * [[building_owncloud_client_for_raspberry_pi_170|Owncloud client 1.7.0]] | ||
+ | |||
+ | **Share this page:** | ||
+ | ~~socialite~~ |