2011-08-25 16:50:08 +00:00
|
|
|
#
|
|
|
|
# spec file for package perl-XML-DTDParser
|
|
|
|
#
|
2024-08-06 20:34:38 +00:00
|
|
|
# Copyright (c) 2024 SUSE LLC
|
|
|
|
#
|
2011-08-25 16:50:08 +00:00
|
|
|
# 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.
|
|
|
|
|
2024-08-06 20:34:38 +00:00
|
|
|
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
|
|
|
#
|
|
|
|
|
|
|
|
|
|
|
|
%define cpan_name XML-DTDParser
|
2011-08-25 16:50:08 +00:00
|
|
|
Name: perl-XML-DTDParser
|
2024-08-06 20:34:38 +00:00
|
|
|
Version: 2.10.0
|
|
|
|
Release: 0
|
|
|
|
# 2.01 -> normalize -> 2.10.0
|
|
|
|
%define cpan_version 2.01
|
|
|
|
License: Artistic-1.0 OR GPL-1.0-or-later
|
2011-08-25 16:50:08 +00:00
|
|
|
Summary: Quick and dirty DTD parser
|
2024-08-06 20:34:38 +00:00
|
|
|
URL: https://metacpan.org/release/%{cpan_name}
|
|
|
|
Source0: https://cpan.metacpan.org/authors/id/J/JE/JENDA/%{cpan_name}-%{cpan_version}.tar.gz
|
|
|
|
Source1: cpanspec.yml
|
2025-08-12 18:18:34 +02:00
|
|
|
Source100: README.md
|
2024-08-06 20:34:38 +00:00
|
|
|
BuildArch: noarch
|
2011-08-25 16:50:08 +00:00
|
|
|
BuildRequires: perl
|
|
|
|
BuildRequires: perl-macros
|
2024-08-06 20:34:38 +00:00
|
|
|
Provides: perl(XML::DTDParser) = %{version}
|
|
|
|
%undefine __perllib_provides
|
2011-08-25 16:50:08 +00:00
|
|
|
%{perl_requires}
|
|
|
|
|
|
|
|
%description
|
|
|
|
This module parses a DTD file and creates a data structure containing info
|
|
|
|
about all tags, their allowed parameters, children, parents, optionality
|
|
|
|
etc. etc. etc.
|
|
|
|
|
|
|
|
Since I'm too lazy to document the structure, parse a DTD you need and
|
|
|
|
print the result to a file using Data::Dumper. The datastructure should be
|
|
|
|
selfevident.
|
|
|
|
|
|
|
|
Note: The module should be able to parse just about anything, but it
|
|
|
|
intentionaly looses some information. Eg. if the DTD specifies that a tag
|
|
|
|
should contain either CHILD1 or CHILD2 you only get that CHILD1 and CHILD2
|
|
|
|
are optional. That is is the DTD contains <!ELEMENT FOO (BAR|BAZ)> the
|
|
|
|
result will be the same is if it contained <!ELEMENT FOO (BAR?,BAZ?)>
|
|
|
|
|
|
|
|
%prep
|
2024-08-06 20:34:38 +00:00
|
|
|
%autosetup -n %{cpan_name}-%{cpan_version}
|
2011-08-25 16:50:08 +00:00
|
|
|
|
|
|
|
%build
|
2024-08-06 20:34:38 +00:00
|
|
|
perl Makefile.PL INSTALLDIRS=vendor
|
|
|
|
%make_build
|
2011-08-25 16:50:08 +00:00
|
|
|
|
|
|
|
%check
|
2024-08-06 20:34:38 +00:00
|
|
|
make test
|
2011-08-25 16:50:08 +00:00
|
|
|
|
|
|
|
%install
|
|
|
|
%perl_make_install
|
|
|
|
%perl_process_packlist
|
|
|
|
%perl_gen_filelist
|
|
|
|
|
|
|
|
%files -f %{name}.files
|
|
|
|
%doc Changes README
|
|
|
|
|
|
|
|
%changelog
|