2011-08-22 15:11:35 +00:00
|
|
|
#
|
|
|
|
# spec file for package perl-Array-Unique
|
|
|
|
#
|
|
|
|
# All modifications and additions to the file contributed by third parties
|
|
|
|
# remain the property of their copyright owners, unless otherwise agreed
|
|
|
|
# upon. The license for this file, and modifications and additions to the
|
|
|
|
# file, is the same license as for the pristine package itself (unless the
|
|
|
|
# license for the pristine package is not an Open Source License, in which
|
|
|
|
# case the license is the MIT License). An "Open Source License" is a
|
|
|
|
# license that conforms to the Open Source Definition (Version 1.9)
|
|
|
|
# published by the Open Source Initiative.
|
2011-04-22 20:44:17 +00:00
|
|
|
|
|
|
|
Name: perl-Array-Unique
|
|
|
|
Version: 0.08
|
2011-08-22 15:11:35 +00:00
|
|
|
Release: 1
|
|
|
|
License: GPLv2+ or Artistic
|
|
|
|
%define cpan_name Array-Unique
|
2011-04-22 20:44:17 +00:00
|
|
|
Summary: Tie-able array that allows only unique values
|
2011-08-22 15:11:35 +00:00
|
|
|
Url: http://search.cpan.org/dist/Array-Unique/
|
2011-04-22 20:44:17 +00:00
|
|
|
Group: Development/Libraries/Perl
|
2011-08-22 15:11:35 +00:00
|
|
|
#Source: http://www.cpan.org/authors/id/S/SZ/SZABGAB/Array-Unique-%%{version}.tar.gz
|
|
|
|
Source: %{cpan_name}-%{version}.tar.gz
|
|
|
|
BuildRequires: perl
|
2011-04-22 20:44:17 +00:00
|
|
|
BuildRequires: perl-macros
|
|
|
|
BuildRequires: perl(Test::More) >= 0.47
|
|
|
|
BuildRequires: perl(Module::Build)
|
2011-08-22 15:11:35 +00:00
|
|
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
2011-04-22 20:44:17 +00:00
|
|
|
BuildArch: noarch
|
2011-08-22 15:11:35 +00:00
|
|
|
%{perl_requires}
|
2011-04-22 20:44:17 +00:00
|
|
|
|
|
|
|
%description
|
|
|
|
This package lets you create an array which will allow only one occurrence
|
|
|
|
of any value.
|
2011-08-22 15:11:35 +00:00
|
|
|
|
|
|
|
In other words no matter how many times you put in 42 it will keep only the
|
|
|
|
first occurrence and the rest will be dropped.
|
|
|
|
|
2011-04-22 20:44:17 +00:00
|
|
|
You use the module via tie and once you tied your array to this module it
|
|
|
|
will behave correctly.
|
2011-08-22 15:11:35 +00:00
|
|
|
|
2011-04-22 20:44:17 +00:00
|
|
|
Uniqueness is checked with the 'eq' operator so among other things it is
|
|
|
|
case sensitive.
|
2011-08-22 15:11:35 +00:00
|
|
|
|
2011-04-22 20:44:17 +00:00
|
|
|
As a side effect the module does not allow undef as a value in the array.
|
|
|
|
|
|
|
|
%prep
|
2011-08-22 15:11:35 +00:00
|
|
|
%setup -q -n %{cpan_name}-%{version}
|
2011-04-22 20:44:17 +00:00
|
|
|
|
|
|
|
%build
|
2011-08-22 15:11:35 +00:00
|
|
|
%{__perl} Build.PL installdirs=vendor
|
|
|
|
./Build build flags=%{?_smp_mflags}
|
2011-04-22 20:44:17 +00:00
|
|
|
|
|
|
|
%check
|
|
|
|
./Build test
|
|
|
|
|
2011-08-22 15:11:35 +00:00
|
|
|
%install
|
|
|
|
./Build install destdir=%{buildroot} create_packlist=0
|
|
|
|
%perl_gen_filelist
|
|
|
|
|
2011-04-22 20:44:17 +00:00
|
|
|
%clean
|
2011-08-22 15:11:35 +00:00
|
|
|
%{__rm} -rf %{buildroot}
|
2011-04-22 20:44:17 +00:00
|
|
|
|
2011-08-22 15:11:35 +00:00
|
|
|
%files -f %{name}.files
|
|
|
|
%defattr(644,root,root,755)
|
2011-04-22 20:44:17 +00:00
|
|
|
%doc Changes README
|
|
|
|
|
2011-08-22 15:11:35 +00:00
|
|
|
%changelog
|