Alexander Afanasyev | 9944ebc | 2012-08-20 18:40:12 -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 ccnx |
Alexander Afanasyev | 8e85028 | 2012-08-23 10:04:58 -0700 | [diff] [blame] | 6 | version 0.6.1 |
Alexander Afanasyev | 9944ebc | 2012-08-20 18:40:12 -0700 | [diff] [blame] | 7 | revision 1 |
| 8 | epoch 1 |
| 9 | categories net |
| 10 | platforms darwin |
| 11 | license GPL LGPL |
| 12 | maintainers ucla.edu:alexander.afanasyev |
| 13 | description ProjectCCNx implementation of Content Centric Networking (CCN) / \ |
| 14 | Named Data Networking (NDN) architecture |
| 15 | long_description Project CCNx® exists to develop, promote, and evaluate a new \ |
| 16 | approach to communication architecture we call content-centric \ |
| 17 | networking. We seek to carry out this mission by creating and \ |
| 18 | publishing open protocol specifications and an open source \ |
| 19 | software reference implementation of those protocols. We provide \ |
| 20 | support for a community of people interested in experimentation, \ |
| 21 | research, and building applications with this technology, all \ |
| 22 | contributing to its evolution. |
| 23 | homepage http://www.ccnx.org/ |
Alexander Afanasyev | 8e85028 | 2012-08-23 10:04:58 -0700 | [diff] [blame] | 24 | |
Alexander Afanasyev | c1ec69f | 2012-08-24 18:10:09 -0700 | [diff] [blame] | 25 | # fetch.type git |
| 26 | # git.url https://github.com/ProjectCCNx/ccnx.git |
| 27 | # git.branch ccnx-0.6.1 |
Alexander Afanasyev | 8e85028 | 2012-08-23 10:04:58 -0700 | [diff] [blame] | 28 | |
Alexander Afanasyev | c1ec69f | 2012-08-24 18:10:09 -0700 | [diff] [blame] | 29 | master_sites http://www.ccnx.org/releases/ |
| 30 | checksums rmd160 073478f3d5818b0e4fe09e21a727e5f3207e4277 \ |
| 31 | sha256 bfaae10c2c1a327d77f752737b60243e23fd8f3a7c7025ae92221ba0a700b889 |
Alexander Afanasyev | 9944ebc | 2012-08-20 18:40:12 -0700 | [diff] [blame] | 32 | |
Alexander Afanasyev | c1ec69f | 2012-08-24 18:10:09 -0700 | [diff] [blame] | 33 | use_parallel_build yes |
Alexander Afanasyev | 9944ebc | 2012-08-20 18:40:12 -0700 | [diff] [blame] | 34 | |
| 35 | depends_lib port:openssl \ |
| 36 | port:expat \ |
| 37 | port:libpcap \ |
| 38 | port:libxml2 |
| 39 | |
Alexander Afanasyev | c1ec69f | 2012-08-24 18:10:09 -0700 | [diff] [blame] | 40 | set ccnxuser ccnx |
| 41 | set ccnxgroup ccnx |
| 42 | set ccnxdir ${prefix}/etc/ccnx |
| 43 | |
| 44 | add_users ${ccnxuser} shell=/bin/sh group=${ccnxgroup} \ |
| 45 | home=${ccnxdir} \ |
| 46 | realname=CCNx\ Account |
| 47 | |
| 48 | default_variants +java +apps |
| 49 | |
| 50 | variant java description {Enable Java API build} { |
| 51 | configure.env-delete BUILD_JAVA=false |
| 52 | } |
| 53 | |
| 54 | variant apps requires java description {Enable build of reference applications} { |
| 55 | configure.env-delete BUILD_APPS=false |
| 56 | } |
Alexander Afanasyev | 9944ebc | 2012-08-20 18:40:12 -0700 | [diff] [blame] | 57 | |
| 58 | configure.env-append OPENSSL_CFLAGS=-I${prefix}/include |
| 59 | configure.env-append OPENSSL_LIBS=-L${prefix}/lib |
| 60 | configure.env-append INSTALL_BASE=${prefix} |
Alexander Afanasyev | c1ec69f | 2012-08-24 18:10:09 -0700 | [diff] [blame] | 61 | configure.env-append BUILD_JAVA=false |
| 62 | configure.env-append BUILD_APPS=false |
Alexander Afanasyev | 8e85028 | 2012-08-23 10:04:58 -0700 | [diff] [blame] | 63 | configure.cflags -DCCNX_DIR=\\\"${prefix}/etc/ccnx\\\" |
Alexander Afanasyev | 9944ebc | 2012-08-20 18:40:12 -0700 | [diff] [blame] | 64 | |
| 65 | pre-build { |
| 66 | reinplace "s|\$HOME/.ccnx/|${prefix}/etc/ccnx/|g" ${worksrcpath}/csrc/util/ccndstart.sh |
| 67 | } |
| 68 | |
Alexander Afanasyev | c1ec69f | 2012-08-24 18:10:09 -0700 | [diff] [blame] | 69 | post-destroot { |
| 70 | system "mkdir -p ${destroot}${prefix}/var/log" |
| 71 | system "touch ${destroot}${prefix}/var/log/ccnd.log" |
| 72 | system "chown ${ccnxuser}:${ccnxgroup} ${destroot}${prefix}/var/log/ccnd.log" |
| 73 | |
| 74 | file mkdir ${destroot}${prefix}/etc/ccnx |
| 75 | file copy ${worksrcpath}/csrc/libexec/ccnd.conf.sample ${destroot}${prefix}/etc/ccnx/ |
| 76 | |
| 77 | system "echo CCND_LOG=${prefix}/var/log/ccnd.log > ${destroot}${prefix}/etc/ccnx/ccndrc.sample" |
| 78 | system "echo CCND_DEBUG=16 >> ${destroot}${prefix}/etc/ccnx/ccndrc.sample" |
Alexander Afanasyev | ad9f64f | 2012-08-24 23:22:48 -0700 | [diff] [blame] | 79 | |
| 80 | system "chown ${ccnxuser}:${ccnxgroup} ${destroot}${prefix}/etc/ccnx" |
Alexander Afanasyev | c1ec69f | 2012-08-24 18:10:09 -0700 | [diff] [blame] | 81 | } |
| 82 | |
Alexander Afanasyev | 9944ebc | 2012-08-20 18:40:12 -0700 | [diff] [blame] | 83 | build.env-append OPENSSL_CFLAGS=-I${prefix}/include |
| 84 | build.env-append OPENSSL_LIBS=-L${prefix}/lib |
Alexander Afanasyev | c1ec69f | 2012-08-24 18:10:09 -0700 | [diff] [blame] | 85 | build.env-append INSTALL_BASE=${prefix} |
Alexander Afanasyev | 9944ebc | 2012-08-20 18:40:12 -0700 | [diff] [blame] | 86 | |
Alexander Afanasyev | 196c672 | 2012-08-20 18:49:33 -0700 | [diff] [blame] | 87 | patchfiles patch-macports-customizations.diff |
Alexander Afanasyev | 9944ebc | 2012-08-20 18:40:12 -0700 | [diff] [blame] | 88 | |
| 89 | startupitem.pidfile none |
Alexander Afanasyev | c1ec69f | 2012-08-24 18:10:09 -0700 | [diff] [blame] | 90 | startupitem.start "su ${ccnxuser} -c \"${prefix}/bin/ccndstart\"" |
| 91 | startupitem.stop "su ${ccnxuser} -c \"${prefix}/bin/ccndstop\"" |
Alexander Afanasyev | eae6936 | 2012-08-27 09:49:56 -0700 | [diff] [blame^] | 92 | startupitem.restart "su ${ccnxuser} -c \"${prefix}/bin/ccndc -f ${prefix}/etc/ccnx/ccnd.conf\"" |
Alexander Afanasyev | 9944ebc | 2012-08-20 18:40:12 -0700 | [diff] [blame] | 93 | |
| 94 | startupitem.create yes |
| 95 | startupitem.name ccnx |
| 96 | |
| 97 | startupitem.netchange yes |
| 98 | startupitem.logevents yes |
| 99 | startupitem.logfile ${prefix}/var/log/ccnx.log |
| 100 | |
| 101 | notes " |
Alexander Afanasyev | eae6936 | 2012-08-27 09:49:56 -0700 | [diff] [blame^] | 102 | In order repo to work, you need to add the following lines at the end of your |
| 103 | \[~/.bash_profile\]: |
Alexander Afanasyev | 9944ebc | 2012-08-20 18:40:12 -0700 | [diff] [blame] | 104 | |
| 105 | export CCNR_DIRECTORY=${prefix}/etc/ccnx/repo |
| 106 | |
Alexander Afanasyev | eae6936 | 2012-08-27 09:49:56 -0700 | [diff] [blame^] | 107 | To configure environment variables for ccnd, edit your |
| 108 | \[${prefix}/etc/ccnx/ccndrc\]. For example, |
Alexander Afanasyev | 9944ebc | 2012-08-20 18:40:12 -0700 | [diff] [blame] | 109 | |
| 110 | CCND_LOG=${prefix}/var/log/ccnd.log |
| 111 | CCND_DEBUG=16 |
| 112 | |
Alexander Afanasyev | eae6936 | 2012-08-27 09:49:56 -0700 | [diff] [blame^] | 113 | To add static FIB entries, edit your \[${prefix}/etc/ccnx/ccnd.conf\]. |
| 114 | For example, |
Alexander Afanasyev | 9944ebc | 2012-08-20 18:40:12 -0700 | [diff] [blame] | 115 | |
| 116 | add ccnx:/ccnx.org udp 224.0.23.170 59695 |
| 117 | |
Alexander Afanasyev | eae6936 | 2012-08-27 09:49:56 -0700 | [diff] [blame^] | 118 | Upon any networking change event (new connection or awaking from the sleep |
| 119 | phase), all static FIB entries will be reapplied automatically. |
| 120 | |
| 121 | For more information and documentation, refer to man pages and |
| 122 | http://www.ccnx.org website. |
Alexander Afanasyev | 9944ebc | 2012-08-20 18:40:12 -0700 | [diff] [blame] | 123 | " |