perl-Coro/perl-Coro.spec

112 lines
3.8 KiB
RPMSpec

%define perl_major_ver %(eval `perl -V:version`; echo ${version%*.[0-9]*}.0)
Name: perl-Coro
Version: 6.42
Release: 1mamba
Summary: Coro - the only real threads in perl
Group: System/Libraries/Perl
Vendor: openmamba
Distribution: openmamba
Packager: Automatic Build System <autodist@mambasoft.it>
URL: http://www.cpan.org
Source: http://search.cpan.org/CPAN/authors/id/M/ML/MLEHMANN/Coro-%{version}.tar.gz
Patch0: perl-Coro-5.25-ucontext-default.patch
License: GPL, Artistic
## AUTOBUILDREQ-BEGIN
BuildRequires: glibc-devel
BuildRequires: perl-AnyEvent
BuildRequires: perl-AnyEvent-AIO
BuildRequires: perl-AnyEvent-BDB
BuildRequires: perl-BDB
BuildRequires: perl-common-sense
BuildRequires: perl-devel
BuildRequires: perl-EV
BuildRequires: perl-Event
BuildRequires: perl-Guard
BuildRequires: perl-IO-AIO
BuildRequires: perl-libwww
## AUTOBUILDREQ-END
Requires: perl >= %perl_major_ver
Requires: perl(AnyEvent)
Requires: perl(AnyEvent::AIO)
Requires: perl(AnyEvent::BDB)
Requires: perl(Event)
Requires: perl(Guard)
Requires: perl(Storable)
BuildRoot: %{_tmppath}/%{name}-%{version}-root
%description
This module collection manages continuations in general, most often in the form of cooperative threads (also called coros, or simply "coro" in the documentation). They are similar to kernel threads but don't (in general) run in parallel at the same time even on SMP machines. The specific flavor of thread offered by this module also guarantees you that it will not switch between threads unless necessary, at easily-identified points in your program, so locking and parallel access are rarely an issue, making thread programming much safer and easier than using other thread models.
%prep
%setup -q -n Coro-%{version}
%patch0 -p1
sed -i -e '/^#!/ s|.*|#!%{__perl}|' eg/myhttpd Coro/jit-*-unix.pl
%build
# Disable FORTIFY_SOURCE on ARM as it breaks setjmp - RHBZ 750805
%ifarch %{arm}
RPM_OPT_FLAGS="${RPM_OPT_FLAGS} -D_FORTIFY_SOURCE=0"
%endif
perl Makefile.PL PREFIX=%{_prefix} INSTALLDIRS=perl OPTIMIZE="$RPM_OPT_FLAGS" </dev/null
%make
%ifnarch arm x86_64
%make test
%endif
%install
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
%makeinstall_perl
find %{buildroot} -type f -name .packlist -exec rm -f {} ';'
find %{buildroot} -type f -name '*.bs' -empty -exec rm -f {} ';'
find %{buildroot} -depth -type d -exec rmdir {} 2>/dev/null ';'
chmod -R u+w %{buildroot}/*
%clean
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
%files
%defattr(-,root,root)
%{perl_archlib}/auto/*
%{perl_archlib}/Coro.pm
%{perl_archlib}/Coro/*
%{_mandir}/man3/*.3pm.gz
%doc Changes COPYING
# README README.linux-glibc doc/* eg
%changelog
* Sat Feb 14 2015 Automatic Build System <autodist@mambasoft.it> 6.42-1mamba
- automatic update by autodist
* Sun Sep 21 2014 Automatic Build System <autodist@mambasoft.it> 6.41-1mamba
- automatic update by autodist
* Wed Jul 09 2014 Automatic Build System <autodist@mambasoft.it> 6.39-1mamba
- automatic update by autodist
* Sat May 24 2014 Automatic Build System <autodist@mambasoft.it> 6.37-1mamba
- automatic update by autodist
* Sat Nov 09 2013 Automatic Build System <autodist@mambasoft.it> 6.32-1mamba
- automatic update by autodist
* Tue May 14 2013 Automatic Build System <autodist@mambasoft.it> 6.31-1mamba
- automatic version update by autodist
* Wed Jan 09 2013 Automatic Build System <autodist@mambasoft.it> 6.23-1mamba
- automatic version update by autodist
* Thu Nov 15 2012 Silvan Calarco <silvan.calarco@mambasoft.it> 6.10-2mamba
- perl 5.16 rebuild
* Tue Oct 23 2012 Automatic Build System <autodist@mambasoft.it> 6.10-1mamba
- automatic version update by autodist
* Wed Nov 16 2011 Silvan Calarco <silvan.calarco@mambasoft.it> 6.07-1mamba
- update to 6.07
* Sun Feb 20 2011 gil <puntogil@libero.it> 5.26-1mamba
- package created by autospec