%bcond_with bootstrap
Name: osgi-core
Version: 8.0.0
Release: %autorelease
Summary: OSGi Core API
License: Apache-2.0
URL: https://www.osgi.org
BuildArch: noarch
ExclusiveArch: %{java_arches} noarch
Source0: https://docs.osgi.org/download/r8/osgi.core-%{version}.jar
%if %{with bootstrap}
BuildRequires: javapackages-bootstrap
%else
BuildRequires: maven-local
BuildRequires: mvn(org.apache.felix:maven-bundle-plugin)
BuildRequires: mvn(org.osgi:osgi.annotation)
%endif
%description
OSGi Core, Interfaces and Classes for use in compiling bundles.
%package javadoc
Summary: API documentation for %{name}
%description javadoc
This package provides %{summary}.
%prep
%autosetup -p1 -C
# Delete pre-built binaries
rm -r org
find -name '*.class' -delete
mkdir -p src/main/{java,resources}
mv OSGI-OPT/src/org src/main/java/
mv META-INF/maven/org.osgi/osgi.core/pom.xml .
%pom_xpath_inject pom:project '
bundle
UTF-8
org.apache.felix
maven-bundle-plugin
true
${project.artifactId}
${project.artifactId}
'
%pom_add_dep org.osgi:osgi.annotation::provided
%mvn_alias : org.osgi:org.osgi.core
%build
%mvn_build -- -Dmaven.compiler.source=1.8 -Dmaven.compiler.target=1.8
%install
%mvn_install
%files -f .mfiles
%license LICENSE
%doc about.html
%files javadoc -f .mfiles-javadoc
%license LICENSE
%changelog
%autochangelog