blob: 698130cccbc156d4910ed26564deaba25ebe9094 [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 Afanasyev937e6d82013-04-18 12:33:11 -07007github.setup named-data ndn-js aa0b4120afd1d33a87e9003906ecc538a20dbc39
8checksums rmd160 6fe5946e31095d0a700bc9fc9edfad2176591cb9 \
9 sha256 4ff92fa6e70964ff651beb54c84c9a694354bcc8018385bb25eea14749d48a79
Alexander Afanasyev535119a2013-02-28 20:32:25 -080010
11name ccnx-wsproxy
Alexander Afanasyev937e6d82013-04-18 12:33:11 -070012homepage http://github.com/named-data/ndn-js
Alexander Afanasyev535119a2013-02-28 20:32:25 -080013license Permissive BSD
14version 0.1
Alexander Afanasyev937e6d82013-04-18 12:33:11 -070015revision 2
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