File perl-Algorithm-Bucketizer.spec of Package perl-Algorithm-Bucketizer

#
# spec file for package perl-Algorithm-Bucketizer
#
# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany.
#
# 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.

# Please submit bugfixes or comments via http://bugs.opensuse.org/
#


Name:           perl-Algorithm-Bucketizer
Version:        0.13
Release:        0
%define cpan_name Algorithm-Bucketizer
Summary:        Distribute sized items to buckets with limited size
License:        GPL-1.0+ or Artistic-1.0
Group:          Development/Libraries/Perl
Url:            http://search.cpan.org/dist/Algorithm-Bucketizer/
Source0:        http://www.cpan.org/authors/id/M/MS/MSCHILLI/%{cpan_name}-%{version}.tar.gz
BuildArch:      noarch
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
BuildRequires:  perl
BuildRequires:  perl-macros
BuildRequires:  perl(Sysadm::Install) >= 0.23
Requires:       perl(Sysadm::Install) >= 0.23
%{perl_requires}

%description
So, you own a number of mp3-Songs on your hard disc and want to copy them
to a number of CDs, maxing out the space available on each of them? You
want to distribute your picture collection into several folders, so each of
them doesn't exceed a certain size? 'Algorithm::Bucketizer' comes to the
rescue.

'Algorithm::Bucketizer' distributes items of a defined size into a number
of dynamically created buckets, each of them capable of holding items of a
defined total size.

By calling the '$bucketizer->add_item()' method with the item (can be a
scalar or an object reference) and its size as parameters, you're adding
items to the system. The bucketizer will determine if the item fits into
one of the existing buckets and put it in there if possible. If none of the
existing buckets has enough space left to hold the new item (or if no
buckets exist yet for that matter), the bucketizer will create a new bucket
and put the item in there.

After adding all items to the system, the bucketizer lets you iterate over
all buckets with the '$bucketizer->items()' method and determine what's in
each of them.

%prep
%setup -q -n %{cpan_name}-%{version}
find . -type f ! -name \*.pl -print0 | xargs -0 chmod 644

%build
%{__perl} Makefile.PL INSTALLDIRS=vendor
%{__make} %{?_smp_mflags}

%check
%{__make} test

%install
%perl_make_install
%perl_process_packlist
%perl_gen_filelist

%files -f %{name}.files
%defattr(-,root,root,755)
%doc Changes README

%changelog
openSUSE Build Service is sponsored by