forked from pool/perl-JSON-Validator
- Add missing BuildRequires for tests - Skip failing id-keyword-draft4.t OBS-URL: https://build.opensuse.org/request/show/670329 OBS-URL: https://build.opensuse.org/package/show/devel:languages:perl/perl-JSON-Validator?expand=0&rev=1
75 lines
2.3 KiB
RPMSpec
75 lines
2.3 KiB
RPMSpec
#
|
|
# spec file for package perl-JSON-Validator
|
|
#
|
|
# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany.
|
|
#
|
|
# 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/
|
|
#
|
|
|
|
|
|
Name: perl-JSON-Validator
|
|
Version: 2.19
|
|
Release: 0
|
|
%define cpan_name JSON-Validator
|
|
Summary: Validate data against a JSON schema
|
|
License: Artistic-2.0
|
|
Group: Development/Libraries/Perl
|
|
Url: https://metacpan.org/release/%{cpan_name}
|
|
Source0: JSON-Validator-2.19.tar.gz
|
|
BuildArch: noarch
|
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
|
BuildRequires: perl
|
|
BuildRequires: perl-macros
|
|
BuildRequires: perl(Mojolicious) >= 7.28
|
|
BuildRequires: perl(YAML::XS)
|
|
BuildRequires: perl(Cpanel::JSON::XS)
|
|
BuildRequires: perl(Test::More) >= 1.30
|
|
BuildRequires: perl(Data::Validate::Domain)
|
|
BuildRequires: perl(Data::Validate::IP)
|
|
Requires: perl-base >= 5.28.1
|
|
Requires: perl(Mojolicious) >= 7.28
|
|
%{perl_requires}
|
|
|
|
%description
|
|
JSON::Validator is a class for validating data against JSON schemas. You
|
|
might want to use this instead of JSON::Schema if you need to validate data
|
|
against at https://github.com/json-schema/json-schema/tree/master/draft-04
|
|
of the specification.
|
|
|
|
This module can be used standalone, but if you want to define a
|
|
specification for your webserver's API, then have a look at
|
|
Mojolicious::Plugin::OpenAPI, which will replace
|
|
Mojolicious::Plugin::Swagger2.
|
|
|
|
%prep
|
|
%setup -q -n %{cpan_name}-%{version}
|
|
|
|
%build
|
|
perl Makefile.PL INSTALLDIRS=vendor
|
|
make %{?_smp_mflags}
|
|
|
|
%check
|
|
# FIXME: Failed test 'http://127.0.0.1:44261/relative-to-the-root.json'
|
|
rm t/id-keyword-draft4.t
|
|
make test
|
|
|
|
%install
|
|
%perl_make_install
|
|
%perl_process_packlist
|
|
%perl_gen_filelist
|
|
|
|
%files -f %{name}.files
|
|
%defattr(-,root,root,755)
|
|
%doc Changes run-all-tests.sh
|
|
|
|
%changelog
|