%global bundle de.kalpatec.pojosr.framework Name: pojosr Version: 0.2.1 Release: 1%{?dist} Summary: Pojo Service Registry Group: Development/Libraries License: ASL 2.0 URL: https://code.google.com/p/pojosr/ # svn export http://pojosr.googlecode.com/svn/tags/de.kalpatec.pojosr.framework-0.2.1 pojosr-0.2.1 # tar czf pojosr-0.2.1-src-svn.tar.gz pojosr-0.2.1 Source0: %{name}-%{version}-src-svn.tar.gz BuildRequires: java-devel BuildRequires: sonatype-oss-parent BuildRequires: felix-framework BuildRequires: felix-osgi-compendium BuildRequires: felix-osgi-core BuildRequires: maven-local BuildRequires: maven-plugin-bundle Requires: felix-framework Requires: felix-osgi-compendium Requires: felix-osgi-core Requires: java BuildArch: noarch %description A service registry that enables OSGi style service registry programs without using an OSGi framework. %package javadoc Group: Documentation Summary: Javadoc for %{name} %description javadoc This package contains javadoc for %{name}. %prep %setup -q %pom_add_dep org.apache.felix:org.apache.felix.framework %pom_xpath_inject "pom:build/pom:plugins/pom:plugin[pom:artifactId='maven-compiler-plugin']" "any" %pom_xpath_remove "pom:build/pom:plugins/pom:plugin[pom:artifactId='maven-compiler-plugin']/pom:configuration/pom:target" %pom_xpath_inject "pom:build/pom:plugins/pom:plugin[pom:artifactId='maven-compiler-plugin']/pom:configuration" "1.5" %pom_xpath_remove "pom:build/pom:plugins/pom:plugin[pom:artifactId='maven-bundle-plugin']/pom:configuration/pom:instructions/pom:Include-Resource" # don't re-bundle system libraries %pom_xpath_remove "pom:build/pom:plugins/pom:plugin[pom:artifactId='maven-bundle-plugin']/pom:configuration/pom:instructions/pom:Private-Package" %pom_xpath_inject "pom:build/pom:plugins/pom:plugin[pom:artifactId='maven-bundle-plugin']/pom:configuration/pom:instructions" \ "de.kalpatec.pojosr.framework.*" %build mvn-rpmbuild package javadoc:aggregate %install mkdir -p %{buildroot}%{_javadir} install -m 644 target/%{bundle}-%{version}.jar \ %{buildroot}%{_javadir}/%{bundle}.jar ln -sf %{_javadir}/%{bundle}.jar %{buildroot}%{_javadir}/%{name}.jar mkdir -p %{buildroot}%{_mavenpomdir} install -pm 644 pom.xml %{buildroot}%{_mavenpomdir}/JPP-%{bundle}.pom %add_maven_depmap JPP-%{bundle}.pom %{bundle}.jar mkdir -p %{buildroot}%{_javadocdir}/%{name} cp -rp target/site/apidocs/* %{buildroot}%{_javadocdir}/%{name} %files %{_javadir}/%{bundle}.jar %{_javadir}/%{name}.jar %{_mavenpomdir}/JPP-%{bundle}.pom %{_mavendepmapfragdir}/%{name} %doc LICENSE NOTICE %files javadoc %{_javadocdir}/%{name} %doc LICENSE NOTICE %changelog * Mon Jun 03 2013 gil cattaneo 0.2.1-1 - 0.2.1 * Mon Oct 15 2012 gil cattaneo 0.1.8-1 - initial rpm