%define perl_major_ver %(eval `perl -V:version`; echo ${version%*.[0-9]*}.0) Name: perl-Net-Jabber Version: 2.0 Release: 1mamba Summary: Net::Jabber - Jabber Perl Library Group: System/Libraries/Perl Vendor: openmamba Distribution: openmamba Packager: Silvan Calarco URL: http://www.cpan.org Source: http://search.cpan.org/CPAN/authors/id/R/RE/REATMON/Net-Jabber-%{version}.tar.gz License: GPL, Artistic Requires: perl >= %perl_major_ver ## AUTOBUILDREQ-BEGIN BuildRequires: perl-devel BuildRequires: perl-Net-XMPP ## AUTOBUILDREQ-END BuildRoot: %{_tmppath}/%{name}-%{version}-root %description Net::Jabber is a convenient tool to use for any perl script that would like to utilize the Jabber Instant Messaging protocol. While not a client in and of itself, it provides all of the necessary back-end functions to make a CGI client or command-line perl client feasible and easy to use. Net::Jabber is a wrapper around the rest of the official Net::Jabber::xxxxxx packages. There is are example scripts in the example directory that provide you with examples of very simple Jabber programs. NOTE: The parser that XML::Stream::Parser provides, as are most Perl parsers, is synchronous. If you are in the middle of parsing a packet and call a user defined callback, the Parser is blocked until your callback finishes. This means you cannot be operating on a packet, send out another packet and wait for a response to that packet. It will never get to you. Threading might solve this, but as of the writing of this, threading in Perl is not quite up to par yet. This issue will be revisted in the future. %prep %setup -q -n Net-Jabber-%{version} %build perl Makefile.PL PREFIX=%{_prefix} INSTALLDIRS=vendor %make %make test %install [ "%{buildroot}" != / ] && rm -rf "%{buildroot}" %makeinstall_perl packlist=`find %{buildroot} -name .packlist` [ -z "$packlist" ] && exit 1 || cat $packlist | \ sed "s,%buildroot,,g;s,.*/man/.*,&.gz,g" | \ sort -u > .packlist && rm $packlist strid=`echo $packlist | sed 's,.*auto\(.*\)/.packlist,\1,'` for dir in `find %{buildroot} -type d | grep $strid`; do echo "%dir ${dir#%buildroot}" >> .packlist done %clean [ "%{buildroot}" != / ] && rm -rf "%{buildroot}" rm -f .packlist %files -f .packlist %defattr(-,root,root) %changelog * Sat Jan 03 2009 Silvan Calarco 2.0-1mamba - package created by autospec