Few more fixes, signing app, and adding sparkle

Change-Id: I33f6d846f5797245e37caf705bd3aa987a7f964e
diff --git a/make-deps.sh b/make-deps.sh
index b54cd9d..d47e7a0 100755
--- a/make-deps.sh
+++ b/make-deps.sh
@@ -8,6 +8,15 @@
 mkdir build 2>/dev/null || true
 path="$(pwd)"
 
+pushd build
+wget https://github.com/sparkle-project/Sparkle/releases/download/1.14.0/Sparkle-1.14.0.tar.bz2
+mkdir Sparkle-1.14 || true
+pushd Sparkle-1.14
+tar xf ../Sparkle-1.14.0.tar.bz2
+popd
+mv Sparkle-1.14/Sparkle.framework .
+popd
+
 #######################################
 
 rm -Rf build/ndn-cxx
diff --git a/make-osx-bundle.py b/make-osx-bundle.py
index 00ac760..3ce189d 100755
--- a/make-osx-bundle.py
+++ b/make-osx-bundle.py
@@ -238,7 +238,17 @@
       elif os.path.isfile(rsrc):
         shutil.copy(rsrc, os.path.join(rsrcpath, b))
 
-    return  
+    return
+  
+  def copy_framework(self, framework):
+    '''
+      Copy frameworks
+    '''
+    print ' * Copying framework'
+    rsrcpath = os.path.join(self.bundle, 'Contents', 'Frameworks', os.path.basename(framework))
+
+    shutil.copytree(framework, rsrcpath, symlinks = True)
+
   # def copy_qt_plugins(self):
   #   '''
   #     Copy over any needed Qt plugins.
@@ -449,14 +459,13 @@
   a.copy_etc(['nfd.conf'])
   a.set_min_macosx_version('%s.0' % MIN_SUPPORTED_VERSION)
   a.macdeployqt()
+  a.copy_framework("build/Sparkle.framework")
   a.done()
 
   # Sign our binaries, etc.
   if options.codesign:
     print ' * Signing binaries with identity `%s\'' % options.codesign
-    binaries = (
-      'build/%s/ChronoChat.app' % (MIN_SUPPORTED_VERSION),
-    )
+    binaries = (a.bundle)
 
     codesign(binaries)
     print ''
diff --git a/ndn-appcast.xml b/ndn-appcast.xml
new file mode 100644
index 0000000..8a83809
--- /dev/null
+++ b/ndn-appcast.xml
@@ -0,0 +1,13 @@
+<item>
+  <title>Version 0.1.0 (based on NFD version0.4.0-22-g150b80d)</title>
+  <description><![CDATA[
+    <h2>Initial release</h2>
+  ]]>
+  </description>
+  <pubDate>Mon, 21 March 2016 15:38:00 +0000</pubDate>
+  <enclosure url="https://github.com/2nd-ndn-hackathon/nfd-binary-release/releases/download/0.1.0/NDN-0.1.0-NFD-0.4.0-22-g150b80d-10.10.dmg"
+             sparkle:version="2.0"
+             sparkle:dsaSignature="MC0CFQCYf+EuhBdZDXojGsHT/4m7X96BTAIUBh/g7OqfCC1kZkMYBoKdEDkACto"
+             length="25624367"
+             type="application/octet-stream" />
+</item>
diff --git a/res/ndn_sparkle_pub.pem b/res/ndn_sparkle_pub.pem
new file mode 100644
index 0000000..f6e6286
--- /dev/null
+++ b/res/ndn_sparkle_pub.pem
@@ -0,0 +1,36 @@
+-----BEGIN PUBLIC KEY-----
+MIIGOjCCBC0GByqGSM44BAEwggQgAoICAQCusxyZ9WUyCNCNDx7XhQnSY47P+psC
+PxZ9Wt8Fk+JZ3Y4SoYjoxPi1qhEclCz/UqR/aHtPb29I0LXxfJcBc3/8/zZggTS3
+VZ2WEG1J31ZV537zW+6hb4B8QmVP1Jaczm3imne7Ggyd2fgJ8CWlBZ+a61DjfcpK
+iVf75BwgUCJ1lrx/728i/RV2I/6AC6CLJCZoNSRrX/CH7pI8o6ASDFjF9FeAsXy2
+ofP5mWaINO5LjFM9ZNQm1dBmqdD7g2kRpbvMaVbWV/kL90L107MfgXuP3mWehQU3
+8kLhWNSXABLv/9xf7+2CtJY2ZMFCWncU+Vb9I0T6asovsgKq90vADdm9xdXcBcm6
+2cKYoUDq8q7Nwd11r7vtLy3HUHjyT0WMn75mrjM6cfmasUl/V3HO4pOzvcxNbEmc
+Ug/YTBo26WiFzBo7rcQ5+/ze78FESEIxErq6Bx81r/Oy6Pzuvf/nf1EuvoByvdTE
+MmxjyD/EmJ1JAJHEuWst9YXKe+gp9NiH8q7aJJo4mZw3BE7eeAJEMY2hGHX5nmLP
+oE1d078Kh9H5eY1gacPhNLIueAtybNDhFCFQF9k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adX
+vfHqGVHz41+yktHtalDJvSX9G4lrPmaj4nt2VrpneLliPbZX+Z0SkkCXTdkiqI3Y
+aP4buMlj5/GX1OqLEgPmZIcfp7KkiMT5eWdbYSWrcfvDldrywMGdvoJVCECLxM//
+uKiE8On4oFD08atphBOQzKEuioyGNn45FIbSwrnPInf4Pc4NYe+nRFdUq4DmQE/8
+HEBh4ZRjXUcYGgYOw5JwBKrw60j+CL0cBacpE8GYxzWd+QHWXzK/QlMfxAH5DzQB
+ZkbDVcXv6V8E0U7Jmoyfq9Zn2SCTzn5ibpEeWjOpW2MLdMz3mm+6Ufe1sRCanXJ1
+5BTZh4ZMKkdPWKNNl+oqGa+M0FoubVkJ7CQCaONznAPfNZBIBqLbrwNrhDo0m+zc
+4S27MOfnYLid16esCQX5bYrHT+X/U2/909LUz6WytDmFlpg9G05795sMWovZ+Ite
+kdJFTGXTVaoTjDtOBgg=
+-----END PUBLIC KEY-----
diff --git a/src/Info.plist b/src/Info.plist
index 472780d..fca8b6b 100644
--- a/src/Info.plist
+++ b/src/Info.plist
@@ -32,5 +32,9 @@
     <string>True</string>
     <key>LSUIElement</key>
     <string>1</string>
+    <key>SUFeedURL</key>
+    <string>http://named-data.net/binaries/ndn-appcast.xml</string>
+    <key>SUPublicDSAKeyFile</key>
+    <string>ndn_sparkle_pub.pem</string>
 </dict>
 </plist>