+#
+# Conditional build:
+%bcond_without tests # do not perform "make test"
+#
%include /usr/lib/rpm/macros.perl
-Summary: DelimMatch perl module
-Summary(pl): Modu³ perla DelimMatch
+%define pdir Text
+%define pnam DelimMatch
+Summary: DelimMatch - find regexp delimited strings with proper nesting
+Summary(pl): DelimMatch - poszukiwanie ³añcuchów ograniczonych wyra¿eniami regularnymi
Name: perl-DelimMatch
-Version: 1.03
-Release: 3
-Copyright: GPL
+Version: 1.06a
+Release: 1
+# same as perl
+License: GPL v1+ or Artistic
Group: Development/Languages/Perl
-Group(pl): Programowanie/Jêzyki/Perl
-Source: ftp://ftp.perl.org/pub/CPAN/modules/by-module/Text/DelimMatch-%{version}.tar.gz
-BuildRequires: rpm-perlprov >= 3.0.3-16
-BuildRequires: perl >= 5.005_03-14
-%requires_eq perl
-Requires: %{perl_sitearch}
+Source0: http://www.cpan.org/modules/by-module/%{pdir}/%{pnam}-%{version}.tar.gz
+# Source0-md5: 8efb70c2326d0b8f551708e9cdc2b649
+BuildRequires: rpm-perlprov >= 4.1-13
+BuildRequires: perl-devel >= 1:5.8.0
+BuildArch: noarch
BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
%description
-DelimMatch - Perl extension to find regexp delimited strings with proper
-nesting.
+DelimMatch is a Perl extension to find regexp delimited strings with
+proper nesting.
%description -l pl
-Modu³ perla DelimMatch.
+DelimMatch jest rozszerzeniem Perla do wyszukiwania ³añcuchów
+ograniczonych wyra¿eniami regularnymi z w³a¶ciwym zagnie¿d¿eniem.
%prep
-%setup -q -n DelimMatch-%{version}
+%setup -q -n DelimMatch-1.06
%build
-perl Makefile.PL
-make
+%{__perl} Makefile.PL \
+ INSTALLDIRS=vendor
+%{__make}
+
+%{?with_tests:%{__make} test}
%install
rm -rf $RPM_BUILD_ROOT
-make install DESTDIR=$RPM_BUILD_ROOT
-
-(
- cd $RPM_BUILD_ROOT%{perl_sitearch}/auto/Text/DelimMatch
- sed -e "s#$RPM_BUILD_ROOT##" .packlist >.packlist.new
- mv .packlist.new .packlist
-)
-gzip -9nf $RPM_BUILD_ROOT%{_mandir}/man3/* \
- README
+%{__make} install \
+ DESTDIR=$RPM_BUILD_ROOT
%clean
rm -rf $RPM_BUILD_ROOT
%files
%defattr(644,root,root,755)
-%doc README.gz
-
-%{perl_sitelib}/Text/DelimMatch.pm
-%{perl_sitearch}/auto/Text/DelimMatch
-
+%doc README
+%{perl_vendorlib}/Text/DelimMatch.pm
+# empty autosplit.ix
+#%dir %{perl_vendorlib}/auto/Text/DelimMatch
+#%%{perl_vendorlib}/auto/Text/DelimMatch/autosplit.ix
%{_mandir}/man3/*