File jdo2-api.spec of Package jdo2-api

#
# spec file for package jdo2-api
#
# 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/
#


Name:           jdo2-api
Version:        2.2
Release:        0
Summary:        Implementation of JSR 243: Java Data Objects 2.0
License:        Apache-2.0
Group:          Development/Libraries/Java
URL:            https://db.apache.org/jdo/
Source0:        http://svn.apache.org/repos/asf/db/jdo/tags/%{version}/dist/db/jdo/%{version}/%{name}-%{version}-src.tar.gz
Source1:        https://repo1.maven.org/maven2/javax/jdo/%{name}/%{version}/%{name}-%{version}.pom
BuildRequires:  ant
BuildRequires:  fdupes
BuildRequires:  maven-local
BuildRequires:  mvn(javax.transaction:transaction-api)
BuildRequires:  mvn(org.apache.geronimo.specs:geronimo-jpa_3.0_spec)
BuildRequires:  mvn(org.glassfish.corba:glassfish-corba-omgapi)
BuildArch:      noarch

%description
The Java Data Objects 2 (JDO) API is a standard interface-based
Java model abstraction of persistence, developed as Java Specification
Request 243 under the auspices of the Java Community Process.

%package javadoc
Summary:        API documentation for %{name}
Group:          Documentation/HTML

%description javadoc
This package contains javadoc for %{name}.

%prep
%setup -q -c
cd %{name}-%{version}
cp -p %{SOURCE1} pom.xml

# allow use of javax.rmi.PortableRemoteObject past java 10
%pom_add_dep org.glassfish.corba:glassfish-corba-omgapi:4.2.4

%pom_remove_dep :junit
%pom_remove_dep org.apache.ant:ant

%{mvn_file} : %{name}

%build
pushd %{name}-%{version}
%{mvn_build} -f -- -DcurrentVersion=%{version} \
%if %{?pkg_vcmp:%pkg_vcmp java-devel >= 9}%{!?pkg_vcmp:0}
    -Dmaven.compiler.release=8 \
%endif
    -Dsource=1.8
popd

%install
pushd %{name}-%{version}
%mvn_install
popd
%fdupes -s %{buildroot}%{_javadocdir}

%files -f %{name}-%{version}/.mfiles
%license LICENSE.txt NOTICE.txt

%files javadoc -f %{name}-%{version}/.mfiles-javadoc
%license LICENSE.txt NOTICE.txt

%changelog
openSUSE Build Service is sponsored by