Files
perl-DBIx-Class-BitField/perl-DBIx-Class-BitField.spec
2025-08-12 18:13:21 +02:00

82 lines
2.6 KiB
RPMSpec

#
# spec file for package perl-DBIx-Class-BitField
#
# 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-Class-BitField
Name: perl-DBIx-Class-BitField
Version: 0.130.0
Release: 0
# 0.13 -> normalize -> 0.130.0
%define cpan_version 0.13
License: BSD-3-Clause
Summary: Store multiple boolean fields in one integer field
URL: https://metacpan.org/release/%{cpan_name}
Source0: https://cpan.metacpan.org/authors/id/P/PE/PERLER/%{cpan_name}-%{cpan_version}.tar.gz
Source100: README.md
BuildArch: noarch
BuildRequires: perl
BuildRequires: perl-macros
BuildRequires: perl(DBD::SQLite)
BuildRequires: perl(DBIx::Class) >= 0.08107
BuildRequires: perl(File::Find::Rule)
BuildRequires: perl(Test::More) >= 0.92
Requires: perl(DBD::SQLite)
Requires: perl(DBIx::Class) >= 0.08107
Requires: perl(File::Find::Rule)
Requires: perl(Test::More) >= 0.92
Provides: perl(DBIx::Class::BitField) = %{version}
Provides: perl(DBIx::Class::ResultSet::BitField) = %{version}
%undefine __perllib_provides
%{perl_requires}
%description
This module is useful if you manage data which has a lot of on/off
attributes like _active, inactive, deleted, important, etc._. If you do not
want to add an extra column for each of those attributes you can easily
specify them in one 'integer' column.
A bit field is a way to store multiple bit values on one integer field.
The main benefit from this module is that you can add additional attributes
to your result class whithout the need to deploy or change the schema on
the data base.
*This module encourages to not normalize your schema. You should consider a
'has_many' relationship to a table which holds all the flags instead of
this module.*
%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
%license LICENSE
%changelog