File perl-Convert-Color.spec of Package perl-Convert-Color

#
# spec file for package perl-Convert-Color
#
# Copyright (c) 2023 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 Convert-Color
Name:           perl-Convert-Color
Version:        0.17
Release:        0
License:        Artistic-1.0 OR GPL-1.0-or-later
Summary:        Color space conversions and named lookups
URL:            https://metacpan.org/release/%{cpan_name}
Source0:        https://cpan.metacpan.org/authors/id/P/PE/PEVANS/%{cpan_name}-%{version}.tar.gz
Source1:        cpanspec.yml
BuildArch:      noarch
BuildRequires:  perl
BuildRequires:  perl-macros
BuildRequires:  perl(List::UtilsBy)
BuildRequires:  perl(Module::Build) >= 0.400400
BuildRequires:  perl(Module::Pluggable)
BuildRequires:  perl(Sub::Util) >= 1.40
BuildRequires:  perl(Test2::V0)
Requires:       perl(List::UtilsBy)
Requires:       perl(Module::Pluggable)
Requires:       perl(Sub::Util) >= 1.40
%{perl_requires}

%description
This module provides conversions between commonly used ways to express
colors. It provides conversions between color spaces such as RGB and HSV,
and it provides ways to look up colors by a name.

This class provides a base for subclasses which represent particular color
values in particular spaces. The base class provides methods to represent
the color in a few convenient forms, though subclasses may provide more
specific details for the space in question.

For more detail, read the documentation on these classes; namely:

  * Convert::Color::RGB - red/green/blue as floats between 0 and 1

  * Convert::Color::RGB8 - red/green/blue as 8-bit integers

  * Convert::Color::RGB16 - red/green/blue as 16-bit integers

  * Convert::Color::HSV - hue/saturation/value

  * Convert::Color::HSL - hue/saturation/lightness

  * Convert::Color::CMY - cyan/magenta/yellow

  * Convert::Color::CMYK - cyan/magenta/yellow/key (blackness)

The following classes are subclasses of one of the above, which provide a
way to access predefined colors by names:

  * Convert::Color::VGA - named lookup for the basic VGA colors

  * Convert::Color::X11 - named lookup of colors from X11's _rgb.txt_

%prep
%autosetup  -n %{cpan_name}-%{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 examples README
%license LICENSE

%changelog
openSUSE Build Service is sponsored by