| 1 |
Obtaining the sources |
| 2 |
===================== |
| 3 |
|
| 4 |
Source tarballs for nss_wrapper can be downloaded from |
| 5 |
|
| 6 |
https://ftp.samba.org/pub/cwrap/ |
| 7 |
|
| 8 |
The source code repository for socket wrapper is located under |
| 9 |
|
| 10 |
git://git.samba.org/nss_wrapper.git |
| 11 |
|
| 12 |
To create a local copy, run |
| 13 |
|
| 14 |
$ git clone git://git.samba.org/nss_wrapper.git |
| 15 |
$ cd nss_wrapper |
| 16 |
|
| 17 |
Building from sources |
| 18 |
===================== |
| 19 |
|
| 20 |
nss_wrapper uses cmake (www.cmake.org) as its build system. |
| 21 |
|
| 22 |
In an unpacked sources base directory, create a directory to |
| 23 |
contain the build results, e.g. |
| 24 |
|
| 25 |
$ mkdir obj |
| 26 |
$ cd obj |
| 27 |
|
| 28 |
Note that "obj" is just an example. The directory can |
| 29 |
be named arbitrarily. |
| 30 |
|
| 31 |
Next, run cmake to configure the build, e.g. |
| 32 |
|
| 33 |
$ cmake -DCMAKE_INSTALL_PREFIX=<prefix> .. |
| 34 |
|
| 35 |
or on a 64 bit red hat system: |
| 36 |
|
| 37 |
$ cmake -DCMAKE_INSTALL_PREFIX=<prefix> -DLIB_SUFFIX=64 .. |
| 38 |
|
| 39 |
The "<prefix>" should be replaced by the intended installation |
| 40 |
target prefix directory, typically /usr or /usr/local. |
| 41 |
|
| 42 |
Note that the target directory does not have to be a direct |
| 43 |
or indirect subdirectory of the source base directory: It can |
| 44 |
be an arbitrary directory in the system. In the general case, |
| 45 |
".." has to be replaced by a relative or absolute path of the |
| 46 |
source base directory in the "cmake" command line. |
| 47 |
|
| 48 |
One can control the build type with "-DCMAKE_BUILD_TYPE=<mode>" |
| 49 |
where <mode> can be one of Debug, Release, RelWithDebInfo, and |
| 50 |
some more (see cmake.org). The default is "RelWithDebInfo". |
| 51 |
|
| 52 |
After configuring with cmake, run the build with |
| 53 |
|
| 54 |
$ make |
| 55 |
|
| 56 |
Unit testing |
| 57 |
============ |
| 58 |
|
| 59 |
In order to support running the test suite after building, |
| 60 |
the cmocka unit test framework needs to be installed (cmocka.org), |
| 61 |
and you need to specify |
| 62 |
|
| 63 |
-DUNIT_TESTING=ON |
| 64 |
|
| 65 |
in the cmake run. After running "make", |
| 66 |
|
| 67 |
$ make test |
| 68 |
|
| 69 |
runs the test suite. |
| 70 |
|
| 71 |
Installing |
| 72 |
========== |
| 73 |
|
| 74 |
nss_wrapper is installed into the prefix directory |
| 75 |
after running "cmake" and "make" with |
| 76 |
|
| 77 |
$ make install |
| 78 |
|