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,16 +1111,33 @@
<copy todir="${target.rpm}/SOURCES" file="${release.dest.dir}/${release.fullname.src}.tar.gz" />
<rpm specFile="openfire.spec"
topDir="${target.rpm}"
command="-ba --target i386 --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/i386" />
</copy>
<if>
<equals arg1="${bundle.jre}" arg2="true"/>
<then>
<rpm specFile="openfire.spec"
topDir="${target.rpm}"
command="-ba --target i386 --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/i386" />
</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>
<!-- installer.solaris ========================================================================= -->
......
......@@ -4,7 +4,9 @@ Version: %{OPENFIRE_VERSION}
Release: 1
BuildRoot: %{_builddir}/%{name}-root
Source0: %{OPENFIRE_SOURCE}
%ifnarch noarch
Source1: jre-dist.tar.gz
%endif
Group: Applications/Communications
Vendor: Jive Software
Packager: Jive Software
......@@ -39,10 +41,12 @@ rm -rf $RPM_BUILD_ROOT
mkdir -p $RPM_BUILD_ROOT%{prefix}
# Copy over the main install tree.
cp -R target/openfire $RPM_BUILD_ROOT%{homedir}
%ifnarch noarch
# Set up distributed JRE
pushd $RPM_BUILD_ROOT%{homedir}
gzip -cd %{SOURCE1} | tar xvf -
popd
%endif
# Set up the init script.
mkdir -p $RPM_BUILD_ROOT/etc/init.d
cp $RPM_BUILD_ROOT%{homedir}/bin/extra/redhat/openfire $RPM_BUILD_ROOT/etc/init.d/openfire
......@@ -141,7 +145,9 @@ exit 0
%doc %{homedir}/changelog.html
%{_sysconfdir}/init.d/openfire
%config(noreplace) %{_sysconfdir}/sysconfig/openfire
%ifnarch noarch
%{homedir}/jre
%endif
%changelog
* %{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