Files
perl-Catalyst-Model-DBI/perl-Catalyst-Model-DBI.spec
2025-08-12 18:12:08 +02:00

82 lines
2.7 KiB
RPMSpec

#
# spec file for package perl-Catalyst-Model-DBI
#
# 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 Catalyst-Model-DBI
Name: perl-Catalyst-Model-DBI
Version: 0.320.0
Release: 0
# 0.32 -> normalize -> 0.320.0
%define cpan_version 0.32
License: listed above.
Summary: DBI Model Class
URL: https://metacpan.org/release/%{cpan_name}
Source0: https://cpan.metacpan.org/authors/id/A/AL/ALEXP/%{cpan_name}-%{cpan_version}.tar.gz
Source1: cpanspec.yml
Source100: README.md
BuildArch: noarch
BuildRequires: perl
BuildRequires: perl-macros
BuildRequires: perl(Catalyst) >= 5.0.0
BuildRequires: perl(DBI)
BuildRequires: perl(DBIx::Connector)
BuildRequires: perl(MRO::Compat)
Requires: perl(Catalyst) >= 5.0.0
Requires: perl(DBI)
Requires: perl(DBIx::Connector)
Requires: perl(MRO::Compat)
Provides: perl(Catalyst::Helper::Model::DBI) = %{version}
Provides: perl(Catalyst::Model::DBI) = %{version}
%undefine __perllib_provides
%{perl_requires}
%description
This is the 'DBI' model class. It has been rewritten to use DBIx::Connector
since it's internal code that deals with connection maintenance has already
been ported into there. You now have two options for doing custom models
with Catalyst. Either by using this model and any related modules as needed
or by having your custom model decoupled from Catalyst and glued on using
Catalyst::Model::Adaptor
Some general rules are as follows. If you do not wish to use
DBIx::Connector directly or DBI and setup connections in your custom models
or have glue models, then use this model. If you however need models that
can be re-used outside of your application or simply wish to maintain
connection code yourself outside of the Catalyst, then use
Catalyst::Model::Adaptor which allows you to glue outside models into your
Catalyst app.
%prep
%autosetup -n %{cpan_name}-%{cpan_version}
%build
perl Makefile.PL INSTALLDIRS=vendor
%make_build
%check
make test
%install
%perl_make_install
%perl_process_packlist
%perl_gen_filelist
%files -f %{name}.files
%doc Changes README
%changelog