Files
perl-Class-Generate/perl-Class-Generate.spec

96 lines
3.8 KiB
RPMSpec
Raw Permalink Normal View History

#
# spec file for package perl-Class-Generate
#
# 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-Generate
Name: perl-Class-Generate
Version: 1.180.0
Release: 0
# 1.18 -> normalize -> 1.180.0
%define cpan_version 1.18
License: Artistic-1.0 OR GPL-1.0-or-later
Summary: Generate Perl class hierarchies
URL: https://metacpan.org/release/%{cpan_name}
Source0: https://cpan.metacpan.org/authors/id/S/SH/SHLOMIF/%{cpan_name}-%{cpan_version}.tar.gz
Source1: cpanspec.yml
2025-08-12 18:12:24 +02:00
Source100: README.md
BuildArch: noarch
BuildRequires: perl
BuildRequires: perl-macros
BuildRequires: perl(Module::Build) >= 0.28
BuildRequires: perl(Test::More) >= 0.88
BuildRequires: perl(Text::Soundex)
Provides: perl(Class::Generate) = %{version}
Provides: perl(Class::Generate::Array) = %{version}
Provides: perl(Class::Generate::Array_Class) = %{version}
Provides: perl(Class::Generate::Array_Member) = %{version}
Provides: perl(Class::Generate::Class) = %{version}
Provides: perl(Class::Generate::Class_Holder) = %{version}
Provides: perl(Class::Generate::Class_Method) = %{version}
Provides: perl(Class::Generate::Code_Checker) = %{version}
Provides: perl(Class::Generate::Constructor) = %{version}
Provides: perl(Class::Generate::Hash) = %{version}
Provides: perl(Class::Generate::Hash_Class) = %{version}
Provides: perl(Class::Generate::Hash_Member) = %{version}
Provides: perl(Class::Generate::Key_Value) = %{version}
Provides: perl(Class::Generate::List_Member) = %{version}
Provides: perl(Class::Generate::Member) = %{version}
Provides: perl(Class::Generate::Member_Names) = %{version}
Provides: perl(Class::Generate::Method) = %{version}
Provides: perl(Class::Generate::Mix) = %{version}
Provides: perl(Class::Generate::Own) = %{version}
Provides: perl(Class::Generate::Param_Style) = %{version}
Provides: perl(Class::Generate::Positional) = %{version}
Provides: perl(Class::Generate::Scalar_Member) = %{version}
Provides: perl(Class::Generate::Support) = %{version}
%undefine __perllib_provides
%{perl_requires}
%description
The 'Class::Generate' package exports functions that take as arguments a
class specification and create from these specifications a Perl 5 class.
The specification language allows many object-oriented constructs: typed
members, inheritance, private members, required members, default values,
object methods, class methods, class variables, and more.
CPAN contains similar packages. Why another? Because object-oriented
programming, especially in a dynamic language like Perl, is a complicated
endeavor. I wanted a package that would work very hard to catch the errors
you (well, I anyway) commonly make. I wanted a package that could help me
enforce the contract of object-oriented programming. I also wanted it to
get out of my way when I asked.
%prep
%autosetup -n %{cpan_name}-%{cpan_version}
%build
perl Build.PL --installdirs=vendor
./Build build --flags=%{?_smp_mflags}
%check
./Build test
%install
./Build install --destdir=%{buildroot} --create_packlist=0
%perl_gen_filelist
%files -f %{name}.files
%doc Changes README README.md
%license LICENSE
%changelog