3 %bcond_without autodeps # don't BR packages needed only for resolving deps
4 %bcond_without tests # do not perform "make test"
6 %include /usr/lib/rpm/macros.perl
8 %define pnam Component-Client-Keepalive
9 Summary: perl(POE::Component::Client::Keepalive)
10 Name: perl-POE-Component-Client-Keepalive
13 # note if it is "same as perl"
14 License: (enter GPL/LGPL/BSD/BSD-like/Artistic/other license name here)
15 Group: Development/Languages/Perl
16 Source0: http://www.cpan.org/modules/by-module/%{pdir}/%{pdir}-%{pnam}-%{version}.tar.gz
18 # most of CPAN modules have generic URL (substitute pdir and pnam here)
19 #URL: http://search.cpan.org/dist/%{pdir}-%{pnam}
20 BuildRequires: perl-devel >= 1:5.8.0
21 BuildRequires: rpm-perlprov >= 4.1-13
23 %if %{with autodeps} || %{with tests}
31 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
33 #%define _noautoreq 'perl(anything_fake_or_conditional)'
40 %setup -q -n %{pdir}-%{pnam}-%{version}
44 # Don't use pipes here: they generally don't work. Apply a patch.
45 %{__perl} Makefile.PL \
49 # if module isn't noarch, use:
51 # OPTIMIZE="%{rpmcflags}"
53 %{?with_tests:%{__make} test}
56 rm -rf $RPM_BUILD_ROOT
58 %{__make} pure_install \
59 DESTDIR=$RPM_BUILD_ROOT
62 rm -rf $RPM_BUILD_ROOT
65 %defattr(644,root,root,755)
67 # note it's mostly easier to copy unpackaged filelist here, and run adapter over the spec.
69 %{perl_vendorlib}/POE/Component/Client/Keepalive.pm
70 %dir %{perl_vendorlib}/POE/Component/Connection
71 %{perl_vendorlib}/POE/Component/Connection/Keepalive.pm