INSTALL 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384
  1. # How to build from source
  2. ## Requirements
  3. ### Common requirements
  4. In order to build csync, you need to install several components:
  5. - A C compiler
  6. - [CMake](http://www.cmake.org) >= 2.6.0.
  7. - [check](http://check.sourceforge.net) >= 0.9.5
  8. - [sqlite3](http://www.sqlite.org) >= 3.4
  9. - [libneon](http://www.webdav.org/neon/) >= 0.29.0
  10. optional:
  11. - [libsmbclient](http://www.samba.org) >= 3.5
  12. - [libssh](http://www.libssh.org) >= 0.5
  13. sqlite3 is a runtime requirement. libsmbclient is needed for
  14. the smb plugin, libssh for the sftp plugin. libneon is required for the
  15. ownCloud plugin.
  16. Note that these version numbers are version we know works correctly. If you
  17. build and run csync successfully with an older version, please let us know.
  18. ## Building
  19. First, you need to configure the compilation, using CMake. Go inside the
  20. `build` dir. Create it if it doesn't exist.
  21. GNU/Linux and MacOS X:
  22. cmake -DCMAKE_BUILD_TYPE=Debug ..
  23. make
  24. ### CMake standard options
  25. Here is a list of the most interesting options provided out of the box by CMake.
  26. - CMAKE_BUILD_TYPE: The type of build (can be Debug Release MinSizeRel RelWithDebInfo)
  27. - CMAKE_INSTALL_PREFIX: The prefix to use when running make install (Default to
  28. /usr/local on GNU/Linux and MacOS X)
  29. - CMAKE_C_COMPILER: The path to the C compiler
  30. - CMAKE_CXX_COMPILER: The path to the C++ compiler
  31. ### CMake options defined for csync
  32. Options are defined in the following files:
  33. - DefineOptions.cmake
  34. They can be changed with the -D option:
  35. `cmake -DCMAKE_BUILD_TYPE=Debug -DWITH_LOG4C=OFF ..`
  36. ### Browsing/editing CMake options
  37. In addition to passing options on the command line, you can browse and edit
  38. CMake options using `cmakesetup` (Windows) or `ccmake` (GNU/Linux and MacOS X).
  39. - Go to the build dir
  40. - On Windows: run `cmakesetup`
  41. - On GNU/Linux and MacOS X: run `ccmake ..`
  42. ## Installing
  43. Befor installing you can run the tests if everything is working:
  44. make test
  45. If you want to install csync after compilation run:
  46. make install
  47. ## Running
  48. The csync binary can be found in the `build/client` directory.
  49. ## About this document
  50. This document is written using [Markdown][] syntax, making it possible to
  51. provide usable information in both plain text and HTML format. Whenever
  52. modifying this document please use [Markdown][] syntax.
  53. [markdown]: http://www.daringfireball.net/projects/markdown