#
# spec file for package perl-HTML-Selector-XPath
#
# 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 HTML-Selector-XPath
Name:           perl-HTML-Selector-XPath
Version:        0.280.0
Release:        1.2
%define cpan_version 0.28
License:        Artistic-1.0 OR GPL-1.0-or-later
Summary:        CSS Selector to XPath compiler
URL:            https://metacpan.org/release/%{cpan_name}
Source0:        https://cpan.metacpan.org/authors/id/C/CO/CORION/%{cpan_name}-%{cpan_version}.tar.gz
Source1:        cpanspec.yml
BuildArch:      noarch
BuildRequires:  perl
BuildRequires:  perl-macros
BuildRequires:  perl(Test::Base)
Provides:       perl(HTML::Selector::XPath) = 0.280.0
%define         __perllib_provides /bin/true
%{perl_requires}

%description
HTML::Selector::XPath is a utility function to compile full set of CSS2 and
partial CSS3 selectors to the equivalent XPath expression.

%prep
%autosetup  -n %{cpan_name}-%{cpan_version}

%build
PERL_USE_UNSAFE_INC=1 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

%changelog
* Tue Aug  8 2023 Tina Müller <timueller+perl@suse.de>
- updated to 0.28
  see /usr/share/doc/packages/perl-HTML-Selector-XPath/Changes
* Thu Dec 16 2021 Tina Müller <timueller+perl@suse.de>
- updated to 0.26
  see /usr/share/doc/packages/perl-HTML-Selector-XPath/Changes
* Tue Sep 14 2021 Dirk Stoecker <opensuse@dstoecker.de>
- refresh spec file
* Thu Nov  8 2018 Stephan Kulow <coolo@suse.com>
- updated to 0.25
  see /usr/share/doc/packages/perl-HTML-Selector-XPath/Changes
* Sun Oct  7 2018 Dirk Stoecker <opensuse@dstoecker.de>
- Fix build
* Wed Feb  7 2018 coolo@suse.com
- updated to 0.23
  see /usr/share/doc/packages/perl-HTML-Selector-XPath/Changes
* Mon May 23 2016 coolo@suse.com
- updated to 0.20
  see /usr/share/doc/packages/perl-HTML-Selector-XPath/Changes
* Tue Apr 14 2015 coolo@suse.com
- updated to 0.18
  see /usr/share/doc/packages/perl-HTML-Selector-XPath/Changes
  0.18 NEXT
  - Fix bug in `:not(...)[attr] (Aaron Crane)
  - Support `:nth-child(odd)` and `:nth-child(even)` (Aaron Crane)
  - Translation of `[attr$=tail]` works with XPath 1.0 (Aaron Crane)
  0.17 Sat Aug 30 16:12:52 GMT+2 2014
  - Support unicode characters for id and class selectors (aereal)
  - Normalize space characters of the class attribute (hitode909)
  0.16 Sat Aug 10 17:52:00 GMT 2013
  - Added link to repository (D. Steinbrunner)
  0.15 Mon Oct  1 19:14:05 GMT 2012
  - Fix bugs in :contains("string") (Aaron Crane)
  0.14 Mon Jan 16 22:00:00 GMT 2012
  - Also allow single quotes in attribute expressions,
    as seems to be allowed
    per http://www.w3.org/TR/CSS2/syndata.html
  0.13 Sun Jan 15 18:52:00 GMT 2012
  - Added C<prefix> option to add a prefix like C<xhtml>,
    contributed by Toby Inkster
    This closes RT #73719
  0.12 Thu Nov 24 22:13:00 GMT 2011
  - Add tests and fix negated selectors as reported
    by Nilson Santos Figueiredo Junior
  0.11 Sun Oct 23 21:45:00 GMT 2011
  - Add test to MANIFEST so it also ships
  0.10 Sun Oct 23 21:10:53 GMT 2011
  - Identifiers are now parsed closer to the CSS3 spec
  - Certain invalid attribute selectors now raise an exception
  0.09 Sun Oct 16 13:07:09 GMT 2011
  - Fix bug in attribute-value-substring selectors where
    the CSS attributes were wrongly assumed to be
    specified with @href (Aaron Crane)
  - Make test suite less verbose (Aaron Crane)
  0.08 Sun Sep 18 12:31:31 PDT 2011
  - Fix bug when combining selectors (p , q). Whitespace created invalid
    XPath expressions there. (Corion)
  - Fix bug when combining :root selectors as the second selector.
    The first selector was modified. (Corion)
  - :root now acts relative to the given "root" option,
    not the document root (Corion)
  - More css3 selectors support (Corion)
* Tue Apr 14 2015 coolo@suse.com
- updated to 0.11
  see /usr/share/doc/packages/perl-HTML-Selector-XPath/Changes
  0.11 Sun Oct 23 21:45:00 GMT 2011
  - Add test to MANIFEST so it also ships
  0.10 Sun Oct 23 21:10:53 GMT 2011
  - Identifiers are now parsed closer to the CSS3 spec
  - Certain invalid attribute selectors now raise an exception
  0.09 Sun Oct 16 13:07:09 GMT 2011
  - Fix bug in attribute-value-substring selectors where
    the CSS attributes were wrongly assumed to be
    specified with @href (Aaron Crane)
  - Make test suite less verbose (Aaron Crane)
  0.08 Sun Sep 18 12:31:31 PDT 2011
  - Fix bug when combining selectors (p , q). Whitespace created invalid
    XPath expressions there. (Corion)
  - Fix bug when combining :root selectors as the second selector.
    The first selector was modified. (Corion)
  - :root now acts relative to the given "root" option,
    not the document root (Corion)
  - More css3 selectors support (Corion)
* Fri Apr 22 2011 coolo@opensuse.org
- updated to 0.07
  - Added a COPYRIGHT section
  - Add CSS3 "=$" operator (Corion)
  - Add CSS3 "=^" operator (Corion)
  - Add complex subexpressions for :not() (Corion)
  - Add :empty selector (Corion)
  - Support 'root' parameters to to_xpath (JZOBEL, David Wheeler, Corion)
  - Add CSS3 "=*" operator for real substring matching (Corion)
  - Add CSS3 ":first-of-type" and ":nth-of-type()" pseudo-attributes (Corion)
    (but if you're using them, you're likely better off using XPath already)
  - Add CSS3 "~" operator (Corion)
  - Adopt tests for "~" operator from RT #61990, by Aaron Crane (Corion)
  - Add :contains() selector (only immediate child nodes) (Corion)
  - Support implicit selectors like "> em" (translated to "* > em") (Corion)
    Fixes RT #50131 (Reported by David Wheeler)
  - Fix more implicit universal selectors (fixes RT #49982)
    :lang(c) as a bare selector works now (Corion, Aaron Crane)
* Sat Dec 25 2010 pascal.bleser@opensuse.org
- initial package (0.04)