%global bundle org.osgi.core
Name: felix-osgi-core
Version: 1.4.0
Release: 7%{?dist}
Summary: Felix OSGi R4 Core Bundle
Group: Development/Libraries
License: ASL 2.0
URL: http://felix.apache.org/site/apache-felix-osgi-core.html
Source0: http://www.apache.org/dist/felix/%{bundle}-%{version}-project.tar.gz
BuildArch: noarch
BuildRequires: java-devel >= 1:1.6.0
BuildRequires: felix-parent
BuildRequires: maven-surefire-provider-junit4
BuildRequires: jpackage-utils
Requires: java >= 1:1.6.0
Requires(post): jpackage-utils
Requires(postun): jpackage-utils
%description
OSGi Service Platform Release 4 Core Interfaces and Classes.
%package javadoc
Group: Documentation
Summary: Javadoc for %{name}
Requires: jpackage-utils
%description javadoc
API documentation for %{name}.
%prep
%setup -q -n %{bundle}-%{version}
%build
mvn-rpmbuild package javadoc:aggregate
%install
# jars
install -d -m 0755 %{buildroot}%{_javadir}/felix
install -m 644 target/%{bundle}-%{version}.jar \
%{buildroot}%{_javadir}/felix/%{bundle}.jar
%add_to_maven_depmap org.apache.felix %{bundle} %{version} JPP/felix %{bundle}
# poms
install -d -m 755 %{buildroot}%{_mavenpomdir}
install -pm 644 pom.xml \
%{buildroot}%{_mavenpomdir}/JPP.felix-%{bundle}.pom
# javadoc
install -d -m 0755 %{buildroot}%{_javadocdir}/%{name}
%__cp -pr target/site/api*/* %{buildroot}%{_javadocdir}/%{name}/
%post
%update_maven_depmap
%postun
%update_maven_depmap
%files
%defattr(-,root,root,-)
%doc LICENSE
%{_javadir}/felix
%{_mavenpomdir}/JPP.felix-%{bundle}.pom
%{_mavendepmapfragdir}/%{name}
%files javadoc
%defattr(-,root,root,-)
%doc LICENSE
%{_javadocdir}/%{name}
%changelog
* Wed Mar 30 2011 Alexander Kurtakov <akurtako@redhat.com> 1.4.0-7
- Build with maven 3 and drop ant buil.xml files.
* Tue Feb 08 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.4.0-6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
* Wed Dec 15 2010 Stanislav Ochotnicky <sochotnicky@redhat.com> - 1.4.0-5
- Remove felix-parent from Requires to prevent pulling maven in
* Tue Dec 14 2010 Stanislav Ochotnicky <sochotnicky@redhat.com> - 1.4.0-4
- Add felix-parent to Requires (maven builds require this)
- Add license and jpackage-utils Requires to javadoc subpackage
- Use mavenpomdir macro
* Mon Dec 13 2010 Alexander Kurtakov <akurtako@redhat.com> 1.4.0-3
- Fix pom name.
- Adapt to current guidelines.
* Tue Jun 29 2010 Victor G. Vasilyev <victor.vasilyev@sun.com> 1.4.0-2
- Modify maven-build.xml to include MANIFEST.MF into JAR
* Tue Jun 22 2010 Victor G. Vasilyev <victor.vasilyev@sun.com> 1.4.0-1
- Update felix-osgi-core-1.4.0-build.xml.tar.gz
- Use the macros style
- Release 1.4.0
* Thu Sep 3 2009 Alexander Kurtakov <akurtako@redhat.com> 1.2.0-2
- Fix line length.
* Thu Sep 3 2009 Alexander Kurtakov <akurtako@redhat.com> 1.2.0-1
- Initial package.