blob: 8481ff007d2f32f3bfab1f542b405ca9fb732209 [file] [log] [blame]
Alexander Afanasyev9944ebc2012-08-20 18:40:12 -07001# -*- 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
4PortSystem 1.0
5name ccnx
Alexander Afanasyev8e850282012-08-23 10:04:58 -07006version 0.6.1
Alexander Afanasyev9944ebc2012-08-20 18:40:12 -07007revision 1
8epoch 1
9categories net
10platforms darwin
11license GPL LGPL
12maintainers ucla.edu:alexander.afanasyev
13description ProjectCCNx implementation of Content Centric Networking (CCN) / \
14 Named Data Networking (NDN) architecture
15long_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.
23homepage http://www.ccnx.org/
Alexander Afanasyev8e850282012-08-23 10:04:58 -070024
Alexander Afanasyevc1ec69f2012-08-24 18:10:09 -070025# fetch.type git
26# git.url https://github.com/ProjectCCNx/ccnx.git
27# git.branch ccnx-0.6.1
Alexander Afanasyev8e850282012-08-23 10:04:58 -070028
Alexander Afanasyevc1ec69f2012-08-24 18:10:09 -070029master_sites http://www.ccnx.org/releases/
30checksums rmd160 073478f3d5818b0e4fe09e21a727e5f3207e4277 \
31 sha256 bfaae10c2c1a327d77f752737b60243e23fd8f3a7c7025ae92221ba0a700b889
Alexander Afanasyev9944ebc2012-08-20 18:40:12 -070032
Alexander Afanasyevc1ec69f2012-08-24 18:10:09 -070033use_parallel_build yes
Alexander Afanasyev9944ebc2012-08-20 18:40:12 -070034
35depends_lib port:openssl \
36 port:expat \
37 port:libpcap \
38 port:libxml2
39
Alexander Afanasyevc1ec69f2012-08-24 18:10:09 -070040set ccnxuser ccnx
41set ccnxgroup ccnx
42set ccnxdir ${prefix}/etc/ccnx
43
44add_users ${ccnxuser} shell=/bin/sh group=${ccnxgroup} \
45 home=${ccnxdir} \
46 realname=CCNx\ Account
47
48default_variants +java +apps
49
50variant java description {Enable Java API build} {
51 configure.env-delete BUILD_JAVA=false
52}
53
54variant apps requires java description {Enable build of reference applications} {
55 configure.env-delete BUILD_APPS=false
56}
Alexander Afanasyev9944ebc2012-08-20 18:40:12 -070057
58configure.env-append OPENSSL_CFLAGS=-I${prefix}/include
59configure.env-append OPENSSL_LIBS=-L${prefix}/lib
60configure.env-append INSTALL_BASE=${prefix}
Alexander Afanasyevc1ec69f2012-08-24 18:10:09 -070061configure.env-append BUILD_JAVA=false
62configure.env-append BUILD_APPS=false
Alexander Afanasyev8e850282012-08-23 10:04:58 -070063configure.cflags -DCCNX_DIR=\\\"${prefix}/etc/ccnx\\\"
Alexander Afanasyev9944ebc2012-08-20 18:40:12 -070064
65pre-build {
66 reinplace "s|\$HOME/.ccnx/|${prefix}/etc/ccnx/|g" ${worksrcpath}/csrc/util/ccndstart.sh
67}
68
Alexander Afanasyevc1ec69f2012-08-24 18:10:09 -070069post-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 Afanasyevad9f64f2012-08-24 23:22:48 -070079
80 system "chown ${ccnxuser}:${ccnxgroup} ${destroot}${prefix}/etc/ccnx"
Alexander Afanasyevc1ec69f2012-08-24 18:10:09 -070081}
82
Alexander Afanasyev9944ebc2012-08-20 18:40:12 -070083build.env-append OPENSSL_CFLAGS=-I${prefix}/include
84build.env-append OPENSSL_LIBS=-L${prefix}/lib
Alexander Afanasyevc1ec69f2012-08-24 18:10:09 -070085build.env-append INSTALL_BASE=${prefix}
Alexander Afanasyev9944ebc2012-08-20 18:40:12 -070086
Alexander Afanasyev196c6722012-08-20 18:49:33 -070087patchfiles patch-macports-customizations.diff
Alexander Afanasyev9944ebc2012-08-20 18:40:12 -070088
89startupitem.pidfile none
Alexander Afanasyevc1ec69f2012-08-24 18:10:09 -070090startupitem.start "su ${ccnxuser} -c \"${prefix}/bin/ccndstart\""
91startupitem.stop "su ${ccnxuser} -c \"${prefix}/bin/ccndstop\""
Alexander Afanasyeveae69362012-08-27 09:49:56 -070092startupitem.restart "su ${ccnxuser} -c \"${prefix}/bin/ccndc -f ${prefix}/etc/ccnx/ccnd.conf\""
Alexander Afanasyev9944ebc2012-08-20 18:40:12 -070093
94startupitem.create yes
95startupitem.name ccnx
96
97startupitem.netchange yes
98startupitem.logevents yes
99startupitem.logfile ${prefix}/var/log/ccnx.log
100
101notes "
Alexander Afanasyeveae69362012-08-27 09:49:56 -0700102In order repo to work, you need to add the following lines at the end of your
103\[~/.bash_profile\]:
Alexander Afanasyev9944ebc2012-08-20 18:40:12 -0700104
105 export CCNR_DIRECTORY=${prefix}/etc/ccnx/repo
106
Alexander Afanasyeveae69362012-08-27 09:49:56 -0700107To configure environment variables for ccnd, edit your
108\[${prefix}/etc/ccnx/ccndrc\]. For example,
Alexander Afanasyev9944ebc2012-08-20 18:40:12 -0700109
110 CCND_LOG=${prefix}/var/log/ccnd.log
111 CCND_DEBUG=16
112
Alexander Afanasyeveae69362012-08-27 09:49:56 -0700113To add static FIB entries, edit your \[${prefix}/etc/ccnx/ccnd.conf\].
114For example,
Alexander Afanasyev9944ebc2012-08-20 18:40:12 -0700115
116 add ccnx:/ccnx.org udp 224.0.23.170 59695
117
Alexander Afanasyeveae69362012-08-27 09:49:56 -0700118Upon any networking change event (new connection or awaking from the sleep
119phase), all static FIB entries will be reapplied automatically.
120
121For more information and documentation, refer to man pages and
122http://www.ccnx.org website.
Alexander Afanasyev9944ebc2012-08-20 18:40:12 -0700123"