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
9 Summary: perl(XML::Atom)
10 Summary(pl): perl(XML::Atom)
14 # "same as perl" according to META.yml
15 License: (enter GPL/LGPL/BSD/BSD-like/Artistic/other license name here)
16 Group: Development/Languages/Perl
17 Source0: http://www.cpan.org/modules/by-module/%{pdir}/%{pdir}-%{pnam}-%{version}.tar.gz
19 URL: http://search.cpan.org/dist/%{pdir}-%{pnam}
20 BuildRequires: perl-devel >= 1:5.8.0
21 BuildRequires: rpm-perlprov >= 4.1-13
22 # most of CPAN modules have generic URL (substitute pdir and pnam here)
23 %if %{with autodeps} || %{with tests}
26 BuildRequires: perl-DateTime
32 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
35 Atom feed and API implementation.
38 %setup -q -n %{pdir}-%{pnam}-%{version}
39 # yes i know, its crude, but works, and its simple
40 perl -pi -e 's/^auto_install/#auto_install/' Makefile.PL;
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 %{perl_vendorlib}/XML/Atom.pm
68 %dir %{perl_vendorlib}/XML/Atom
69 %{perl_vendorlib}/XML/Atom/*.pm