# Prevent brp-java-repack-jars from being run. %define __jar_repack %{nil} %global project felix %global bundle org.apache.felix.main %global groupId org.apache.felix %global artifactId %{bundle} Name: %{project}-main Version: 2.0.5 Release: 5%{?dist} Summary: Apache Felix Main Group: Development/Libraries License: ASL 2.0 URL: http://felix.apache.org Source0: http://www.apache.org/dist/felix/%{bundle}-%{version}-project.tar.gz # TODO check availability and use original artifacts: # - org.apache.felix.shell https://bugzilla.redhat.com/show_bug.cgi?id=615869 Patch0: %{bundle}-%{version}~pom.xml.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildArch: noarch BuildRequires: java-devel >= 1:1.6.0 BuildRequires: jpackage-utils BuildRequires: felix-parent BuildRequires: felix-osgi-compendium BuildRequires: felix-osgi-core BuildRequires: felix-framework BuildRequires: maven2 BuildRequires: maven-antrun-plugin BuildRequires: maven-compiler-plugin BuildRequires: maven-dependency-plugin BuildRequires: maven-install-plugin BuildRequires: maven-invoker-plugin BuildRequires: maven-jar-plugin BuildRequires: maven-javadoc-plugin BuildRequires: maven-release-plugin BuildRequires: maven-resources-plugin # TODO check availability and use new names #BuildRequires: maven-surefire-plugin #BuildRequires: maven-bundle-plugin # instead of BuildRequires: maven-plugin-bundle BuildRequires: maven-surefire-maven-plugin Requires: felix-osgi-compendium Requires: felix-osgi-core Requires: felix-framework Requires: java >= 1:1.6.0 Requires(post): jpackage-utils Requires(postun): jpackage-utils %description Apache Felix Main Classes. %package javadoc Group: Documentation Summary: Javadoc for %{name} Requires: jpackage-utils %description javadoc API documentation for %{name}. %global POM %{_mavenpomdir}/JPP.%{project}-%{name}.pom %prep %setup -q -n %{bundle}-%{version} %patch0 -p1 -b .sav %build export MAVEN_REPO_LOCAL=$(pwd)/.m2/repository %__mkdir_p $MAVEN_REPO_LOCAL mvn-jpp -e \ -Dmaven.repo.local=$MAVEN_REPO_LOCAL \ install javadoc:javadoc %install %__rm -rf %{buildroot} # jars install -d -m 0755 %{buildroot}%{_javadir}/%{project} install -m 644 target/%{bundle}-%{version}.jar \ %{buildroot}%{_javadir}/%{project}/%{bundle}-%{version}.jar # versionless symlinks to jars (cd %{buildroot}%{_javadir}/%{project} && for jar in *-%{version}*.jar; \ do %__ln_s -f $jar `echo $jar| sed "s|-%{version}||g"`; done) %add_to_maven_depmap %{groupId} %{artifactId} %{version} JPP/%{project} %{bundle} # poms install -d -m 755 %{buildroot}%{_mavenpomdir} install -pm 644 pom.xml %{buildroot}%{POM} # javadoc install -d -m 0755 %{buildroot}%{_javadocdir}/%{name}-%{version} %__cp -pr target/site/api*/* %{buildroot}%{_javadocdir}/%{name}-%{version}/ %__ln_s %{name}-%{version} %{buildroot}%{_javadocdir}/%{name} %__rm -rf target/site/api* %post %update_maven_depmap %postun %update_maven_depmap %clean %__rm -rf %{buildroot} %files %defattr(-,root,root,-) %{_javadir}/%{project}/* %{POM} %config(noreplace) %{_mavendepmapfragdir}/%{name} %doc LICENSE %files javadoc %defattr(-,root,root,-) %{_javadocdir}/%{name}-%{version} %{_javadocdir}/%{name} %doc LICENSE %changelog * Mon Jul 26 2010 Victor G. Vasilyev <victor.vasilyev@sun.com> 2.0.5-5 - Remove R: felix-parent * Mon Jul 26 2010 Victor G. Vasilyev <victor.vasilyev@sun.com> 2.0.5-4 - Use felix-parent https://bugzilla.redhat.com/show_bug.cgi?id=615868 - Remove demap file option from mvn-jpp command * Sat Jul 24 2010 Victor G. Vasilyev <victor.vasilyev@sun.com> 2.0.5-3 - Add TODOs for uncompleted activities against maven packages - Use new names of the maven plgins - Add license file to independent subpackage javadoc - Remove unneeded demap file * Tue Jul 13 2010 Victor G. Vasilyev <victor.vasilyev@sun.com> 2.0.5-2 - Use maven instead of ant * Tue Jun 22 2010 Victor G. Vasilyev <victor.vasilyev@sun.com> 2.0.5-1 - Release 2.0.5