Commit 16b098b0 authored by Alex Mateescu's avatar Alex Mateescu Committed by alexm

OF-566 Build a noarch RPM when JRE is not bundled (without JRE, there's nothing arch specific)

git-svn-id: http://svn.igniterealtime.org/svn/repos/openfire/trunk@13328 b35dd754-fafc-0310-a699-88a17e54d16e
parent 9894f201
...@@ -1111,6 +1111,9 @@ ...@@ -1111,6 +1111,9 @@
<copy todir="${target.rpm}/SOURCES" file="${release.dest.dir}/${release.fullname.src}.tar.gz" /> <copy todir="${target.rpm}/SOURCES" file="${release.dest.dir}/${release.fullname.src}.tar.gz" />
<if>
<equals arg1="${bundle.jre}" arg2="true"/>
<then>
<rpm specFile="openfire.spec" <rpm specFile="openfire.spec"
topDir="${target.rpm}" topDir="${target.rpm}"
command="-ba --target i386 --define 'OPENFIRE_VERSION ${version}' --define 'OPENFIRE_SOURCE ${release.fullname.src}.tar.gz' --define 'OPENFIRE_BUILDDATE ${rpm.builddate}'" command="-ba --target i386 --define 'OPENFIRE_VERSION ${version}' --define 'OPENFIRE_SOURCE ${release.fullname.src}.tar.gz' --define 'OPENFIRE_BUILDDATE ${rpm.builddate}'"
...@@ -1121,6 +1124,20 @@ ...@@ -1121,6 +1124,20 @@
<fileset dir="${target.rpm}/SRPMS" /> <fileset dir="${target.rpm}/SRPMS" />
<fileset dir="${target.rpm}/RPMS/i386" /> <fileset dir="${target.rpm}/RPMS/i386" />
</copy> </copy>
</then>
<else>
<rpm specFile="openfire.spec"
topDir="${target.rpm}"
command="-ba --target noarch --define 'OPENFIRE_VERSION ${version}' --define 'OPENFIRE_SOURCE ${release.fullname.src}.tar.gz' --define 'OPENFIRE_BUILDDATE ${rpm.builddate}'"
failOnError="true"
/>
<copy todir="${release.dest.dir}" >
<fileset dir="${target.rpm}/SRPMS" />
<fileset dir="${target.rpm}/RPMS/noarch" />
</copy>
</else>
</if>
</target> </target>
<!-- installer.solaris ========================================================================= --> <!-- installer.solaris ========================================================================= -->
......
...@@ -4,7 +4,9 @@ Version: %{OPENFIRE_VERSION} ...@@ -4,7 +4,9 @@ Version: %{OPENFIRE_VERSION}
Release: 1 Release: 1
BuildRoot: %{_builddir}/%{name}-root BuildRoot: %{_builddir}/%{name}-root
Source0: %{OPENFIRE_SOURCE} Source0: %{OPENFIRE_SOURCE}
%ifnarch noarch
Source1: jre-dist.tar.gz Source1: jre-dist.tar.gz
%endif
Group: Applications/Communications Group: Applications/Communications
Vendor: Jive Software Vendor: Jive Software
Packager: Jive Software Packager: Jive Software
...@@ -39,10 +41,12 @@ rm -rf $RPM_BUILD_ROOT ...@@ -39,10 +41,12 @@ rm -rf $RPM_BUILD_ROOT
mkdir -p $RPM_BUILD_ROOT%{prefix} mkdir -p $RPM_BUILD_ROOT%{prefix}
# Copy over the main install tree. # Copy over the main install tree.
cp -R target/openfire $RPM_BUILD_ROOT%{homedir} cp -R target/openfire $RPM_BUILD_ROOT%{homedir}
%ifnarch noarch
# Set up distributed JRE # Set up distributed JRE
pushd $RPM_BUILD_ROOT%{homedir} pushd $RPM_BUILD_ROOT%{homedir}
gzip -cd %{SOURCE1} | tar xvf - gzip -cd %{SOURCE1} | tar xvf -
popd popd
%endif
# Set up the init script. # Set up the init script.
mkdir -p $RPM_BUILD_ROOT/etc/init.d mkdir -p $RPM_BUILD_ROOT/etc/init.d
cp $RPM_BUILD_ROOT%{homedir}/bin/extra/redhat/openfire $RPM_BUILD_ROOT/etc/init.d/openfire cp $RPM_BUILD_ROOT%{homedir}/bin/extra/redhat/openfire $RPM_BUILD_ROOT/etc/init.d/openfire
...@@ -141,7 +145,9 @@ exit 0 ...@@ -141,7 +145,9 @@ exit 0
%doc %{homedir}/changelog.html %doc %{homedir}/changelog.html
%{_sysconfdir}/init.d/openfire %{_sysconfdir}/init.d/openfire
%config(noreplace) %{_sysconfdir}/sysconfig/openfire %config(noreplace) %{_sysconfdir}/sysconfig/openfire
%ifnarch noarch
%{homedir}/jre %{homedir}/jre
%endif
%changelog %changelog
* %{OPENFIRE_BUILDDATE} Jive Software <webmaster@jivesoftware.com> %{OPENFIRE_VERSION}-1 * %{OPENFIRE_BUILDDATE} Jive Software <webmaster@jivesoftware.com> %{OPENFIRE_VERSION}-1
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment