Witam,

przygotowałem speca z serwerem punjab (pythonowy interface pośredniczący 
pomiędzy http a XMPP. Pozwala przykładowo łączyć się z jabberem 
javascriptowym aplikacjom które same potrafią korzystać tylko z http - vide 
JWchat).

Przy instalacji mktap wyrzuca jeden błąd którego nie potrafię się pozbyć, ale 
działa. Przynajmniej u mnie - th, i686.

-- 
Pozdrawiam,
Paweł Zuzelski

Attachment: punjab-init
Description: application/shellscript

diff -Naur punjab-0.10/punjab/xmpp/component.py punjab-0.10.new/punjab/xmpp/component.py
--- punjab-0.10/punjab/xmpp/component.py	2006-04-10 15:10:57.000000000 +0000
+++ punjab-0.10.new/punjab/xmpp/component.py	2008-04-08 07:18:45.000000000 +0000
@@ -1,6 +1,6 @@
 # twonds component
 
-from zope.interface import implements
+from zope.interface import implements, Interface
 try:
     from twisted.words.xish import domish, xpath, utility
     from twisted.words.protocols.jabber import xmlstream
@@ -177,7 +177,7 @@
 from twisted.application import service
 from twisted.python import components
 
-class IService(components.Interface):
+class IService(Interface):
     def componentConnected(self, xmlstream):
         """ Parent component has established a connection
         """
@@ -205,8 +205,6 @@
     def send(self, obj):
         self.parent.send(obj)
 
-components.backwardsCompatImplements(Service)
-
 class ServiceManager(service.MultiService):
     """ Business logic representing a managed component connection to a Jabber router
 
# $Revision: 1.2 $, $Date: 2007-10-15 22:23:24 $
#
Summary:        Punjab is a twisted HTTP server with interfaces to jabber.
Summary(pl.UTF-8):      Serwer HTTP z interfejsem do jabbera.
Name:           punjab
Version:        0.10
Release:        1
License:        GPL v2
Group:          Networking/Daemons
Source0:        
http://dfn.dl.sourceforge.net/sourceforge/punjab/punjab-0.10.tar.gz
# Source0-md5:  6fae1e9e98d62ef3792d9acca30bf1df
Source1:        punjab-init
Patch0:         punjab-python_2_5.patch
Requires:       python-SOAP
Requires:       python-TwistedCore
Requires:       python-TwistedWords
Requires:       python-TwistedWeb
BuildRequires:  python
Suggests:       python-TwistedConch
URL:            http://punjab.sourceforge.net/
BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)

%description
PunJab is a HTTP jabber client interface. It is a SOAP, XMLRPC,
JEP-0025 or JEP-0124 server that allows persistent client connections
to a jabber server. It can be used for many things, but its main
purpose is to allow for stateless applications (ie web) a stateful
connection to jabber.

%description -l pl.UTF-8
PunJab jest interfejsem HTTP do jabbera. Jest to serwer protokołów SOAP,
XMLRPC, JEP-0025 oraz JEP-0124 łączący się jako klient do serwera jabbera.
Głównym przeznaczeniem PunJab jest umożliwienie nawiązywania sesji jabberowych
bezstanowym aplikacjom webowym.

%prep
%setup -q
%patch0 -p1

%build
python ./setup.py build

%install
rm -rf $RPM_BUILD_ROOT
python ./setup.py install --root $RPM_BUILD_ROOT
install -d $RPM_BUILD_ROOT%{_datadir}/%{name}/html/{,css,images/{,roster},js}
install -d $RPM_BUILD_ROOT%{_sysconfdir}/rc.d/init.d
install -d $RPM_BUILD_ROOT%{_sharedstatedir}/%{name}
install %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/rc.d/init.d/punjab
install html/*.* $RPM_BUILD_ROOT%{_datadir}/%{name}/html
install html/js/*.* $RPM_BUILD_ROOT%{_datadir}/%{name}/html/js
install html/css/*.* $RPM_BUILD_ROOT%{_datadir}/%{name}/html/css
install html/images/*.* $RPM_BUILD_ROOT%{_datadir}/%{name}/html/images
install html/images/roster/*.* 
$RPM_BUILD_ROOT%{_datadir}/%{name}/html/images/roster

%post
cd /var/lib/punjab
/usr/bin/mktap punjab --port=5280 --host=localhost --xmlrpc=1 --httpp=1 
--httpb=1 --soap=1 --html_dir="%{_datadir}/%{name}/html"
/sbin/chkconfig --add %{name}

%preun
rm /var/lib/punjab/punjab.tap

%clean
rm -rf $RPM_BUILD_ROOT

%files
%{py_sitescriptdir}/punjab-0.10-py2.5.egg-info
%{py_sitescriptdir}/%{name}
%{_datadir}/%{name}
%{_sharedstatedir}/%{name}
%attr(754,root,root) /etc/rc.d/init.d/%{name}
%doc INSTALL README TODO
_______________________________________________
pld-devel-pl mailing list
pld-devel-pl@lists.pld-linux.org
http://lists.pld-linux.org/mailman/listinfo/pld-devel-pl

Odpowiedź listem elektroniczym