File dtdparser.spec of Package dtdparser
#
# spec file for package dtdparser
#
# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany.
# Copyright (c) 2000-2007, JPackage Project
#
# 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: dtdparser
Version: 1.21
Release: 0
Summary: A Java DTD Parser
# The code has no license attribution.
# There is a LICENSE.INFO file, but it does not specify versions.
# The only versioning is in the ASL_LICENSE file, which has been edited by the upstream.
License: LGPL-2.1-or-later OR Apache-1.1
Group: Development/Libraries/Java
URL: http://wutka.com/%{name}.html
Source0: http://sourceforge.net/projects/%{name}/files/%{name}/%{version}/%{name}-%{version}.tgz
Source1: http://repo1.maven.org/maven2/com/wutka/%{name}/%{version}/%{name}-%{version}.pom
# Without removing these comments, build fails
Patch0: %{name}-unmappable-chars-in-comments.patch
BuildRequires: ant
BuildRequires: javapackages-local
BuildRequires: xmvn-install
BuildRequires: xmvn-resolve
BuildArch: noarch
%description
DTD parsers for Java seem to be pretty scarce. That's probably because
DTD isn't valid XML. At some point, if/when XML Schema becomes widely
accepted, no one will need DTD parsers anymore. Until then, you can
use this library to parse a DTD.
%package javadoc
Summary: Javadoc for %{name}
Group: Documentation/HTML
%description javadoc
This package contains API documentation for %{name}.
%prep
%setup -q
find -name \*.jar -delete -o -name \*.class -delete
echo com.wutka.dtd > doc/package-list
sed -i "s,59 Temple Place,51 Franklin Street,;s,Suite 330,Fifth Floor,;s,02111-1307,02110-1301," LICENSE
%patch -P 0
%build
ant build createdoc
%install
%{mvn_artifact} %{SOURCE1} dist/%{name}120.jar
%mvn_install -J doc
%files -f .mfiles
%doc CHANGES README
%license LICENSE ASL_LICENSE
%files javadoc -f .mfiles-javadoc
%license LICENSE ASL_LICENSE
%changelog