chronochat: Initial packaging
diff --git a/chronochat/debian/changelog b/chronochat/debian/changelog
new file mode 100644
index 0000000..f943187
--- /dev/null
+++ b/chronochat/debian/changelog
@@ -0,0 +1,40 @@
+chronochat (0.5.0-1-ppa1~DISTRO) DISTRO; urgency=low
+
+ * New version based on 104a738d6d38a22830e440f97885ac99f76b4044
+ (https://github.com/bruinfish/ChronoChat)
+
+ -- Alexander Afanasyev <alexander.afanasyev@ucla.edu> Thu, 04 Sep 2014 22:50:53 -0700
+
+chronochat (0.5.0-0-ppa1~DISTRO) DISTRO; urgency=low
+
+ * New version based on b0632285f17f99d5c4678e811425395f308225fe
+ (https://github.com/bruinfish/ChronoChat)
+
+ -- Alexander Afanasyev <alexander.afanasyev@ucla.edu> Thu, 04 Sep 2014 22:45:26 -0700
+
+chronochat (0.5.0~rc0-ppa3~DISTRO) DISTRO; urgency=low
+
+ * New version based on d8fc28a3f8956ac600148dfcbc3678ca562eed2a
+ (https://github.com/bruinfish/ChronoChat)
+
+ -- Alexander Afanasyev <alexander.afanasyev@ucla.edu> Thu, 04 Sep 2014 17:24:01 -0700
+
+chronochat (0.5.0~rc0-ppa2~DISTRO) DISTRO; urgency=low
+
+ * New version based on d8fc28a3f8956ac600148dfcbc3678ca562eed2a
+ (https://github.com/bruinfish/ChronoChat)
+
+ -- Alexander Afanasyev <alexander.afanasyev@ucla.edu> Thu, 04 Sep 2014 17:16:34 -0700
+
+chronochat (0.5.0~rc0-ppa1~DISTRO) DISTRO; urgency=low
+
+ * New version based on d8fc28a3f8956ac600148dfcbc3678ca562eed2a
+ (https://github.com/bruinfish/ChronoChat)
+
+ -- Alexander Afanasyev <alexander.afanasyev@ucla.edu> Thu, 04 Sep 2014 16:13:02 -0700
+
+chronochat (0.5.0~ppa0~DISTRO) DISTRO; urgency=low
+
+ * Initial release
+
+ -- Alexander Afanasyev <alexander.afanasyev@ucla.edu> Sat, 24 May 2014 16:58:30 -0800
diff --git a/chronochat/debian/compat b/chronochat/debian/compat
new file mode 100644
index 0000000..45a4fb7
--- /dev/null
+++ b/chronochat/debian/compat
@@ -0,0 +1 @@
+8
diff --git a/chronochat/debian/control b/chronochat/debian/control
new file mode 100644
index 0000000..b20d34c
--- /dev/null
+++ b/chronochat/debian/control
@@ -0,0 +1,22 @@
+Source: chronochat
+Priority: extra
+Maintainer: Alexander Afanasyev <alexander.afanasyev@ucla.edu>
+Build-Depends: debhelper (>= 8.0.0),
+ python (>= 2.7.0),
+ pkg-config (>= 0.26),
+ ndn-cxx-dev (>= 0.2.0),
+ liblog4cxx10-dev (>= 0.10.0),
+ protobuf-compiler (>= 2.4.0),
+ libprotobuf-dev (>= 2.4.0),
+ libboost-all-dev (>= 1.48.0),
+ libqt4-dev
+Standards-Version: 3.9.2
+Section: net
+Homepage: http://github.com/named-data/ChronoSync
+Vcs-Git: git://github.com/named-data/ChronoSync.git
+Vcs-Browser: http://github.com/named-data/ChronoSync
+
+Package: chronochat
+Architecture: i386 amd64
+Depends: ${shlibs:Depends}, ${misc:Depends}, ndn-cxx
+Description: A simple but interesting demo to visualize how ChronoSync library works
diff --git a/chronochat/debian/control.precise b/chronochat/debian/control.precise
new file mode 100644
index 0000000..c5033db
--- /dev/null
+++ b/chronochat/debian/control.precise
@@ -0,0 +1,22 @@
+Source: chronochat
+Priority: extra
+Maintainer: Alexander Afanasyev <alexander.afanasyev@ucla.edu>
+Build-Depends: debhelper (>= 8.0.0),
+ python (>= 2.7.0),
+ pkg-config (>= 0.26),
+ ndn-cxx-dev (>= 0.2.0),
+ liblog4cxx10-dev (>= 0.10.0),
+ protobuf-compiler (>= 2.4.0),
+ libprotobuf-dev (>= 2.4.0),
+ libboost1.48-all-dev (>= 1.48.0),
+ libqt4-dev
+Standards-Version: 3.9.2
+Section: net
+Homepage: http://github.com/named-data/ChronoSync
+Vcs-Git: git://github.com/named-data/ChronoSync.git
+Vcs-Browser: http://github.com/named-data/ChronoSync
+
+Package: chronochat
+Architecture: i386 amd64
+Depends: ${shlibs:Depends}, ${misc:Depends}, ndn-cxx
+Description: A simple but interesting demo to visualize how ChronoSync library works
diff --git a/chronochat/debian/copyright b/chronochat/debian/copyright
new file mode 100644
index 0000000..75455e7
--- /dev/null
+++ b/chronochat/debian/copyright
@@ -0,0 +1,33 @@
+Format: http://dep.debian.net/deps/dep5
+Upstream-Name: repo-ng
+Source: http://github.com/named-data/repo-ng
+
+Files: *
+Copyright: Copyright (c) 2014, Regents of the University of California.
+License: GPL-3+
+
+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/chronochat/debian/patches/01-chronosync-static.diff b/chronochat/debian/patches/01-chronosync-static.diff
new file mode 100644
index 0000000..96e9eb7
--- /dev/null
+++ b/chronochat/debian/patches/01-chronosync-static.diff
@@ -0,0 +1,17 @@
+Index: chronochat_0.5.0/ChronoSync/wscript
+===================================================================
+--- chronochat_0.5.0.orig/ChronoSync/wscript 2014-09-04 14:32:44.666470855 -0700
++++ chronochat_0.5.0/ChronoSync/wscript 2014-09-04 14:33:17.070664976 -0700
+@@ -42,10 +42,11 @@ def build(bld):
+ libsync = bld(
+ target="ChronoSync",
+ # vnum = "1.0.0",
+- features=['cxx', 'cxxshlib'],
++ features=['cxx', 'cxxstlib'],
+ source = bld.path.ant_glob(['src/**/*.cc', 'src/**/*.proto']),
+ use = 'BOOST NDN_CXX',
+ includes = ['src'],
++ install_path = '${LIBDIR}',
+ )
+
+ # Unit tests
diff --git a/chronochat/debian/patches/20-openssl.diff b/chronochat/debian/patches/20-openssl.diff
new file mode 100644
index 0000000..944bfb9
--- /dev/null
+++ b/chronochat/debian/patches/20-openssl.diff
@@ -0,0 +1,91 @@
+Index: chronochat_0.5.0~rc0/wscript
+===================================================================
+--- chronochat_0.5.0~rc0.orig/wscript 2014-09-04 15:48:47.727801874 -0700
++++ chronochat_0.5.0~rc0/wscript 2014-09-04 15:48:51.000000000 -0700
+@@ -9,7 +9,7 @@
+
+ opt.load(['compiler_c', 'compiler_cxx', 'qt4', 'gnu_dirs'])
+
+- opt.load(['default-compiler-flags', 'boost', 'protoc',
++ opt.load(['default-compiler-flags', 'boost', 'protoc', 'openssl',
+ 'doxygen', 'sphinx_build'],
+ tooldir=['waf-tools'])
+
+@@ -23,7 +23,7 @@
+
+ def configure(conf):
+ conf.load(['compiler_c', 'compiler_cxx', 'qt4',
+- 'default-compiler-flags', 'boost', 'protoc', 'gnu_dirs',
++ 'default-compiler-flags', 'boost', 'protoc', 'gnu_dirs', 'openssl',
+ 'doxygen', 'sphinx_build'])
+
+ conf.check_cfg(package='libndn-cxx', args=['--cflags', '--libs'],
+@@ -37,6 +37,8 @@
+ conf.check_cfg (package='ChronoSync', args=['ChronoSync >= 0.1', '--cflags', '--libs'],
+ uselib_store='SYNC', mandatory=True)
+
++ conf.check_openssl()
++
+ boost_libs = 'system random thread filesystem'
+ if conf.options.with_tests:
+ conf.env['WITH_TESTS'] = 1
+@@ -65,7 +67,7 @@
+ defines = "WAF=1",
+ source = bld.path.ant_glob(['src/*.cpp', 'src/*.ui', '*.qrc', 'logging.cc', 'src/*.proto']),
+ includes = "src .",
+- use = "QTCORE QTGUI QTWIDGETS QTSQL NDN_CXX BOOST LOG4CXX SYNC",
++ use = "QTCORE QTGUI QTWIDGETS QTSQL NDN_CXX BOOST LOG4CXX SYNC OPENSSL",
+ )
+
+ # Unit tests
+Index: chronochat_0.5.0~rc0/waf-tools/openssl.py
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ chronochat_0.5.0~rc0/waf-tools/openssl.py 2014-09-04 15:50:42.876551986 -0700
+@@ -0,0 +1,46 @@
++#! /usr/bin/env python
++# encoding: utf-8
++
++'''
++
++When using this tool, the wscript will look like:
++
++ def options(opt):
++ opt.tool_options('openssl')
++
++ def configure(conf):
++ conf.load('compiler_cxx openssl')
++ conf.check_openssl()
++
++ def build(bld):
++ bld(source='main.cpp', target='app', use='OPENSSL')
++
++'''
++
++from waflib import Options
++from waflib.Configure import conf
++
++@conf
++def check_openssl(self,*k,**kw):
++ root = k and k[0] or kw.get('path', None) or Options.options.with_openssl
++ mandatory = kw.get('mandatory', True)
++ var = kw.get('uselib_store', 'OPENSSL')
++
++ if root:
++ libcrypto = self.check_cxx(lib=['ssl', 'crypto'],
++ msg='Checking for OpenSSL library',
++ define_name='HAVE_%s' % var,
++ uselib_store=var,
++ mandatory=mandatory,
++ includes="%s/include" % root,
++ libpath="%s/lib" % root)
++ else:
++ libcrypto = self.check_cxx(lib=['ssl', 'crypto'],
++ msg='Checking for OpenSSL library',
++ define_name='HAVE_%s' % var,
++ uselib_store=var,
++ mandatory=mandatory)
++
++def options(opt):
++ opt.add_option('--with-openssl', type='string', default=None,
++ dest='with_openssl', help='''Path to OpenSSL''')
diff --git a/chronochat/debian/patches/series b/chronochat/debian/patches/series
new file mode 100644
index 0000000..f929934
--- /dev/null
+++ b/chronochat/debian/patches/series
@@ -0,0 +1,2 @@
+01-chronosync-static.diff
+20-openssl.diff
diff --git a/chronochat/debian/rules b/chronochat/debian/rules
new file mode 100755
index 0000000..37e2948
--- /dev/null
+++ b/chronochat/debian/rules
@@ -0,0 +1,51 @@
+#!/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)
+
+%:
+ dh $@ --parallel
+
+override_dh_auto_configure:
+ cd ChronoSync; \
+ ./waf configure --prefix=../debian/tmp2/chronosync; \
+ ./waf build; \
+ ./waf install; \
+
+ PKG_CONFIG_PATH=debian/tmp2/chronosync/lib/pkgconfig:$PKG_CONFIG_PATH \
+ ./waf configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var
+
+override_dh_auto_build:
+ ./waf build
+
+override_dh_auto_install:
+ PKG_CONFIG_PATH=debian/tmp2/chronosync/lib/pkgconfig:$PKG_CONFIG_PATH \
+ ./waf install --destdir=debian/chronochat
+
+override_dh_auto_clean:
+ ./waf distclean
+
+override_dh_clean:
+ dh_clean
+ cd ChronoSync; \
+ ./waf distclean; \
+ rm -rf .waf-1*; \
+ rm -rf .waf3-1*; \
+ rm -f .waf-tools/*.pyc; \
+ rm -f waf-tools/*.pyc
+
+ ./waf distclean
+ rm -rf .waf-1*
+ rm -rf .waf3-1*
+ rm -f .waf-tools/*.pyc
+ rm -f waf-tools/*.pyc
+
+override_dh_auto_test:
diff --git a/chronochat/debian/source/format b/chronochat/debian/source/format
new file mode 100644
index 0000000..163aaf8
--- /dev/null
+++ b/chronochat/debian/source/format
@@ -0,0 +1 @@
+3.0 (quilt)