From: Evan Broder Date: Tue, 28 Oct 2008 19:23:42 +0000 (-0400) Subject: Switch sipb-xen-vnc-server to use distutils X-Git-Tag: 0.0.1~5 X-Git-Url: http://xvm.mit.edu/gitweb/invirt/packages/invirt-vnc-server.git/commitdiff_plain/9947f1d2c7f3b243de5a53ebbd8980d791d68bf1?hp=38fc59e7dacf4da5c822d7dda78f57a4596e8eef Switch sipb-xen-vnc-server to use distutils svn path=/trunk/packages/sipb-xen-vnc-server/; revision=1385 --- diff --git a/debian/changelog b/debian/changelog index a98c1cf..f905b62 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,8 +1,9 @@ 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 Tue, 28 Oct 2008 14:59:24 -0400 + -- Evan Broder Tue, 28 Oct 2008 15:07:33 -0400 sipb-xen-vnc-server (1.1) unstable; urgency=low diff --git a/debian/control b/debian/control index 0452bc6..40f46a8 100644 --- a/debian/control +++ b/debian/control @@ -2,10 +2,15 @@ Source: sipb-xen-vnc-server Section: base Priority: extra Maintainer: SIPB Xen Project -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 -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 diff --git a/debian/pycompat b/debian/pycompat new file mode 100644 index 0000000..0cfbf08 --- /dev/null +++ b/debian/pycompat @@ -0,0 +1 @@ +2 diff --git a/debian/rules b/debian/rules index 68cbf9d..1693779 100755 --- a/debian/rules +++ b/debian/rules @@ -1,6 +1,12 @@ #!/usr/bin/make -f +DEB_PYTHON_SYSTEM=pysupport + include /usr/share/cdbs/1/rules/debhelper.mk +include /usr/share/cdbs/1/class/python-distutils.mk 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 diff --git a/debian/sipb-xen-vnc-server.init b/debian/sipb-xen-vnc-server.init index 56d8508..73517bd 100644 --- a/debian/sipb-xen-vnc-server.init +++ b/debian/sipb-xen-vnc-server.init @@ -17,7 +17,7 @@ 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 diff --git a/debian/sipb-xen-vnc-server.install b/debian/sipb-xen-vnc-server.install deleted file mode 100644 index 9da31b3..0000000 --- a/debian/sipb-xen-vnc-server.install +++ /dev/null @@ -1 +0,0 @@ -files/* . diff --git a/python/vnc/__init__.py b/python/vnc/__init__.py new file mode 100644 index 0000000..f99fcbe --- /dev/null +++ b/python/vnc/__init__.py @@ -0,0 +1 @@ +from extauth import * diff --git a/code/vncexternalauth.py b/python/vnc/extauth.py similarity index 100% rename from code/vncexternalauth.py rename to python/vnc/extauth.py diff --git a/code/get_port.py b/python/vnc/get_port.py 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 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'] +) diff --git a/code/vncproxy.py b/sipb-xen-vnc-server similarity index 67% rename from code/vncproxy.py rename to sipb-xen-vnc-server index 4440981..b86fade 100755 --- a/code/vncproxy.py +++ b/sipb-xen-vnc-server @@ -1,6 +1,6 @@ #! /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', @@ -8,5 +8,5 @@ sslContext = ssl.DefaultOpenSSLContextFactory( ) if '__main__' == __name__: - reactor.listenSSL(10003,vncexternalauth.VNCAuthFactory("localhost"), contextFactory=sslContext) + reactor.listenSSL(10003,vnc.VNCAuthFactory("localhost"), contextFactory=sslContext) reactor.run()