File: install.md

package info (click to toggle)
librsync 2.3.4-1.1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 1,204 kB
  • sloc: ansic: 4,956; sh: 245; xml: 182; perl: 30; makefile: 21
file content (98 lines) | stat: -rw-r--r-- 2,286 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
# Installing {#page_install}

## Requirements

To build librsync you will need:

* A C compiler and appropriate headers and libraries

* [CMake]

* Some build tool supported by CMake: [Make] is most common,
  [Ninja] is nicer.

* [popt] command line parsing library

* [Doxygen] - optional, to build docs

[popt]: http://rpm5.org/files/popt/
[CMake]: http://cmake.org/
[Doxygen]: https://www.stack.nl/~dimitri/doxygen
[Ninja]: http://build-ninja.org
[Make]: https://www.gnu.org/software/make/

## Building

Generate the Makefile by running

    $ cmake .

After building you can install `rdiff` and `librsync` for system-wide use.

    $ make

To build and run the tests:

    $ make check

To install:

    $ sudo make install

To build the documentation:

    $ make doc

librsync should be widely portable. Patches to fix portability bugs are
welcome.

If you are using GNU libc, you might like to use

    MALLOC_CHECK_=2 ./rdiff

to detect some allocation bugs.

librsync has annotations for the SPLINT static checking tool.


## Build options

The build is customizable by using CMake options in the configure step:

    $ cmake -D <option-name>=<value> .

If you are interested in building only the `librsync` target, you can skip
the `rdiff` build. In this way you don't need its dependencies (e.g. `popt`).
To do that, set the `BUILD_RDIFF` option to `OFF`:

    $ cmake -D BUILD_RDIFF=OFF .

Be aware that many tests depend on `rdiff` executable, so when it is disabled,
also those tests are.

Compression support is under development (see
[#8](https://github.com/librsync/librsync/issues/8)). It is so disabled by
default. You can turn it on by using `ENABLE_COMPRESSION` option:

    $ cmake -D ENABLE_COMPRESSION=ON .

To build code for debug trace messages:

    $ cmake -D ENABLE_TRACE=ON .

## Ninja builds

CMake generates input files for an underlying build tool that will actually do
the build. Typically this is Make, but others are supported. In particular
[Ninja] is a nice alternative. To use it:

    $ cmake -G Ninja .
    $ ninja check


## Cygwin

With Cygwin you can build using gcc as under a normal unix system. It
is also possible to compile under Cygwin using MSVC++. You must have
environment variables needed by MSVC set using the Vcvars32.bat
script.