ndnmapDataCollector: first add of ndnmapDataCollector daemon configuration for PPA
Change-Id: I60d5d37d3fab88a8a885d13e44a50442b0e602eb
diff --git a/ndnmap-data-collector/debian/changelog b/ndnmap-data-collector/debian/changelog
new file mode 100644
index 0000000..469b6dd
--- /dev/null
+++ b/ndnmap-data-collector/debian/changelog
@@ -0,0 +1,12 @@
+ndnmap-data-collector (0.1.0-1-ppa3~DISTRO) DISTRO; urgency=low
+
+ * New version based on 3785a75abf04176e9e5a7f2642a1e11f31c87bdd
+ (https://github.com/WU-ARL/ndnmapDataCollector)
+
+ -- Alexander Afanasyev <alexander.afanasyev@ucla.edu> Tue, 28 Jun 2016 16:50:10 +0000
+
+ndnmap-data-collector (0.0.0~ppa0~DISTRO) DISTRO; urgency=low
+
+ * Version 0
+
+ -- Alexander Afanasyev <alexander.afanasyev@ucla.edu> Sat, 24 May 2014 16:58:30 -0800
diff --git a/ndnmap-data-collector/debian/compat b/ndnmap-data-collector/debian/compat
new file mode 100644
index 0000000..45a4fb7
--- /dev/null
+++ b/ndnmap-data-collector/debian/compat
@@ -0,0 +1 @@
+8
diff --git a/ndnmap-data-collector/debian/control b/ndnmap-data-collector/debian/control
new file mode 100644
index 0000000..3cc2913
--- /dev/null
+++ b/ndnmap-data-collector/debian/control
@@ -0,0 +1,20 @@
+Source: ndnmap-data-collector
+Priority: extra
+Maintainer: John DeHart <jdd@wustl.edu>
+Build-Depends: debhelper (>= 8.0.0),
+ dh-systemd (>= 1.5),
+ python (>= 2.7.0),
+ pkg-config (>= 0.26),
+ ndn-cxx-dev (>= 0.4.1)
+Standards-Version: 3.9.2
+Section: net
+Homepage: http://github.com/WU-ARL/ndnmapDataCollector
+Vcs-Git: git://github.com/WU-ARL/ndnmapDataCollector.git
+Vcs-Browser: http://github.com/WU-ARL/ndnmapDataCollector
+
+Package: ndnmap-data-collector
+Architecture: i386 amd64
+Depends: ${shlibs:Depends}, ${misc:Depends}, ndn-cxx
+Description: Data collector daemons for ndnmap.arl.wustl.edu
+ This tool is designed to generate ndn interests to each NDN Testbed node
+ to collect link usage data for display on the ndnmap.arl.wustl.edu web page.
diff --git a/ndnmap-data-collector/debian/control.precise b/ndnmap-data-collector/debian/control.precise
new file mode 100644
index 0000000..5485c16
--- /dev/null
+++ b/ndnmap-data-collector/debian/control.precise
@@ -0,0 +1,19 @@
+Source: ndnmap-data-collector
+Priority: extra
+Maintainer: John DeHart <jdd@wustl.edu>
+Build-Depends: debhelper (>= 8.0.0),
+ python (>= 2.7.0),
+ pkg-config (>= 0.26),
+ ndn-cxx-dev (>= 0.4.1)
+Standards-Version: 3.9.2
+Section: net
+Homepage: http://github.com/WU-ARL/ndnmapDataCollector
+Vcs-Git: git://github.com/WU-ARL/ndnmapDataCollector.git
+Vcs-Browser: http://github.com/WU-ARL/ndnmapDataCollector
+
+Package: ndnmap-data-collector
+Architecture: i386 amd64
+Depends: ${shlibs:Depends}, ${misc:Depends}, ndn-cxx
+Description: Data collector daemons for ndnmap.arl.wustl.edu
+ This tool is designed to generate ndn interests to each NDN Testbed node
+ to collect link usage data for display on the ndnmap.arl.wustl.edu web page.
diff --git a/ndnmap-data-collector/debian/copyright b/ndnmap-data-collector/debian/copyright
new file mode 100644
index 0000000..1053c50
--- /dev/null
+++ b/ndnmap-data-collector/debian/copyright
@@ -0,0 +1,33 @@
+Format: http://dep.debian.net/deps/dep5
+Upstream-Name: ndnmapDataCollector
+Source: http://github.com/WU-ARL/ndnmapDataCollector
+
+Files: *
+Copyright: Copyright (C) 2016 Washington University
+License: Unknown
+
+Files: debian/*
+Copyright: Copyright (c) 2013-2014, Alexander Afanasyev <alexander.afanasyev@ucla.edu>
+License: BSD
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions are met:
+ * Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+ * Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+ * Neither the name of the Regents of the University of California nor
+ the names of its contributors may be used to endorse or promote
+ products derived from this software without specific prior written
+ permission.
+ .
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ ARE DISCLAIMED. IN NO EVENT SHALL REGENTS BE LIABLE FOR ANY DIRECT, INDIRECT,
+ INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
+ OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+ EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
diff --git a/ndnmap-data-collector/debian/ndnmap-data-collector.default b/ndnmap-data-collector/debian/ndnmap-data-collector.default
new file mode 100644
index 0000000..7117a7d
--- /dev/null
+++ b/ndnmap-data-collector/debian/ndnmap-data-collector.default
@@ -0,0 +1,6 @@
+# defaults for ndnmapDataCollector client
+
+# Local Prefix for Interests
+PREFIX="/ndn/edu/wustl/ndnmap/stats"
+
+FLAGS=""
diff --git a/ndnmap-data-collector/debian/ndnmap-data-collector.dirs b/ndnmap-data-collector/debian/ndnmap-data-collector.dirs
new file mode 100644
index 0000000..18488c7
--- /dev/null
+++ b/ndnmap-data-collector/debian/ndnmap-data-collector.dirs
@@ -0,0 +1,2 @@
+etc
+usr/bin
diff --git a/ndnmap-data-collector/debian/ndnmap-data-collector.install b/ndnmap-data-collector/debian/ndnmap-data-collector.install
new file mode 100644
index 0000000..5b43ece
--- /dev/null
+++ b/ndnmap-data-collector/debian/ndnmap-data-collector.install
@@ -0,0 +1,2 @@
+usr/bin/ndnmapDataCollectorServer
+usr/bin/ndnmapDataCollectorClient
diff --git a/ndnmap-data-collector/debian/ndnmap-data-collector.postinst b/ndnmap-data-collector/debian/ndnmap-data-collector.postinst
new file mode 100644
index 0000000..413d850
--- /dev/null
+++ b/ndnmap-data-collector/debian/ndnmap-data-collector.postinst
@@ -0,0 +1,14 @@
+#!/bin/sh -e
+
+if [ "$1" != "configure" ]; then
+ exit 0
+fi
+
+# Create HOME and generate self-signed NDN certificate
+mkdir -p "/var/lib/ndn/ndnmapDataCollector/.ndn"
+
+chown -R ndn:ndn "/var/lib/ndn/ndnmapDataCollector"
+
+#DEBHELPER#
+
+exit 0
diff --git a/ndnmap-data-collector/debian/ndnmap-data-collector.service b/ndnmap-data-collector/debian/ndnmap-data-collector.service
new file mode 100644
index 0000000..2ffc978
--- /dev/null
+++ b/ndnmap-data-collector/debian/ndnmap-data-collector.service
@@ -0,0 +1,23 @@
+# Authors:
+# - John DeHart <jdd@wustl.edu>
+
+[Unit]
+Description=Data collection daemons for ndnmap.
+Documentation=man:ndnmapDataCollector
+Requires=nfd.service
+After=nfd.service
+
+[Service]
+Environment=HOME=/var/lib/ndn/ndnmapDataCollector
+EnvironmentFile=-/etc/default/ndnmapDataCollectorClient
+User=ndn
+Group=ndn
+ExecStart=/usr/bin/ndnmapDataCollectorClient $FLAGS -p "$PREFIX"
+Restart=on-failure
+ProtectSystem=full
+PrivateTmp=yes
+PrivateDevices=yes
+ProtectHome=yes
+
+[Install]
+WantedBy=multi-user.target
diff --git a/ndnmap-data-collector/debian/ndnmap-data-collector.upstart b/ndnmap-data-collector/debian/ndnmap-data-collector.upstart
new file mode 100644
index 0000000..070e6cd
--- /dev/null
+++ b/ndnmap-data-collector/debian/ndnmap-data-collector.upstart
@@ -0,0 +1,21 @@
+description "New NDN XML Status client"
+author "John DeHart <jdd@wustl.edu>"
+
+start on started nfd
+stop on stopping nfd
+
+respawn
+respawn limit unlimited
+
+setuid ndn
+setgid ndn
+
+script
+ FLAGS=""
+ PREFIX=""
+ if [ -f /etc/default/ndnmapDataCollectorClient ]; then
+ . /etc/default/ndnmapDataCollectorClient
+ fi
+ export HOME=/var/lib/ndn/ndnmapDataCollector
+ exec /usr/bin/ndnmapDataCollectorClient $FLAGS -p $PREFIX
+end script
diff --git a/ndnmap-data-collector/debian/rules b/ndnmap-data-collector/debian/rules
new file mode 100755
index 0000000..ffe978c
--- /dev/null
+++ b/ndnmap-data-collector/debian/rules
@@ -0,0 +1,38 @@
+#!/usr/bin/make -f
+# -*- makefile -*-
+# Sample debian/rules that uses debhelper.
+# This file was originally written by Joey Hess and Craig Small.
+# As a special exception, when this file is copied by dh-make into a
+# dh-make output file, you may use that output file without restriction.
+# This special exception was added by Craig Small in version 0.37 of dh-make.
+
+# Uncomment this to turn on verbose mode.
+# export DH_VERBOSE=1
+
+LDFLAGS := $(shell dpkg-buildflags --get LDFLAGS)
+CXXFLAGS := $(shell dpkg-buildflags --get CXXFLAGS)
+CXXFLAGS += -std=c++11
+
+%:
+ dh $@ --parallel --with=systemd
+
+override_dh_auto_configure:
+ CXXFLAGS="$(CXXFLAGS)" LINKFLAGS="$(LDFLAGS)" ./waf configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var
+
+override_dh_auto_build:
+ ./waf build
+
+override_dh_auto_install:
+ ./waf install --destdir=debian/tmp
+
+override_dh_auto_clean:
+ ./waf distclean
+
+override_dh_clean:
+ dh_clean
+ ./waf distclean
+ rm -rf .waf-1*
+ rm -rf .waf3-1*
+ rm -f .waf-tools/*.pyc
+
+override_dh_auto_test:
diff --git a/ndnmap-data-collector/debian/rules.precise b/ndnmap-data-collector/debian/rules.precise
new file mode 100755
index 0000000..5fa0a0c
--- /dev/null
+++ b/ndnmap-data-collector/debian/rules.precise
@@ -0,0 +1,38 @@
+#!/usr/bin/make -f
+# -*- makefile -*-
+# Sample debian/rules that uses debhelper.
+# This file was originally written by Joey Hess and Craig Small.
+# As a special exception, when this file is copied by dh-make into a
+# dh-make output file, you may use that output file without restriction.
+# This special exception was added by Craig Small in version 0.37 of dh-make.
+
+# Uncomment this to turn on verbose mode.
+# export DH_VERBOSE=1
+
+LDFLAGS := $(shell dpkg-buildflags --get LDFLAGS)
+CXXFLAGS := $(shell dpkg-buildflags --get CXXFLAGS)
+CXXFLAGS += -std=c++0x
+
+%:
+ dh $@ --parallel
+
+override_dh_auto_configure:
+ CXXFLAGS="$(CXXFLAGS)" LINKFLAGS="$(LDFLAGS)" ./waf configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var
+
+override_dh_auto_build:
+ ./waf build
+
+override_dh_auto_install:
+ ./waf install --destdir=debian/tmp
+
+override_dh_auto_clean:
+ ./waf distclean
+
+override_dh_clean:
+ dh_clean
+ ./waf distclean
+ rm -rf .waf-1*
+ rm -rf .waf3-1*
+ rm -f .waf-tools/*.pyc
+
+override_dh_auto_test:
diff --git a/ndnmap-data-collector/debian/source/format b/ndnmap-data-collector/debian/source/format
new file mode 100644
index 0000000..163aaf8
--- /dev/null
+++ b/ndnmap-data-collector/debian/source/format
@@ -0,0 +1 @@
+3.0 (quilt)