Switch sipb-xen-vnc-server to use distutils
authorEvan Broder <broder@mit.edu>
Tue, 28 Oct 2008 19:23:42 +0000 (15:23 -0400)
committerEvan Broder <broder@mit.edu>
Tue, 28 Oct 2008 19:23:42 +0000 (15:23 -0400)
svn path=/trunk/packages/sipb-xen-vnc-server/; revision=1385

debian/changelog
debian/control
debian/pycompat [new file with mode: 0644]
debian/rules
debian/sipb-xen-vnc-server.init
debian/sipb-xen-vnc-server.install [deleted file]
python/vnc/__init__.py [new file with mode: 0644]
python/vnc/extauth.py [moved from code/vncexternalauth.py with 100% similarity]
python/vnc/get_port.py [moved from code/get_port.py with 100% similarity]
setup.py [new file with mode: 0755]
sipb-xen-vnc-server [moved from code/vncproxy.py with 67% similarity]

index a98c1cf..f905b62 100644 (file)
@@ -1,8 +1,9 @@
 sipb-xen-vnc-server (1.2) unstable; urgency=low
 
   * Move certificate files into /usr/share/sipb-xen-vnc-server
 sipb-xen-vnc-server (1.2) unstable; urgency=low
 
   * Move certificate files into /usr/share/sipb-xen-vnc-server
+  * Switch to distutils-based package
 
 
- -- Evan Broder <broder@mit.edu>  Tue, 28 Oct 2008 14:59:24 -0400
+ -- Evan Broder <broder@mit.edu>  Tue, 28 Oct 2008 15:07:33 -0400
 
 sipb-xen-vnc-server (1.1) unstable; urgency=low
 
 
 sipb-xen-vnc-server (1.1) unstable; urgency=low
 
index 0452bc6..40f46a8 100644 (file)
@@ -2,10 +2,15 @@ Source: sipb-xen-vnc-server
 Section: base
 Priority: extra
 Maintainer: SIPB Xen Project <sipb-xen@mit.edu>
 Section: base
 Priority: extra
 Maintainer: SIPB Xen Project <sipb-xen@mit.edu>
-Build-Depends: cdbs (>= 0.4.23-1.1), debhelper (>= 4.1.0), subversion
+Build-Depends: cdbs (>= 0.4.23-1.1), debhelper (>= 4.1.0),
+ python-all-dev (>=2.3.5-11), python-support (>= 0.5.3),
+ python-setuptools, python-debian, python-apt
 Standards-Version: 3.7.2
 
 Package: sipb-xen-vnc-server
 Architecture: all
 Standards-Version: 3.7.2
 
 Package: sipb-xen-vnc-server
 Architecture: all
-Depends: ${misc:Depends}, daemon, python-twisted-core, python-xen-3.2
+Depends: ${python:Depends}, ${misc:Depends}, daemon,
+ python-twisted-core, python-xen-3.2
+Provides: ${python:Provides}
+XB-Python-Version: ${python:Versions}
 Description: Install and enable the VNC server
 Description: Install and enable the VNC server
diff --git a/debian/pycompat b/debian/pycompat
new file mode 100644 (file)
index 0000000..0cfbf08
--- /dev/null
@@ -0,0 +1 @@
+2
index 68cbf9d..1693779 100755 (executable)
@@ -1,6 +1,12 @@
 #!/usr/bin/make -f
 
 #!/usr/bin/make -f
 
+DEB_PYTHON_SYSTEM=pysupport
+
 include /usr/share/cdbs/1/rules/debhelper.mk
 include /usr/share/cdbs/1/rules/debhelper.mk
+include /usr/share/cdbs/1/class/python-distutils.mk
 
 binary-fixup/sipb-xen-vnc-server::
 
 binary-fixup/sipb-xen-vnc-server::
-       svn co https://sipb-xen-dev.mit.edu:1111/trunk/packages/sipb-xen-vnc-server/code/ $(DEB_DESTDIR)/usr/local/lib/sipb-xen-vnc-server
+        mv $(DEB_DESTDIR)usr/bin/sipb-xen-vnc-server $(DEB_DESTDIR)usr/sbin/sipb-xen-vnc-server
+
+clean::
+       rm -rf invirt.vnc.egg-info
index 56d8508..73517bd 100644 (file)
@@ -17,7 +17,7 @@
 PATH=/sbin:/usr/sbin:/bin:/usr/bin
 DESC="The sipb-xen VNC Proxy Server"
 NAME=sipb-xen-vnc-server
 PATH=/sbin:/usr/sbin:/bin:/usr/bin
 DESC="The sipb-xen VNC Proxy Server"
 NAME=sipb-xen-vnc-server
-DAEMON=/usr/local/lib/sipb-xen-vnc-server/vncproxy.py
+DAEMON=/usr/sbin/sipb-xen-vnc-server
 DAEMON_ARGS=""
 PIDFILE=/var/run/$NAME.pid
 SCRIPTNAME=/etc/init.d/$NAME
 DAEMON_ARGS=""
 PIDFILE=/var/run/$NAME.pid
 SCRIPTNAME=/etc/init.d/$NAME
diff --git a/debian/sipb-xen-vnc-server.install b/debian/sipb-xen-vnc-server.install
deleted file mode 100644 (file)
index 9da31b3..0000000
+++ /dev/null
@@ -1 +0,0 @@
-files/* .
diff --git a/python/vnc/__init__.py b/python/vnc/__init__.py
new file mode 100644 (file)
index 0000000..f99fcbe
--- /dev/null
@@ -0,0 +1 @@
+from extauth import *
similarity index 100%
rename from code/get_port.py
rename to python/vnc/get_port.py
diff --git a/setup.py b/setup.py
new file mode 100755 (executable)
index 0000000..5d3fb46
--- /dev/null
+++ b/setup.py
@@ -0,0 +1,24 @@
+#!/usr/bin/python
+
+from os import path
+from debian_bundle.changelog import Changelog
+from debian_bundle.deb822 import Deb822
+from email.utils import parseaddr
+from setuptools import setup
+
+version = Changelog(open(path.join(path.dirname(__file__), 'debian/changelog')).read()).\
+    get_version().full_version
+
+maintainer_full = Deb822(open(path.join(path.dirname(__file__), 'debian/control')))['Maintainer']
+maintainer, maintainer_email = parseaddr(maintainer_full)
+
+setup(
+    name='invirt.vnc',
+    version=version,
+    maintainer=maintainer,
+    maintainer_email=maintainer_email,
+    
+    packages = ['invirt.vnc'],
+    package_dir = {'invirt': 'python'},
+    scripts=['sipb-xen-vnc-server']
+)
similarity index 67%
rename from code/vncproxy.py
rename to sipb-xen-vnc-server
index 4440981..b86fade 100755 (executable)
@@ -1,6 +1,6 @@
 #! /usr/bin/python
 from twisted.internet import reactor, ssl
 #! /usr/bin/python
 from twisted.internet import reactor, ssl
-import vncexternalauth
+from invirt import vnc
 
 sslContext = ssl.DefaultOpenSSLContextFactory(
        '/usr/share/sipb-xen-vnc-server/vncproxykey.pem',
 
 sslContext = ssl.DefaultOpenSSLContextFactory(
        '/usr/share/sipb-xen-vnc-server/vncproxykey.pem',
@@ -8,5 +8,5 @@ sslContext = ssl.DefaultOpenSSLContextFactory(
 )
 
 if '__main__' == __name__:
 )
 
 if '__main__' == __name__:
-    reactor.listenSSL(10003,vncexternalauth.VNCAuthFactory("localhost"), contextFactory=sslContext)
+    reactor.listenSSL(10003,vnc.VNCAuthFactory("localhost"), contextFactory=sslContext)
     reactor.run()
     reactor.run()