blob: a5646e499dabbfe4925eddb6ff096c8c76f37af1 [file] [log] [blame]
# -*- 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
# $Id$
PortSystem 1.0
PortGroup github 1.0
github.setup cawka ndn-js ad659623235310878b4a4612a9e316b54774fab3
checksums rmd160 9a70f864d2c7c3f60635524d7ff38434cde957cc \
sha256 f5072d45be76cb58eb926313381a99cfb66e04c1ff49b99695603b06143eb7c9
name ccnx-wsproxy
homepage http://github.com/remap/ndn-js
license Permissive BSD
version 0.1
revision 1
categories net ccnx
maintainers ucla.edu:alexander.afanasyev
description WebSocket proxy server between NDN javascript stack and ccnx
depends_lib-append port:ccnx \
port:nodejs \
port:npm
set ccnxuser ccnx
supported_archs noarch
use_configure yes
configure.cmd ./waf configure
configure.args-append --no-js
build { }
destroot.cmd ./waf
destroot.destdir --destdir=${destroot}
post-destroot {
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\""
file attributes "${destroot}${prefix}/bin/ccnx-wsproxy-tcp" -permissions 0755
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\""
file attributes "${destroot}${prefix}/bin/ccnx-wsproxy-udp" -permissions 0755
}
post-activate {
# install ccnx-wsproxy dependencies using npm
system "${prefix}/bin/npm install -g ws"
system "${prefix}/bin/npm install -g node-getopt"
}
startupitem.executable ${prefix}/bin/ccnx-wsproxy-udp -c 127.0.0.1 -m 40 -L 1
startupitem.create yes
startupitem.name ${name}
startupitem.netchange no
startupitem.logevents yes
startupitem.logfile ${prefix}/var/log/ccnx-wsproxy.log