Alexander Afanasyev | ad9f64f | 2012-08-24 23:22:48 -0700 | [diff] [blame^] | 1 | # -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4 |
| 2 | # $Id$ |
| 3 | |
| 4 | PortSystem 1.0 |
| 5 | name ccnping |
| 6 | version 0.1 |
| 7 | revision 1 |
| 8 | epoch 1 |
| 9 | categories net |
| 10 | platforms darwin |
| 11 | license GPL LGPL |
| 12 | maintainers ucla.edu:alexander.afanasyev |
| 13 | description ping command equivalent for CCNx |
| 14 | long_description ccnpingserver and ccnping are CCNx applications used for testing connectivity |
| 15 | homepage https://github.com/NDN-Routing/ccnping |
| 16 | |
| 17 | use_configure false |
| 18 | |
| 19 | fetch.type git |
| 20 | git.url https://github.com/NDN-Routing/ccnping.git |
| 21 | git.branch master |
| 22 | |
| 23 | use_parallel_build no |
| 24 | |
| 25 | depends_lib port:ccnx |
| 26 | |
| 27 | # User should be already created by ccnx port |
| 28 | set ccnxuser ccnx |
| 29 | set ccnxgroup ccnx |
| 30 | set ccnxdir ${prefix}/etc/ccnx |
| 31 | |
| 32 | build.env-append CFLAGS=-I${prefix}/include |
| 33 | build.env-append LIBS=-L${prefix}/lib |
| 34 | build.env-append INSTALL_BASE=${prefix} |
| 35 | build.env-append CC=${configure.cc} |
| 36 | |
| 37 | destroot { |
| 38 | system "echo /ndn/`hostname` > ${ccnxdir}/ccnpingserver.conf.example" |
| 39 | xinstall -W ${worksrcpath} ccnping ccnpingserver ${destroot}${prefix}/bin/ |
| 40 | } |
| 41 | |
| 42 | patchfiles patch-Makefile.diff |
| 43 | |
| 44 | # startupitem.executable "su ${ccnxuser} -c \"${prefix}/bin/ccnpingserver `cat ${ccnxdir}/ccnpingserver.conf`\"" |
| 45 | # startupitem.create yes |
| 46 | # startupitem.name ccnping |
| 47 | |
| 48 | notes " |
| 49 | ccnpingserver is usually run on a hub. For example, on Arizona hub, ccnpingserver |
| 50 | is started by running \[ccnpingserver /ndn/arizona.edu\]. Then we can run |
| 51 | \[ccnping /ndn/arizona.edu\] from other nodes to test connectivity towards name |
| 52 | prefix /ndn/arizona.edu. |
| 53 | " |
| 54 | |
| 55 | # To run ccnpingserver, a name prefix should be configured in \[${ccnxdir}/ccnpingserver.conf\] file. |