FreeBSD

Preparation

support for FreeBSD is still under construction.

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 FreeBSD Ports. You might install your ports
manually or via pkgng.

  • devel/autoconf
  • devel/automake
  • textproc/intltool
  • textproc/gsed
  • devel/libtool
  • devel/libevent2
  • ftp/curl
  • devel/glib20
  • misc/ossp-uuid
  • databases/sqlite3
  • devel/jansson
  • lang/vala
  • devel/cmake
  • archivers/libarchive
  • devel/py-simplejson (removed in furture release)

GUI

  • devel/qt4
  1. #portmaster devel/autoconf devel/automake textproc/intltool textproc/gsed \
  2. devel/libtool devel/libevent2 ftp/curl devel/glib20 misc/ossp-uuid databases/sqlite3 \
  3. devel/jansson lang/vala devel/cmake devel/py-simplejson archivers/libarchive

For a fresh PkgNG users,

  1. #pkg install autoconf automake intltool gsed libtool libevent2 curl \
  2. glib20 ossp-uuid sqlite3 jansson vala cmake py-simplejson libarchive

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 3.1.0, then just use the v3.1.0 tags of the four projects. You should get four tarballs:

  • libsearpc-v3.0-latest.tar.gz
  • ccnet-3.1.0.tar.gz
  • seafile-3.1.0.tar.gz
  • seafile-client-3.1.0.tar.gz
  1. export version=3.1.0
  2. alias wget='wget --content-disposition -nc'
  3. wget https://github.com/haiwen/libsearpc/archive/v3.0-latest.tar.gz
  4. wget https://github.com/haiwen/ccnet/archive/v${version}.tar.gz
  5. wget https://github.com/haiwen/seafile/archive/v${version}.tar.gz
  6. wget https://github.com/haiwen/seafile-client/archive/v${version}.tar.gz

Now uncompress them:

  1. tar xf libsearpc-v3.0-latest.tar.gz
  2. tar xf ccnet-${version}.tar.gz
  3. tar xf seafile-${version}.tar.gz
  4. tar xf seafile-client-${version}.tar.gz

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

set paths
  1. ln -sfh ../libdata/pkgconfig /usr/local/lib/pkgconfig
libsearpc
  1. cd libsearpc-${version}
  2. ./autogen.sh
  3. ./configure --prefix=$PREFIX
  4. make
  5. sudo make install
ccnet
  1. export CFLAGS="-I/usr/local/include/ossp/uuid -I/usr/local/include/event2"
  2. export LDFLAGS="-L/usr/local/lib -L/usr/local/lib/event2"
  3. cd ccnet-${version}
  4. ./autogen.sh
  5. ./configure --prefix=$PREFIX
  6. make
  7. sudo make install
seafile
  1. cd seafile-${version}/
  2. ./autogen.sh
  3. ./configure --prefix=$PREFIX
  4. make
  5. sudo make install

seafile-client

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

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. exec seafile-applet $@
  4. END
  5. cat >$PREFIX/bin/seaf-cli.sh <<END
  6. export PYTHONPATH=/usr/local/lib/python2.7/site-packages
  7. exec seaf-cli $@
  8. END
  9. chmod +x $PREFIX/bin/seafile-applet.sh $PREFIX/bin/seaf-cli.sh

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