blob: 9fca0e2e10a41fbda522a4a4cb69338ca740a992 [file] [log] [blame]
Alexander Afanasyevd2006fd2013-08-14 18:11:26 -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
5PortGroup github 1.0
6
7github.setup cawka ndn-js 3861414c370cf28b405151fc7e2ab8c8bb56bcf3
8checksums rmd160 dfc49370aff267ded7a46a8ef26f00c6950b4497 \
9 sha256 b36d04f974b31895485d895aa44893e2d43f2d96f6443921903304fc6966f79d
10
11name ndnx-wsproxy
12homepage http://github.com/named-data/ndn-js
13license Permissive BSD
14version 0.1
15revision 3
16
17categories net
18maintainers ucla.edu:alexander.afanasyev
19
20description WebSocket proxy server between NDN javascript stack and NDNx daemon
21
22depends_lib-append port:ndnx \
23 port:nodejs \
24 port:npm
25
26set ndnxuser ndnx
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 ${ndnxuser} -c 'NODE_PATH=${prefix}/lib/node_modules ${prefix}/bin/node ${prefix}/bin/ndnx-wsproxy-tcp.js \\\$0'\" > \"${destroot}${prefix}/bin/ndnx-wsproxy-tcp\""
41 file attributes "${destroot}${prefix}/bin/ndnx-wsproxy-tcp" -permissions 0755
42
43 system "echo \"su ${ndnxuser} -c 'NODE_PATH=${prefix}/lib/node_modules ${prefix}/bin/node ${prefix}/bin/ndnx-wsproxy-udp.js \\\$0'\" > \"${destroot}${prefix}/bin/ndnx-wsproxy-udp\""
44 file attributes "${destroot}${prefix}/bin/ndnx-wsproxy-udp" -permissions 0755
45}
46
47post-activate {
48 # install ndnx-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/ndnx-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/ndnx-wsproxy.log