Files
perl-Class-DBI-Lite/perl-Class-DBI-Lite.spec
2025-08-12 18:12:23 +02:00

98 lines
3.3 KiB
RPMSpec

#
# spec file for package perl-Class-DBI-Lite
#
# 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 Class-DBI-Lite
Name: perl-Class-DBI-Lite
Version: 1.34.0
Release: 0
# 1.034 -> normalize -> 1.34.0
%define cpan_version 1.034
License: Artistic-1.0 OR GPL-1.0-or-later
Summary: Lightweight ORM for Perl
URL: https://metacpan.org/release/%{cpan_name}
Source0: https://cpan.metacpan.org/authors/id/J/JO/JOHND/%{cpan_name}-%{cpan_version}.tar.gz
Source1: cpanspec.yml
Source100: README.md
BuildArch: noarch
BuildRequires: perl
BuildRequires: perl-macros
BuildRequires: perl(DBD::SQLite)
BuildRequires: perl(DBI)
BuildRequires: perl(Ima::DBI::Contextual) >= 1.5.0
BuildRequires: perl(SQL::Abstract)
BuildRequires: perl(SQL::Abstract::Limit)
BuildRequires: perl(Test::Memory::Cycle)
Requires: perl(DBD::SQLite)
Requires: perl(DBI)
Requires: perl(Ima::DBI::Contextual) >= 1.5.0
Requires: perl(SQL::Abstract)
Requires: perl(SQL::Abstract::Limit)
Requires: perl(Test::Memory::Cycle)
Provides: perl(Class::DBI::Lite) = %{version}
Provides: perl(Class::DBI::Lite::CacheManager)
Provides: perl(Class::DBI::Lite::CacheManager::InMemory)
Provides: perl(Class::DBI::Lite::CacheManager::Memcached)
Provides: perl(Class::DBI::Lite::ColumnInfo)
Provides: perl(Class::DBI::Lite::Fixture)
Provides: perl(Class::DBI::Lite::Iterator)
Provides: perl(Class::DBI::Lite::Pager)
Provides: perl(Class::DBI::Lite::SQLite)
Provides: perl(Class::DBI::Lite::TableInfo)
Provides: perl(Class::DBI::Lite::mysql)
%undefine __perllib_provides
%{perl_requires}
%description
'Class::DBI::Lite' offers a simple way to deal with databases in an
object-oriented way.
One class (the *Model* class) defines your connection to the database (eg:
connectionstring, username and password) and your other classes define
interaction with one table each (your *entity* classes).
The Entity classes subclass the Model class and automatically inherit its
connection.
'Class::DBI::Lite' relies heavily on Ima::DBI::Contextual, SQL::Abstract
and Scalar::Util.
'Class::DBI::Lite' does not leak memory and is well-suited for use within
mod_perl, Fast CGI, CGI and anywhere else you might need it.
%prep
%autosetup -n %{cpan_name}-%{cpan_version}
find . -type f ! -path "*/t/*" ! -name "*.pl" ! -path "*/bin/*" ! -path "*/script/*" ! -path "*/scripts/*" ! -name "configure" -print0 | xargs -0 chmod 644
%build
PERL_USE_UNSAFE_INC=1 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 runprofiler.sh runtests.sh
%changelog