blob: 6b38d719a556117a5872f5984a3266dbaf4aa097 [file] [log] [blame]
Alexander Afanasyevab430ee2014-08-05 21:11:25 -07001.. _NDNS Installation Instructions:
2
3NDNS Installation Instructions
4=============================
5
6Prerequisites
7-------------
8
9- `ndn-cxx library <https://github.com/named-data/ndn-cxx>`__
10 and its requirements:
11
12 - ``libcrypto``
13 - ``libsqlite3``
14 - ``libcrypto++``
15 - ``pkg-config``
16 - Boost libraries (>= 1.48)
17 - OSX Security framework (on OSX platform only)
18
19 Refer to `Getting started with ndn-cxx <http://named-data.net/doc/ndn-cxx/current/INSTALL.html>`_
20 for detailed installation instructions of the library.
21
22To build manpages and API documentation:
23
24- ``doxygen``
25- ``graphviz``
26- ``python-sphinx``
27
28 On OS X 10.8 and 10.9 with macports:
29
30 ::
31
32 sudo port install doxygen graphviz py27-sphinx sphinx_select
33 sudo port select sphinx py27-sphinx
34
35 On Ubuntu >= 12.04:
36
37 ::
38
39 sudo apt-get install doxygen graphviz python-sphinx
40
41Build
42-----
43
44The following commands should be used to build NDNS:
45
46::
47
48 ./waf configure
49 ./waf
50 sudo ./waf install
51
52Refer to ``./waf --help`` for more options that can be used during ``configure`` stage and
53how to properly configure and run NDNS.
54
55In some configurations, configuration step may require small modification. For example, on
56OSX that uses macports (correct the path if macports was not installed in the default path
57``/opt/local``):
58
59::
60
61 export PKG_CONFIG_PATH=/opt/local/lib/pkgconfig:/usr/local/lib/pkgconfig:/usr/lib/pkgconfig:$PKG_CONFIG_PATH
62 ./waf configure
63 ./waf
64 sudo ./waf install
65
66On some Linux distributions (e.g., Fedora 20):
67
68::
69
70 export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig:/usr/lib/pkgconfig:/usr/lib64/pkgconfig:$PKG_CONFIG_PATH
71 ./waf configure
72 ./waf
73 sudo ./waf install
74
75Debug symbols
76+++++++++++++
77
78The default compiler flags enable debug symbols to be included in binaries. This
79potentially allows more meaningful debugging if NDNS or other tools happen to crash.
80
81If it is undesirable, default flags can be easily overridden. The following example shows
82how to completely disable debug symbols and configure NDNS to be installed into ``/usr``
83with configuration in ``/etc`` folder.
84
85::
86
87 CXXFLAGS="-O2" ./waf configure --prefix=/usr --sysconfdir=/etc
88 ./waf
89 sudo ./waf install
90
91Building documentation
92----------------------
93
94NDNS tutorials and API documentation can be built using the following commands:
95
96::
97
98 # Full set of documentation (tutorials + API) in build/docs
99 ./waf docs
100
101 # Only tutorials in `build/docs`
102 ./waf sphinx
103
104 # Only API docs in `build/docs/doxygen`
105 ./waf doxgyen
106
107
108Manpages are automatically created and installed during the normal build process
109(e.g., during ``./waf`` and ``./waf install``), if ``python-sphinx`` module is detected
110during ``./waf configure`` stage. By default, manpages are installed into
111``${PREFIX}/share/man`` (where default value for ``PREFIX`` is ``/usr/local``). This
112location can be changed during ``./waf configure`` stage using ``--prefix``,
113``--datarootdir``, or ``--mandir`` options.
114
115For more details, refer to ``./waf --help``.