2024-07-19 22:30:19 +00:00
committed by Git OBS Bridge
parent 26d6a5d8ff
commit 0ac7cc027e

View File

@@ -1,7 +1,7 @@
#
# spec file for package perl-Collection
#
# Copyright (c) 2015 SUSE LINUX GmbH, Nuernberg, Germany.
# Copyright (c) 2024 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -12,31 +12,48 @@
# 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/
# Please submit bugfixes or comments via https://bugs.opensuse.org/
#
Name: perl-Collection
Version: 0.58
Release: 0
%define cpan_name Collection
Name: perl-Collection
Version: 0.580.0
Release: 0
# 0.58 -> normalize -> 0.580.0
%define cpan_version 0.58
License: Artistic-1.0 OR GPL-1.0-or-later
Summary: CRUD framework
License: Artistic-1.0 or GPL-1.0+
Group: Development/Libraries/Perl
Url: http://search.cpan.org/dist/Collection/
Source0: http://www.cpan.org/authors/id/Z/ZA/ZAG/%{cpan_name}-%{version}.tar.gz
URL: https://metacpan.org/release/%{cpan_name}
Source0: https://cpan.metacpan.org/authors/id/Z/ZA/ZAG/%{cpan_name}-%{cpan_version}.tar.gz
Source1: cpanspec.yml
BuildArch: noarch
BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildRequires: perl
BuildRequires: perl-macros
BuildRequires: perl(Flow) >= 0.6
BuildRequires: perl(Flow) >= 0.600.0
BuildRequires: perl(JSON::XS) >= 2.29
BuildRequires: perl(Module::Build) >= 0.380000
BuildRequires: perl(Module::Build) >= 0.38
BuildRequires: perl(String::CRC32) >= 1.4
Requires: perl(Flow) >= 0.6
Requires: perl(Flow) >= 0.600.0
Requires: perl(JSON::XS) >= 2.29
Requires: perl(String::CRC32) >= 1.4
Provides: perl(Collection) = %{version}
Provides: perl(Collection::AutoSQL) = 1.100.0
Provides: perl(Collection::AutoSQLnotUnique) = 0.10.0
Provides: perl(Collection::CrcColl) = 0.110.0
Provides: perl(Collection::Index) = 0.20.0
Provides: perl(Collection::Mem) = 0.10.0
Provides: perl(Collection::Memcached) = 0.10.0
Provides: perl(Collection::Storable) = 0.10.0
Provides: perl(Collection::Utl::ActiveRecord) = 0.10.0
Provides: perl(Collection::Utl::Base) = 0.10.0
Provides: perl(Collection::Utl::Flow) = 0.10.0
Provides: perl(Collection::Utl::HashUnion) = 0.10.0
Provides: perl(Collection::Utl::Item) = 0.20.0
Provides: perl(Collection::Utl::LazyObject) = 0.10.0
Provides: perl(Collection::Utl::Mirror) = 0.20.0
Provides: perl(Collection::Utl::StoreDir)
%undefine __perllib_provides
%{perl_requires}
%description
@@ -76,18 +93,18 @@ Sample:
#free memory
$col->release;
Sample from the Collection::AutoSQL manpage:
Sample from Collection::AutoSQL:
my $beers = new Collection::AutoSQL::
dbh => $dbh, #database connect
table => 'beers', #table name
field => 'bid', #key field (IDs), usually primary,autoincrement
cut_key => 1; #delete field 'bid' from readed records,
my $heineken = $beers->fetch_one(1);
#SELECT * FROM beers WHERE bid in (1)
Sample from the Collection::Memcached manpage:
Sample from Collection::Memcached:
use Collection::Memcached;
use Cache::Memcached;
@@ -100,21 +117,20 @@ Sample from the Collection::Memcached manpage:
my $collection_prefix = new Collection::Memcached:: $memd, 'prefix';
%prep
%setup -q -n %{cpan_name}-%{version}
%autosetup -n %{cpan_name}-%{cpan_version}
%build
%{__perl} Build.PL installdirs=vendor
./Build build flags=%{?_smp_mflags}
perl Build.PL --installdirs=vendor
./Build build --flags=%{?_smp_mflags}
%check
./Build test
%install
./Build install destdir=%{buildroot} create_packlist=0
./Build install --destdir=%{buildroot} --create_packlist=0
%perl_gen_filelist
%files -f %{name}.files
%defattr(-,root,root,755)
%doc Changes README scripts
%doc Changes README
%changelog