%global project felix %global bundle org.apache.felix.fileinstall Name: felix-fileinstall Version: 3.2.0 Release: 1%{?dist} Summary: File Install is a directory based OSGi management agent Group: Development/Libraries License: ASL 2.0 URL: http://felix.apache.org/site/apache-felix-file-install.html Source0: http://www.apache.org/dist/felix/%{bundle}-%{version}-project.tar.gz BuildRequires: felix-parent BuildRequires: java-devel BuildRequires: jpackage-utils BuildRequires: felix-configadmin BuildRequires: felix-osgi-compendium BuildRequires: felix-osgi-core BuildRequires: felix-utils BuildRequires: apache-rat-plugin BuildRequires: maven BuildRequires: maven-compiler-plugin BuildRequires: maven-install-plugin BuildRequires: maven-javadoc-plugin BuildRequires: maven-resources-plugin BuildRequires: maven-plugin-bundle BuildRequires: maven-surefire-provider-junit4 Requires: felix-configadmin Requires: felix-osgi-compendium Requires: felix-osgi-core Requires: felix-utils Requires: java Requires: jpackage-utils BuildArch: noarch %description A utility to automatically install bundles from a directory. %package javadoc Group: Documentation Summary: Javadoc for %{name} Requires: jpackage-utils %description javadoc This package contains javadoc for %{name}. %prep %setup -q -n %{bundle}-%{version} sed -i "s|org.codehaus.mojo|org.apache.rat|" pom.xml sed -i "s|rat-maven-plugin|apache-rat-plugin|" pom.xml sed -i "s|||" pom.xml sed -i "s|org.apache.felix.utils.manifest,||" pom.xml sed -i "s|org.apache.felix.utils.properties,||" pom.xml sed -i "s|org.apache.felix.utils.version,||" pom.xml %build mvn-rpmbuild -Dproject.build.sourceEncoding=UTF-8 install javadoc:aggregate %install mkdir -p %{buildroot}%{_javadir}/%{project} install -m 644 target/%{bundle}-%{version}.jar %{buildroot}%{_javadir}/%{project}/%{bundle}.jar mkdir -p %{buildroot}%{_mavenpomdir} install -pm 644 pom.xml %{buildroot}%{_mavenpomdir}/JPP.%{project}-%{bundle}.pom %add_maven_depmap JPP.%{project}-%{bundle}.pom %{project}/%{bundle}.jar mkdir -p %{buildroot}%{_javadocdir}/%{name} cp -pr target/site/api*/* %{buildroot}%{_javadocdir}/%{name} %files %{_javadir}/%{project}/%{bundle}.jar %{_mavenpomdir}/JPP.%{project}-%{bundle}.pom %{_mavendepmapfragdir}/%{name} %doc DEPENDENCIES LICENSE NOTICE %files javadoc %{_javadocdir}/%{name} %doc LICENSE NOTICE %changelog * Fri Sep 07 2012 gil cattaneo 3.2.0-1 - initial rpm