File jfreechart.spec of Package jfreechart

# spec file for package jfreechart
# Copyright (c) 2020 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

Name:           jfreechart
Version:        1.0.19
Release:        0
Summary:        Java chart library
License:        LGPL-2.1-or-later
Patch0:         build_swt_encoding_fix.patch
BuildRequires:  ant
BuildRequires:  fdupes
BuildRequires:  maven-local
BuildRequires:  unzip
BuildRequires:  mvn(javax.servlet:javax.servlet-api) >= 2.5
BuildRequires:  mvn(org.apache.felix:maven-bundle-plugin)
BuildRequires:  mvn(org.jfree:jcommon) >= 1.0.23
BuildRequires:  mvn(org.sonatype.oss:oss-parent:pom:)
BuildArch:      noarch

JFreeChart is a free 100% Java chart library that makes it easy for
developers to display professional quality charts in their applications.

%package javadoc
Summary:        Javadocs for %{name}
Requires:       %{name} = %{version}-%{release}
Requires:       jpackage-utils

%description javadoc
This package contains the API documentation for %{name}.

%setup -q
# Erase prebuilt files
find \( -name '*.jar' -o -name '*.class' \) -exec rm -f '{}' \;
%patch0 -p2

            <Bundle-Vendor>Fedora Project</Bundle-Vendor>
            <!-- Do not autogenerate uses clauses in Manifests -->
%pom_remove_plugin :maven-gpg-plugin
%pom_remove_plugin :nexus-staging-maven-plugin
%pom_remove_plugin :cobertura-maven-plugin
%pom_remove_plugin :maven-site-plugin
%pom_remove_plugin :animal-sniffer-maven-plugin
%pom_remove_plugin :maven-jxr-plugin
%pom_remove_plugin :maven-javadoc-plugin
%pom_change_dep javax.servlet:servlet-api: javax.servlet:javax.servlet-api:

%pom_add_plugin org.apache.felix:maven-bundle-plugin . "$MVN_BUNDLE_PLUGIN_EXTRA_XML"
# Change to packaging type bundle so as to be able to use it
# as an OSGi bundle.
%pom_xpath_set "pom:packaging" "bundle"

rm -rf source/org/jfree/chart/fx

%{mvn_build} -f  -- \
%if %{?pkg_vcmp:%pkg_vcmp java-devel >= 9}%{!?pkg_vcmp:0}
	-Dmaven.compiler.release=8 \

%fdupes -s %{buildroot}%{_javadocdir}

%files -f .mfiles
%doc ChangeLog NEWS README.txt

%files javadoc -f .mfiles-javadoc

openSUSE Build Service is sponsored by