Name: geronimo-osgi-support Version: 1.1 Release: 1%{?dist} Summary: Apache Geronimo OSGI spec bundle support Group: Development/Libraries License: ASL 2.0 URL: http://geronimo.apache.org/ Source0: http://repo2.maven.org/maven2/org/apache/geronimo/specs/%{name}/%{version}/%{name}-%{version}-source-release.tar.gz BuildRequires: java-devel BuildRequires: jpackage-utils BuildRequires: felix-osgi-core BuildRequires: felix-osgi-compendium # test deps BuildRequires: junit %if 0 # geronimo-osgi-registry-itests test deps BuildRequires: felix-configadmin BuildRequires: pax-logging BuildRequires: mvn(org.ops4j.pax.exam:pax-exam) BuildRequires: mvn(org.ops4j.pax.exam:pax-exam-junit) BuildRequires: mvn(org.ops4j.pax.exam:pax-exam-container-default) BuildRequires: mvn(org.ops4j.pax.exam:pax-exam-junit-extender-impl) BuildRequires: mvn(org.ops4j.pax.swissbox:pax-swissbox-tinybundles) %endif BuildRequires: maven BuildRequires: maven-compiler-plugin BuildRequires: maven-javadoc-plugin BuildRequires: maven-plugin-bundle BuildRequires: maven-remote-resources-plugin BuildRequires: maven-resources-plugin BuildRequires: maven-surefire-plugin BuildRequires: maven-surefire-provider-junit4 Requires: felix-osgi-core Requires: felix-osgi-compendium Requires: java Requires: jpackage-utils BuildArch: noarch %description This project is a set of bundles and integration tests for implementing OSGi-specific look up in the Geronimo spec projects. %package javadoc Group: Documentation Summary: Javadoc for %{name} Requires: jpackage-utils %description javadoc This package contains javadoc for %{name}. %prep %setup -q %pom_remove_parent %pom_xpath_inject "pom:project" " org.apache.geronimo.specs specs 1.4 ../pom.xml " # unavailable test deps %pom_disable_module geronimo-osgi-registry-itests # disable embedded system library copy %pom_remove_plugin org.apache.felix:maven-bundle-plugin geronimo-osgi-locator %pom_xpath_inject "pom:build/pom:plugins" ' org.apache.felix maven-bundle-plugin * org.apache.geronimo.osgi.locator;version=1.1 org.apache.geronimo.osgi.locator ${project.groupId}.${project.artifactId};singleton=true ' geronimo-osgi-locator sed -i 's|${artifactId}|${project.artifactId}|' $(find -name "pom.xml") sed -i 's|${groupId}|${project.groupId}|' $(find -name "pom.xml") sed -i 's|${version}|${project.version}|' $(find -name "pom.xml") sed -i 's/\r//' LICENSE NOTICE %build mvn-rpmbuild \ -Dproject.build.sourceEncoding=UTF-8 \ package javadoc:aggregate %install mkdir -p %{buildroot}%{_mavenpomdir} install -pm 644 pom.xml %{buildroot}%{_mavenpomdir}/JPP.%{name}-%{name}.pom %add_maven_depmap JPP.%{name}-%{name}.pom # registry-itests mkdir -p %{buildroot}%{_javadir}/%{name} for m in itesta \ itestb \ locator \ locator-itests \ registry; do install -m 644 geronimo-osgi-${m}/target/geronimo-osgi-${m}-%{version}.jar \ %{buildroot}%{_javadir}/%{name}/geronimo-osgi-${m}.jar install -pm 644 geronimo-osgi-${m}/pom.xml %{buildroot}%{_mavenpomdir}/JPP.%{name}-geronimo-osgi-${m}.pom %add_maven_depmap JPP.%{name}-geronimo-osgi-${m}.pom %{name}/geronimo-osgi-${m}.jar done mkdir -p %{buildroot}%{_javadocdir}/%{name} cp -rp target/site/apidocs/* %{buildroot}%{_javadocdir}/%{name} %files %dir %{_javadir}/%{name} %{_javadir}/%{name}/geronimo-osgi-*.jar %{_mavenpomdir}/JPP.%{name}-geronimo-osgi-*.pom %{_mavenpomdir}/JPP.%{name}-%{name}.pom %{_mavendepmapfragdir}/%{name} %doc LICENSE NOTICE %files javadoc %{_javadocdir}/%{name} %doc LICENSE NOTICE %changelog * Sun Nov 18 2012 gil cattaneo 1.1-1 - initial rpm