93 lines
3.4 KiB
RPMSpec
93 lines
3.4 KiB
RPMSpec
#
|
|
# spec file for package perl-Cache-CacheFactory
|
|
#
|
|
# 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
|
|
# 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 https://bugs.opensuse.org/
|
|
#
|
|
|
|
|
|
%define cpan_name Cache-CacheFactory
|
|
Name: perl-Cache-CacheFactory
|
|
Version: 1.100.0
|
|
Release: 0
|
|
# 1.10 -> normalize -> 1.100.0
|
|
%define cpan_version 1.10
|
|
License: Artistic-1.0 OR GPL-1.0-or-later
|
|
Summary: Factory class for Cache::Cache and other modules
|
|
URL: https://metacpan.org/release/%{cpan_name}
|
|
Source0: https://cpan.metacpan.org/authors/id/S/SG/SGRAHAM/%{cpan_name}-%{cpan_version}.tar.gz
|
|
Source100: README.md
|
|
BuildArch: noarch
|
|
BuildRequires: perl
|
|
BuildRequires: perl-macros
|
|
BuildRequires: perl(Cache::BaseCache)
|
|
BuildRequires: perl(Cache::Cache) >= 1
|
|
BuildRequires: perl(Cache::Object)
|
|
BuildRequires: perl(Class::Factory)
|
|
BuildRequires: perl(Module::Build) >= 0.36
|
|
Requires: perl(Cache::BaseCache)
|
|
Requires: perl(Cache::Cache) >= 1
|
|
Requires: perl(Cache::Object)
|
|
Requires: perl(Class::Factory)
|
|
Provides: perl(Cache::CacheFactory) = %{version}
|
|
Provides: perl(Cache::CacheFactory::Expiry) = %{version}
|
|
Provides: perl(Cache::CacheFactory::Expiry::Base) = %{version}
|
|
Provides: perl(Cache::CacheFactory::Expiry::LastModified) = %{version}
|
|
Provides: perl(Cache::CacheFactory::Expiry::Size) = %{version}
|
|
Provides: perl(Cache::CacheFactory::Expiry::Time) = %{version}
|
|
Provides: perl(Cache::CacheFactory::Object) = %{version}
|
|
Provides: perl(Cache::CacheFactory::Storage) = %{version}
|
|
%undefine __perllib_provides
|
|
Recommends: perl(Cache::FastMemoryCache) >= 0.10.0
|
|
Recommends: perl(Cache::FileCache)
|
|
Recommends: perl(Cache::MemoryCache)
|
|
Recommends: perl(Cache::SharedMemoryCache)
|
|
Recommends: perl(Devel::Size) >= 0.690.0
|
|
%{perl_requires}
|
|
|
|
%description
|
|
Cache::CacheFactory is a drop-in replacement for the Cache::Cache
|
|
subclasses allowing you to access a variety of caching policies from a
|
|
single place, mixing and matching as you choose rather than having to
|
|
search for the cache module that provides the exact combination you want.
|
|
|
|
In a nutshell you specify a policy for storage, for pruning and for
|
|
validity checks and CacheFactory hooks you up with the right modules to
|
|
provide that behaviour while providing you with the same API you're used to
|
|
from Cache::Cache - the only thing you need to change is your call to the
|
|
constructor.
|
|
|
|
More advanced use allows you to set multiple policies for pruning and
|
|
validity checks, and even for storage although that's currently of limited
|
|
use.
|
|
|
|
%prep
|
|
%autosetup -n %{cpan_name}-%{cpan_version}
|
|
|
|
%build
|
|
perl Build.PL --installdirs=vendor
|
|
./Build build --flags=%{?_smp_mflags}
|
|
|
|
%check
|
|
./Build test
|
|
|
|
%install
|
|
./Build install --destdir=%{buildroot} --create_packlist=0
|
|
%perl_gen_filelist
|
|
|
|
%files -f %{name}.files
|
|
%doc Changes README TODO
|
|
%license COPYING
|
|
|
|
%changelog
|