File perl-DBIx-SearchBuilder.spec of Package perl-DBIx-SearchBuilder

#
# spec file for package perl-DBIx-SearchBuilder
#
# 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 DBIx-SearchBuilder
Name:           perl-DBIx-SearchBuilder
Version:        1.820.0
Release:        0
# 1.82 -> normalize -> 1.820.0
%define cpan_version 1.82
License:        Artistic-1.0 OR GPL-1.0-or-later
Summary:        Encapsulate SQL queries and rows in simple perl objects
URL:            https://metacpan.org/release/%{cpan_name}
Source0:        https://cpan.metacpan.org/authors/id/B/BP/BPS/%{cpan_name}-%{cpan_version}.tar.gz
Source1:        cpanspec.yml
BuildArch:      noarch
BuildRequires:  perl
BuildRequires:  perl-macros
BuildRequires:  perl(Cache::Simple::TimedExpiry) >= 0.21
BuildRequires:  perl(Class::Accessor)
BuildRequires:  perl(Class::ReturnValue) >= 0.4
BuildRequires:  perl(Clone)
BuildRequires:  perl(DBD::SQLite) >= 1.6
BuildRequires:  perl(DBI)
BuildRequires:  perl(DBIx::DBSchema)
BuildRequires:  perl(ExtUtils::MakeMaker) >= 6.59
BuildRequires:  perl(Want)
BuildRequires:  perl(capitalization) >= 0.03
Requires:       perl(Cache::Simple::TimedExpiry) >= 0.21
Requires:       perl(Class::Accessor)
Requires:       perl(Class::ReturnValue) >= 0.4
Requires:       perl(Clone)
Requires:       perl(DBI)
Requires:       perl(DBIx::DBSchema)
Requires:       perl(Want)
Requires:       perl(capitalization) >= 0.03
Provides:       perl(DBIx::SearchBuilder) = %{version}
Provides:       perl(DBIx::SearchBuilder::Handle)
Provides:       perl(DBIx::SearchBuilder::Handle::Informix)
Provides:       perl(DBIx::SearchBuilder::Handle::MariaDB)
Provides:       perl(DBIx::SearchBuilder::Handle::ODBC)
Provides:       perl(DBIx::SearchBuilder::Handle::Oracle)
Provides:       perl(DBIx::SearchBuilder::Handle::Pg)
Provides:       perl(DBIx::SearchBuilder::Handle::SQLite)
Provides:       perl(DBIx::SearchBuilder::Handle::Sybase)
Provides:       perl(DBIx::SearchBuilder::Handle::mysql)
Provides:       perl(DBIx::SearchBuilder::Handle::mysqlPP)
Provides:       perl(DBIx::SearchBuilder::Record)
Provides:       perl(DBIx::SearchBuilder::Record::Cachable)
Provides:       perl(DBIx::SearchBuilder::SchemaGenerator)
Provides:       perl(DBIx::SearchBuilder::Union)
Provides:       perl(DBIx::SearchBuilder::Unique) = 0.01
Provides:       perl(DBIx::SearchBuilder::Util)
%undefine       __perllib_provides
%{perl_requires}

%description
This module provides an object-oriented mechanism for retrieving and
updating data in a DBI-accesible database.

In order to use this module, you should create a subclass of
'DBIx::SearchBuilder' and a subclass of 'DBIx::SearchBuilder::Record' for
each table that you wish to access. (See the documentation of
'DBIx::SearchBuilder::Record' for more information on subclassing it.)

Your 'DBIx::SearchBuilder' subclass must override 'NewItem', and probably
should override at least '_Init' also; at the very least, '_Init' should
probably call '_Handle' and '_Table' to set the database handle (a
'DBIx::SearchBuilder::Handle' object) and table name for the class. You can
try to override just about every other method here, as long as you think
you know what you are doing.

%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 ROADMAP

%changelog
openSUSE Build Service is sponsored by