File geronimo-osgi-support.spec of Package geronimo-osgi-support
#
# spec file for package geronimo-osgi-support
#
# 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 https://bugs.opensuse.org/
#
%global registry geronimo-osgi-registry
%global locator geronimo-osgi-locator
Name: geronimo-osgi-support
Version: 1.0
Release: 0
Summary: OSGI spec bundle support
License: Apache-2.0 AND W3C
Group: Development/Libraries/Java
URL: https://geronimo.apache.org/
Source0: https://repo1.maven.org/maven2/org/apache/geronimo/specs/%{name}/%{version}/%{name}-%{version}-source-release.tar.gz
BuildRequires: fdupes
BuildRequires: java-devel >= 1.8
BuildRequires: maven-local
BuildRequires: mvn(org.apache.felix:maven-bundle-plugin)
BuildRequires: mvn(org.apache.geronimo.specs:specs:pom:)
BuildRequires: mvn(org.osgi:osgi.cmpn)
BuildRequires: mvn(org.osgi:osgi.core)
#!BuildIgnore: geronimo-specs-pom
#!BuildIgnore: geronimo-specs-poms
BuildArch: noarch
%description
This project is a set of bundles and integration tests for implementing
OSGi-specific lookup in the Geronimo spec projects.
%package javadoc
Summary: Javadoc for %{name}
Group: Development/Libraries/Java
%description javadoc
This package contains the API documentation for %{name}.
%prep
%setup -q
iconv -f iso8859-1 -t utf-8 LICENSE > LICENSE.conv && mv -f LICENSE.conv LICENSE
sed -i 's/\r//' LICENSE NOTICE
# Use parent pom files instead of unavailable 'genesis-java5-flava'
%pom_set_parent org.apache.geronimo.specs:specs:1.4
# Use latest OSGi implementation
%pom_change_dep -r :org.osgi.core org.osgi:osgi.core
%pom_change_dep -r :org.osgi.compendium org.osgi:osgi.cmpn
# Remove itests due to unavailable dependencies
%pom_disable_module geronimo-osgi-itesta
%pom_disable_module geronimo-osgi-itestb
%pom_disable_module geronimo-osgi-registry-itests
%pom_disable_module geronimo-osgi-locator-itests
%pom_xpath_inject "pom:plugin[pom:artifactId[text()='maven-bundle-plugin']]
/pom:configuration/pom:instructions" "
<Export-Package>!*</Export-Package>" geronimo-osgi-locator
# preserve compatibility locations for jars
%{mvn_file} ':{*}' @1
%build
%{mvn_build} -f -- -Dsource=8
%install
%mvn_install
%fdupes -s %{buildroot}%{_javadocdir}
%files -f .mfiles
%license LICENSE NOTICE
%files javadoc -f .mfiles-javadoc
%license LICENSE NOTICE
%changelog