File glassfish-dtd-parser.spec of Package glassfish-dtd-parser
#
# spec file for package glassfish-dtd-parser
#
# 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/
#
# The automatic requires would be java-headless >= 9, but the
# binaries are java 8 compatible
%define __requires_exclude java-headless
Name: glassfish-dtd-parser
Version: 1.4
Release: 0
Summary: Library for parsing XML DTDs
License: CDDL-1.1 AND GPL-2.0-only WITH Classpath-exception-2.0
Group: Development/Libraries/Java
URL: http://java.net/projects/dtd-parser
Source0: https://github.com/javaee/jaxb-dtd-parser/archive/%{version}.tar.gz
Patch0: %{name}-sourcetarget.patch
BuildRequires: fdupes
BuildRequires: java-devel >= 9
BuildRequires: maven-local
BuildRequires: mvn(net.java:jvnet-parent:pom:)
Requires: java-headless >= 1.8
BuildArch: noarch
%description
Library for parsing XML DTDs.
%package javadoc
Summary: Javadoc for %{name}
Group: Documentation/HTML
%description javadoc
This package contains javadoc for %{name}.
%prep
%setup -q -n jaxb-dtd-parser-%{version}
%patch -P 0 -p1
%build
pushd dtd-parser
%{mvn_file} :dtd-parser %{name}
%{mvn_build} -f -- -Dsource=8
popd
%install
pushd dtd-parser
%mvn_install
%fdupes -s %{buildroot}%{_javadocdir}
popd
%files -f dtd-parser/.mfiles
%license dtd-parser/LICENSE.txt
%files javadoc -f dtd-parser/.mfiles-javadoc
%license dtd-parser/LICENSE.txt
%changelog