Alexander Afanasyev | 284257b | 2014-04-11 14:16:51 -0700 | [diff] [blame] | 1 | .. _NFD Installation Instructions: |
| 2 | |
| 3 | NFD Installation Instructions |
| 4 | ============================= |
| 5 | |
| 6 | Prerequisites |
| 7 | ------------- |
| 8 | |
Alexander Afanasyev | 4a77136 | 2014-04-24 21:29:33 -0700 | [diff] [blame] | 9 | - `ndn-cxx library <https://github.com/named-data/ndn-cxx>`__ |
Alexander Afanasyev | 284257b | 2014-04-11 14:16:51 -0700 | [diff] [blame] | 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 | |
Alexander Afanasyev | 5c86570 | 2014-05-01 12:30:03 -0700 | [diff] [blame] | 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. |
Alexander Afanasyev | 284257b | 2014-04-11 14:16:51 -0700 | [diff] [blame] | 21 | |
| 22 | - ``libpcap`` |
| 23 | |
| 24 | Comes with base on OS X 10.8 and 10.9: |
| 25 | |
| 26 | On Ubuntu >= 12.04: |
| 27 | |
| 28 | :: |
| 29 | |
| 30 | sudo apt-get install libpcap-dev |
| 31 | |
| 32 | To build manpages and API documentation: |
| 33 | |
| 34 | - ``doxygen`` |
| 35 | - ``graphviz`` |
| 36 | - ``python-sphinx`` |
| 37 | |
| 38 | On OS X 10.8 and 10.9 with macports: |
| 39 | |
| 40 | :: |
| 41 | |
| 42 | sudo port install doxygen graphviz py27-sphinx sphinx_select |
| 43 | sudo port select sphinx py27-sphinx |
| 44 | |
| 45 | On Ubuntu >= 12.04: |
| 46 | |
| 47 | :: |
| 48 | |
| 49 | sudo apt-get install doxygen graphviz python-sphinx |
| 50 | |
| 51 | Build |
| 52 | ----- |
| 53 | |
| 54 | The following commands should be used to build NFD: |
| 55 | |
| 56 | :: |
| 57 | |
| 58 | ./waf configure |
| 59 | ./waf |
| 60 | sudo ./waf install |
| 61 | |
| 62 | Refer to :ref:`NFD Configuration Tips` (``README.rst``) for more options that can be used |
| 63 | during ``configure`` stage and how to properly configure and run NFD. |
| 64 | |
| 65 | In some configurations, configuration step may require small modification. For example, on |
| 66 | OSX that uses macports (correct the path if macports was not installed in the default path |
| 67 | ``/opt/local``): |
| 68 | |
| 69 | :: |
| 70 | |
| 71 | export PKG_CONFIG_PATH=/opt/local/lib/pkgconfig:/usr/local/lib/pkgconfig:/usr/lib/pkgconfig:$PKG_CONFIG_PATH |
| 72 | ./waf configure |
| 73 | ./waf |
| 74 | sudo ./waf install |
| 75 | |
| 76 | On some Linux distributions (e.g., Fedora 20): |
| 77 | |
| 78 | :: |
| 79 | |
| 80 | export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig:/usr/lib/pkgconfig:/usr/lib64/pkgconfig:$PKG_CONFIG_PATH |
| 81 | ./waf configure |
| 82 | ./waf |
| 83 | sudo ./waf install |
| 84 | |
| 85 | Building documentation |
| 86 | ---------------------- |
| 87 | |
| 88 | NFD tutorials and API documentation can be built using the following commands: |
| 89 | |
| 90 | :: |
| 91 | |
| 92 | # Full set of documentation (tutorials + API) in build/docs |
| 93 | ./waf docs |
| 94 | |
| 95 | # Only tutorials in `build/docs` |
| 96 | ./waf sphinx |
| 97 | |
| 98 | # Only API docs in `build/docs/doxygen` |
| 99 | ./waf doxgyen |
| 100 | |
| 101 | |
| 102 | Manpages are automatically created and installed during the normal build process |
| 103 | (e.g., during ``./waf`` and ``./waf install``), if ``python-sphinx`` module is detected |
| 104 | during ``./waf configure`` stage. By default, manpages are installed into |
| 105 | ``${PREFIX}/share/man`` (where default value for ``PREFIX`` is ``/usr/local``). This |
| 106 | location can be changed during ``./waf configure`` stage using ``--prefix``, |
| 107 | ``--datarootdir``, or ``--mandir`` options. |
| 108 | |
| 109 | For more details, refer to ``./waf --help``. |