blob: a5646e499dabbfe4925eddb6ff096c8c76f37af1 [file] [log] [blame]
Alexander Afanasyev535119a2013-02-28 20:32:25 -08001# -*- 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
5PortGroup github 1.0
6
Alexander Afanasyev240b8182013-03-02 16:43:39 -08007github.setup cawka ndn-js ad659623235310878b4a4612a9e316b54774fab3
8checksums rmd160 9a70f864d2c7c3f60635524d7ff38434cde957cc \
9 sha256 f5072d45be76cb58eb926313381a99cfb66e04c1ff49b99695603b06143eb7c9
Alexander Afanasyev535119a2013-02-28 20:32:25 -080010
11name ccnx-wsproxy
12homepage http://github.com/remap/ndn-js
13license Permissive BSD
14version 0.1
Alexander Afanasyev240b8182013-03-02 16:43:39 -080015revision 1
Alexander Afanasyev535119a2013-02-28 20:32:25 -080016
17categories net ccnx
18maintainers ucla.edu:alexander.afanasyev
19
20description WebSocket proxy server between NDN javascript stack and ccnx
21
22depends_lib-append port:ccnx \
23 port:nodejs \
24 port:npm
25
26set ccnxuser ccnx
27
28supported_archs noarch
29use_configure yes
30
31configure.cmd ./waf configure
32configure.args-append --no-js
33
34build { }
35
36destroot.cmd ./waf
37destroot.destdir --destdir=${destroot}
38
39post-destroot {
40 system "echo \"su ${ccnxuser} -c 'NODE_PATH=${prefix}/lib/node_modules ${prefix}/bin/node ${prefix}/bin/ccnx-wsproxy-tcp.js \\\$0'\" > \"${destroot}${prefix}/bin/ccnx-wsproxy-tcp\""
41 file attributes "${destroot}${prefix}/bin/ccnx-wsproxy-tcp" -permissions 0755
42
43 system "echo \"su ${ccnxuser} -c 'NODE_PATH=${prefix}/lib/node_modules ${prefix}/bin/node ${prefix}/bin/ccnx-wsproxy-udp.js \\\$0'\" > \"${destroot}${prefix}/bin/ccnx-wsproxy-udp\""
44 file attributes "${destroot}${prefix}/bin/ccnx-wsproxy-udp" -permissions 0755
45}
46
47post-activate {
48 # install ccnx-wsproxy dependencies using npm
49 system "${prefix}/bin/npm install -g ws"
50 system "${prefix}/bin/npm install -g node-getopt"
51}
52
53startupitem.executable ${prefix}/bin/ccnx-wsproxy-udp -c 127.0.0.1 -m 40 -L 1
54
55startupitem.create yes
56startupitem.name ${name}
57
58startupitem.netchange no
59startupitem.logevents yes
60startupitem.logfile ${prefix}/var/log/ccnx-wsproxy.log