Files
perl-ORLite/perl-ORLite.spec
2025-08-12 18:16:14 +02:00

104 lines
3.4 KiB
RPMSpec

#
# spec file for package perl-ORLite
#
# 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 ORLite
Name: perl-ORLite
Version: 2.0.0
Release: 0
%define cpan_version 2.00
License: Artistic-1.0 OR GPL-1.0-or-later
Summary: Extremely light weight SQLite-specific ORM
URL: https://metacpan.org/release/%{cpan_name}
Source0: https://cpan.metacpan.org/authors/id/E/ET/ETHER/%{cpan_name}-%{cpan_version}.tar.gz
Source1: cpanspec.yml
Source100: README.md
BuildArch: noarch
BuildRequires: perl
BuildRequires: perl-macros
BuildRequires: perl(Class::XSAccessor)
BuildRequires: perl(Class::XSAccessor::Array)
BuildRequires: perl(DBD::SQLite) >= 1.27
BuildRequires: perl(DBI) >= 1.607
BuildRequires: perl(File::Path) >= 2.08
BuildRequires: perl(File::Remove)
BuildRequires: perl(Params::Util) >= 1.00
BuildRequires: perl(Test::Deep)
BuildRequires: perl(Test::Script)
Requires: perl(DBD::SQLite) >= 1.27
Requires: perl(DBI) >= 1.607
Requires: perl(File::Path) >= 2.08
Requires: perl(File::Remove)
Requires: perl(Params::Util) >= 1.00
Provides: perl(ORLite) = 2.0.0
%undefine __perllib_provides
%{perl_requires}
# MANUAL BEGIN
BuildRequires: perl(Class::XSAccessor)
BuildRequires: sqlite
BuildRequires: perl(Test::Deep)
# MANUAL END
%description
SQLite is a light single file SQL database that provides an excellent
platform for embedded storage of structured data.
However, while it is superficially similar to a regular server-side SQL
database, SQLite has some significant attributes that make using it like a
traditional database difficult.
For example, SQLite is extremely fast to connect to compared to server
databases (1000 connections per second is not unknown) and is particularly
bad at concurrency, as it can only lock transactions at a database-wide
level.
This role as a superfast internal data store can clash with the roles and
designs of traditional object-relational modules like Class::DBI or
DBIx::Class.
What this situation would seem to need is an object-relation system that is
designed specifically for SQLite and is aligned with its idiosyncracies.
ORLite is an object-relation system specifically tailored for SQLite that
follows many of the same principles as the ::Tiny series of modules and has
a design and feature set that aligns directly to the capabilities of
SQLite.
Further documentation will be available at a later time, but the synopsis
gives a pretty good idea of how it works.
%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 CONTRIBUTING README
%license LICENSE
%changelog