blob: 698130cccbc156d4910ed26564deaba25ebe9094 [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 named-data ndn-js aa0b4120afd1d33a87e9003906ecc538a20dbc39
checksums rmd160 6fe5946e31095d0a700bc9fc9edfad2176591cb9 \
sha256 4ff92fa6e70964ff651beb54c84c9a694354bcc8018385bb25eea14749d48a79
name ccnx-wsproxy
homepage http://github.com/named-data/ndn-js
license Permissive BSD
version 0.1
revision 2
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