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