%global bundle org.apache.felix.gogo.shell Name: felix-gogo-shell Version: 0.6.1 Release: %mkrel 1 Summary: Apache Felix Gogo Shell Group: Development/Java License: ASL 2.0 Url: http://felix.apache.org/ Source0: http://www.apache.org/dist/felix/%{bundle}-0.6.1-project.tar.gz #Source1: ... #Patch0: ... BuildRequires: felix-gogo-parent BuildRequires: java-devel BuildRequires: jpackage-utils BuildRequires: felix-gogo-runtime BuildRequires: felix-osgi-compendium BuildRequires: felix-osgi-core BuildRequires: apache-rat-plugin BuildRequires: maven-compiler-plugin BuildRequires: maven-plugin-bundle BuildRequires: maven-surefire-provider-junit4 Requires: felix-gogo-runtime Requires: felix-osgi-compendium Requires: felix-osgi-core Requires: jpackage-utils Requires(post): jpackage-utils Requires(postun): jpackage-utils Requires: java BuildArch: noarch %description Apache Felix Gogo Shell. %package javadoc Summary: Javadoc for %{name} Group: Development/Java Requires: jpackage-utils %description javadoc API documentation for %{name}. %prep %setup -q -n %{bundle}-%{version} sed -i "s|<groupId>org.osgi</groupId>|<groupId>org.apache.felix</groupId>|" pom.xml sed -i "s|<version>4.0.0</version>|<version>1.4.0</version>|" pom.xml sed -i "s|<version>4.2.0</version>|<version>1.4.0</version>|" pom.xml sed -i "s|<Include-Resource>{maven-resources},META-INF/LICENSE=LICENSE,META-INF/NOTICE=NOTICE,META-INF/DEPENDENCIES=DEPENDENCIES</Include-Resource>|<Include-Resource>{maven-resources},META-INF/DEPENDENCIES=DEPENDENCIES</Include-Resource>|" pom.xml sed -i "s|<groupId>org.codehaus.mojo</groupId>|<groupId>org.apache.rat</groupId>|" pom.xml sed -i "s|<artifactId>rat-maven-plugin</artifactId>|<artifactId>apache-rat-plugin</artifactId>|" pom.xml %build mvn-rpmbuild -e install javadoc:aggregate %install [ %{buildroot} != / ] && rm -rf %{buildroot} install -d -m 0755 %{buildroot}%{_javadir}/felix install -m 644 target/%{bundle}-%{version}.jar \ %{buildroot}%{_javadir}/felix/%{bundle}.jar install -d -m 755 %{buildroot}%{_mavenpomdir} install -pm 644 pom.xml %{buildroot}%{_mavenpomdir}/JPP.felix-%{bundle}.pom %add_maven_depmap JPP.felix-%{bundle}.pom felix/%{bundle}.jar install -d -m 0755 %{buildroot}%{_javadocdir}/%{name} cp -pr target/site/api*/* %{buildroot}%{_javadocdir}/%{name}/ %post %update_maven_depmap %postun %update_maven_depmap %files %{_javadir}/felix/%{bundle}.jar %{_mavenpomdir}/* %{_mavendepmapfragdir}/* %doc LICENSE NOTICE doc/* %files javadoc %{_javadocdir}/%{name} %changelog * Tue Nov 01 2011 gil <gil> 0.6.1-1.mga2 + Revision: 160940 - edit spec file - imported package felix-gogo-shell