Sophie

Sophie

distrib > Mageia > 3 > x86_64 > media > core-release-src > by-pkgid > cce218c92c9e82d2b0889525b3d18007 > files > 7

perl-DJabberd-0.850.0-2.mga3.src.rpm

%define upstream_name    DJabberd
%define upstream_version 0.85

# TODO generate

Name:       perl-%{upstream_name}
Version:    %perl_convert_version %{upstream_version}
Release:    %mkrel 2

Summary:    XMPP flexible framework to create custom jabber server
License:    GPL+ and Artistic
Group:      Development/Perl
Url:        http://search.cpan.org/dist/%{upstream_name}
Source0         http://www.cpan.org/modules/by-module/DJabberd/%{upstream_name}-%{upstream_version}.tar.gz
Source1:    djabberd.init
Source2:    djabberd.conf
Source3:    djabberd.sysconfig
Source4:    djabberd.log.conf
Source5:    djabberd.logrotate

BuildRequires: perl(Danga::Socket) >= 1.510.0
BuildRequires: perl(Digest::HMAC_SHA1)
BuildRequires: perl(ExtUtils::MakeMaker)
BuildRequires: perl(Log::Log4perl)
BuildRequires: perl(Net::DNS) >= 0.480.0
BuildRequires: perl(Net::SSLeay)
BuildRequires: perl(Unicode::Stringprep)
BuildRequires: perl(XML::LibXML) >= 1.700.0
BuildRequires: perl(XML::LibXML::SAX)
BuildRequires: perl(XML::SAX)
BuildArch:  noarch

%description
DJabberd is a high-performance, scalable, extensible Jabber/XMPP server
framework.
While it comes with an example server, it's really a set of classes for
you to build your own Jabber server without understanding Jabber.
Instead of working with XML and protocol-specific details, you subclass parts
and work
with sane objects and data structures and let DJabberd do all the ugly work.

%package -n djabberd
Summary:    A jabber server, constructed with DJabber perl framework
Group:      System/Servers
Requires(preun): rpm-helper
Requires(post):  rpm-helper
%description -n djabberd
This package contains a example djabberd server, using the simplest possible
modules ( ie, everything is stored in memory, no persistance )
It is not intended to be used as it is, it just provides the needed example
file and infrastructure to be integrated with the distribution.

In order to turn this into a real server, you need to install various modules,
depending on your needs.

%prep
%setup -q -n %{upstream_name}-%{upstream_version}
mkdir -p doc/DJabberd/Component/
# do notprovides it, as it pulls a non packaged module
#mv ./lib/DJabberd/Component/Example.pm doc/DJabberd/Component/
rm -f ./lib/DJabberd/Component/Example.pm

%build
%{__perl} Makefile.PL INSTALLDIRS=vendor
%make

%check
export T_MUC_ENABLE=0
%{__make} test

%install
rm -rf %{buildroot}
%makeinstall_std

mkdir -p $RPM_BUILD_ROOT/%{_initrddir}/
cp %SOURCE1 $RPM_BUILD_ROOT/%{_initrddir}/djabberd

mkdir -p $RPM_BUILD_ROOT/%{_sysconfdir}/djabberd/
cp %SOURCE2 $RPM_BUILD_ROOT/%{_sysconfdir}/djabberd

mkdir -p $RPM_BUILD_ROOT/%{_sysconfdir}/sysconfig/
cp %SOURCE3 $RPM_BUILD_ROOT/%{_sysconfdir}/sysconfig/djabberd

# logging
cp %SOURCE4 $RPM_BUILD_ROOT/%{_sysconfdir}/djabberd/log.conf

mkdir -p $RPM_BUILD_ROOT/%{_sysconfdir}/logrotate.d/
cp %SOURCE5 $RPM_BUILD_ROOT/%{_sysconfdir}/logrotate.d/djabberd

mkdir -p $RPM_BUILD_ROOT/
%clean
rm -rf %{buildroot}

%post -n djabberd
%_post_service djabberd

%preun -n djabberd
%_preun_service djabberd

%files -n djabberd
%defattr(-,root,root)
%attr(0755,root,root) %{_bindir}/*
%attr(0755,root,root) %{_initrddir}/djabberd
%config(noreplace) %{_sysconfdir}/djabberd
%config(noreplace) %{_sysconfdir}/sysconfig/djabberd
%config(noreplace) %{_sysconfdir}/logrotate.d/*

%files
%defattr(-,root,root)
%doc CHANGES META.yml README examples
%{perl_vendorlib}/DJabberd*
%{_mandir}/man3/*

%changelog

* Sun Jan 13 2013 umeabot <umeabot> 0.850.0-2.mga3
+ Revision: 365205
- Mass Rebuild - https://wiki.mageia.org/en/Feature:Mageia3MassRebuild

* Wed Jun 15 2011 jquelin <jquelin> 0.850.0-1.mga2
+ Revision: 107840
- update to 0.85

* Mon Jan 24 2011 jquelin <jquelin> 0.840.0-1.mga1
+ Revision: 37032
- mageia rebuild
- imported package perl-DJabberd