Blob Blame History Raw
%global bundle  org.apache.felix.scr

Name:          felix-scr
Version:       2.0.12
Release:       1%{?dist}
Summary:       Apache Felix Service Component Runtime (SCR)
License:       ASL 2.0
URL:           http://felix.apache.org/documentation/subprojects/apache-felix-service-component-runtime.html

Source0:       http://www.apache.org/dist/felix/%{bundle}-%{version}-source-release.tar.gz

# Don't embed deps, use import-package instead
Patch0:        osgi-metadata.patch

BuildArch:     noarch

BuildRequires:  maven-local
BuildRequires:  mvn(net.sf.kxml:kxml2)
BuildRequires:  mvn(org.apache.felix:felix-parent:pom:)
BuildRequires:  mvn(org.apache.felix:maven-bundle-plugin)
BuildRequires:  mvn(org.apache.felix:org.apache.felix.gogo.runtime)
BuildRequires:  mvn(org.apache.felix:org.apache.felix.shell)
BuildRequires:  mvn(org.apache.felix:org.apache.felix.utils)
BuildRequires:  mvn(org.apache.maven.plugins:maven-failsafe-plugin)
BuildRequires:  mvn(org.osgi:osgi.annotation)
BuildRequires:  mvn(org.osgi:osgi.cmpn)
BuildRequires:  mvn(org.osgi:osgi.core)
BuildRequires:  mvn(xpp3:xpp3)


%description
Implementation of the OSGi Declarative Services Specification Version 1.3 (R6).

%package javadoc
Summary:       Javadoc for %{name}

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

%prep
%setup -q -n %{bundle}-%{version}
%patch0

# All these OSGi deps are provided in the compendium jar
%pom_add_dep org.osgi:osgi.cmpn:6.0.0:provided
%pom_remove_dep org.osgi:org.osgi.service.component
%pom_remove_dep org.osgi:org.osgi.service.cm
%pom_remove_dep org.osgi:org.osgi.namespace.extender
%pom_remove_dep org.osgi:osgi.promise

# Many test deps are not in Fedora
%pom_xpath_remove "pom:project/pom:dependencies/pom:dependency[pom:scope='test']"
%pom_remove_dep org.ops4j.base:

# Animal sniffer is unnecessary since we always know JRE level on Fedora
%pom_remove_dep :animal-sniffer-annotations
sed -i -e '/IgnoreJRERequirement/d' src/main/java/org/apache/felix/scr/impl/manager/ThreadDump.java

# Upstream kxml bundles xpp3. Since RHBZ#1299774 kxml no longer
# bundles xpp3 packages. Add the dep to the pom. kxml requires xpp3
# already.
%pom_add_dep xpp3:xpp3:1.1.4c:compile
# And since we are not bundling kxml, need to make it 'compile' scope
# instead of 'provided' scope so it's pulled in by RPM requires
%pom_change_dep net.sf.kxml:kxml2 net.sf.kxml:kxml2:2.2.2:compile

%mvn_file : felix/%{bundle}

%build
# No test deps availables e.g org.ops4j.pax.url:pax-url-wrap
%mvn_build -f

%install
%mvn_install

%files -f .mfiles
%doc changelog.txt
%license LICENSE NOTICE

%files javadoc -f .mfiles-javadoc
%license LICENSE NOTICE

%changelog
* Wed Jun 21 2017 Roland Grunberg <rgrunber@redhat.com> - 2.0.12-1
- Update to latest upstream release.
- Resolves rhbz#1455048.

* Fri Jun 16 2017 Mat Booth <mat.booth@redhat.com> - 2.0.10-2
- Remove SCL macros forbidden in Fedora
- Avoid bundling org.osgi classes

* Tue May 16 2017 Mat Booth <mat.booth@redhat.com> - 2.0.10-1
- Update to latest upstream release

* Fri Feb 10 2017 Fedora Release Engineering <releng@fedoraproject.org> - 2.0.8-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild

* Thu Feb 02 2017 Mat Booth <mat.booth@redhat.com> - 2.0.8-1
- Update to latest upstream release
- Regenerate BRs and ensure there is an R on kxml
- Actually use license macro

* Thu Feb 04 2016 Severin Gehwolf <sgehwolf@redhat.com> - 1.6.2-6
- Add dep on xpp3 since it's now unbundled from kxml2. See RHBZ#1299774.

* Wed Feb 03 2016 Fedora Release Engineering <releng@fedoraproject.org> - 1.6.2-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild

* Thu Sep 10 2015 jkang@redhat.com - 1.6.2-4
- SCL-ize package

* Wed Jul 08 2015 jkang@redhat.com - 1.6.2-3
- Added LICENSE and NOTICE files

* Wed Jun 17 2015 Jie Kang <jkang@redhat.com> - 1.6.2-2
- Changed to vcs source as tarball no longer available

* Sun Oct 06 2013 gil cattaneo <puntogil@libero.it> 1.6.2-1
- initial rpm