Linux

Preparation

The following list is what you need to install on your development machine. You should install all of them before you build Seafile.

Package names are according to Ubuntu 14.04. For other Linux distros, please find their corresponding names yourself.

  • autoconf/automake/libtool
  • libevent-dev ( 2.0 or later )
  • libcurl4-openssl-dev (1.0.0 or later)
  • libgtk2.0-dev ( 2.24 or later)
  • uuid-dev
  • intltool (0.40 or later)
  • libsqlite3-dev (3.7 or later)
  • valac (only needed if you build from git repo)
  • libjansson-dev
  • qtchooser
  • qtbase5-dev
  • libqt5webkit5-dev
  • qttools5-dev
  • qttools5-dev-tools
  • valac
  • cmake
  • python-simplejson (for seaf-cli)
  • libssl-dev
  1. sudo apt-get install autoconf automake libtool libevent-dev libcurl4-openssl-dev libgtk2.0-dev uuid-dev intltool libsqlite3-dev valac libjansson-dev cmake qtchooser qtbase5-dev libqt5webkit5-dev qttools5-dev qttools5-dev-tools libssl-dev

For a fresh Fedora 20 / 23 installation, the following will install all dependencies via YUM:

  1. $ sudo yum install wget gcc libevent-devel openssl-devel gtk2-devel libuuid-devel sqlite-devel jansson-devel intltool cmake libtool vala gcc-c++ qt5-qtbase-devel qt5-qttools-devel qt5-qtwebkit-devel libcurl-devel openssl-devel

Building

First you should get the latest source of libsearpc/ccnet/seafile/seafile-client:

Download the source tarball of the latest tag from

For example, if the latest released seafile client is 5.0.7, then just use the v5.0.7 tags of the four projects. You should get four tarballs:

  • libsearpc-v3.0-latest.tar.gz
  • ccnet-5.0.7.tar.gz (NOTE: from 6.2 version on, ccnet is no longer needed)
  • seafile-5.0.7.tar.gz
  • seafile-client-5.0.7.tar.gz
  1. # without alias wget= might not work
  2. shopt -s expand_aliases
  3. export version=5.0.7
  4. alias wget='wget --content-disposition -nc'
  5. wget https://github.com/haiwen/libsearpc/archive/v3.0-latest.tar.gz
  6. # NOTE: from 6.2 version on, ccnet is no longer needed
  7. wget https://github.com/haiwen/ccnet/archive/v${version}.tar.gz
  8. wget https://github.com/haiwen/seafile/archive/v${version}.tar.gz
  9. wget https://github.com/haiwen/seafile-client/archive/v${version}.tar.gz

Now uncompress them:

  1. tar xf libsearpc-3.0-latest.tar.gz
  2. # NOTE: from 6.2 version on, ccnet is no longer needed
  3. tar xf ccnet-${version}.tar.gz
  4. tar xf seafile-${version}.tar.gz
  5. tar xf seafile-client-${version}.tar.gz

To build Seafile client, you need first build libsearpc and ccnet, seafile.

set paths
  1. export PREFIX=/usr
  2. export PKG_CONFIG_PATH="$PREFIX/lib/pkgconfig:$PKG_CONFIG_PATH"
  3. export PATH="$PREFIX/bin:$PATH"
libsearpc
  1. cd libsearpc-3.0-latest
  2. ./autogen.sh
  3. ./configure --prefix=$PREFIX
  4. make
  5. sudo make install
  6. cd ..
ccnet

NOTE: from 6.2 version on, ccnet is no longer needed

  1. cd ccnet-${version}
  2. ./autogen.sh
  3. ./configure --prefix=$PREFIX
  4. make
  5. sudo make install
  6. cd ..
seafile
  1. cd seafile-${version}/
  2. ./autogen.sh
  3. ./configure --prefix=$PREFIX --disable-fuse
  4. make
  5. sudo make install
  6. cd ..

seafile-client

  1. cd seafile-client-${version}
  2. cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=$PREFIX .
  3. make
  4. sudo make install
  5. cd ..

custom prefix

when installing to a custom $PREFIX, i.e. /opt, you may need a script to set the path variables correctly

  1. cat >$PREFIX/bin/seafile-applet.sh <<END
  2. #!/bin/bash
  3. export LD_LIBRARY_PATH="$PREFIX/lib:$LD_LIBRARY_PATH"
  4. export PATH="$PREFIX/bin:$PATH"
  5. exec seafile-applet $@
  6. END
  7. cat >$PREFIX/bin/seaf-cli.sh <<END
  8. export LD_LIBRARY_PATH="$PREFIX/lib:$LD_LIBRARY_PATH"
  9. export PATH="$PREFIX/bin:$PATH"
  10. export PYTHONPATH=$PREFIX/lib/python2.7/site-packages
  11. exec seaf-cli $@
  12. END
  13. chmod +x $PREFIX/bin/seafile-applet.sh $PREFIX/bin/seaf-cli.sh

you can now start the client with $PREFIX/bin/seafile-applet.sh.