perl-Algorithm-Diff/perl-Algorithm-Diff.spec

61 lines
2.0 KiB
RPMSpec

%define perl_major_ver %(eval `perl -V:version`; echo ${version%*.[0-9]*}.0)
Name: perl-Algorithm-Diff
Version: 1.1902
Release: 3mamba
Summary: Algorithm::Diff - Computs the difference between two files, two strings, or any other two lists of things
Group: System/Libraries/Perl
Vendor: openmamba
Distribution: openmamba
Packager: Aleph0 <aleph0@openmamba.org>
URL: http://www.cpan.org
Source: http://www.cpan.org/modules/by-module/Algorithm/Algorithm-Diff-%{version}.tar.gz
License: Artistic
Requires: perl >= %perl_major_ver
BuildRequires: perl-devel >= %perl_major_ver
BuildArch: noarch
BuildRoot: %{_tmppath}/%{name}-%{version}-root
%description
This is a module for computing the difference between two files, two strings, or any other two lists of things.
It uses an intelligent algorithm similar to (or identical to) the one used by the Unix "diff" program.
It is guaranteed to find the *smallest possible* set of differences.
%prep
%setup -q -n Algorithm-Diff-%{version}
%build
perl Makefile.PL PREFIX=%{_prefix} INSTALLDIRS=vendor
%make
%make test
%install
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
%makeinstall_perl
packlist=`find %{buildroot} -name .packlist`
[ -z "$packlist" ] && exit 1 || cat $packlist | \
sed "s,%buildroot,,g;s,.*/man/.*,&.gz,g" | \
sort -u > .packlist && rm $packlist
strid=`echo $packlist | sed 's,.*auto\(.*\)/.packlist,\1,'`
for dir in `find %{buildroot} -type d | grep $strid`; do
echo "%dir ${dir#%buildroot}" >> .packlist
done
%clean
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
rm -f .packlist
%files -f .packlist
%defattr(-,root,root)
%changelog
* Tue Nov 13 2012 Silvan Calarco <silvan.calarco@mambasoft.it> 1.1902-3mamba
- perl 5.16 mass rebuild
* Mon Nov 03 2008 Silvan Calarco <silvan.calarco@mambasoft.it> 1.1902-2mamba
- automatic rebuild by autodist
* Mon Nov 12 2007 Aleph0 <aleph0@openmamba.org> 1.1902-1mamba
- package created by autospec