Commit de340f06 authored by Daniel Henninger's avatar Daniel Henninger Committed by dhenninger

Updated for improvements to standard RPM dist.



git-svn-id: http://svn.igniterealtime.org/svn/repos/openfire/branches@8216 b35dd754-fafc-0310-a699-88a17e54d16e
parent 308a1157
...@@ -1078,6 +1078,33 @@ ...@@ -1078,6 +1078,33 @@
<target name="installer.rpm" depends="init, dist.init" description="Builds a rpm of openfire."> <target name="installer.rpm" depends="init, dist.init" description="Builds a rpm of openfire.">
<antcall target="dist.src"/> <antcall target="dist.src"/>
<mkdir dir="${target.rpm}/SPECS" />
<mkdir dir="${target.rpm}/SOURCES" />
<mkdir dir="${target.rpm}/BUILD" />
<mkdir dir="${target.rpm}/SRPMS" />
<mkdir dir="${target.rpm}/RPMS" />
<copy todir="${target.rpm}/SPECS" file="${basedir}/build/rpm/openfire.spec" />
<copy todir="${target.rpm}/SOURCES" file="${basedir}/build/rpm/jre-dist.tar.gz" />
<copy todir="${target.rpm}/SOURCES" file="${release.dest.dir}/${release.fullname.src}.tar.gz" />
<rpm specFile="openfire.spec"
topDir="${target.rpm}"
command="-ba"
failOnError="true"
/>
<copy todir="${release.dest.dir}" >
<fileset dir="${target.rpm}/SRPMS" />
<fileset dir="${target.rpm}/RPMS/i386" />
</copy>
</target>
<!-- installer.rpm.old ========================================================================= -->
<property name="target.rpm" value="${work.dir}/rpm" />
<target name="installer.rpm.old" depends="init, dist.init" description="Builds a rpm of openfire.">
<antcall target="dist.src"/>
<antcall target="dist.bin"> <antcall target="dist.bin">
<!-- Don't need package for installer build --> <!-- Don't need package for installer build -->
<param name="no.package" value="true"/> <param name="no.package" value="true"/>
......
Summary: Openfire XMPP Server Summary: Openfire XMPP Server
Name: openfire Name: openfire
Version: 3.3.0 Version: 3.3.1
Release: 1 Release: 1
BuildRoot: %{_builddir}/%{name}-root BuildRoot: %{_builddir}/%{name}-root
Source0: %{name}_src_3_3_0.tar.gz Source0: %{name}_src_3_3_1.tar.gz
Source1: jre-dist.tar.gz
Group: Applications/Communications Group: Applications/Communications
Vendor: Jive Software Vendor: Jive Software
Packager: Jive Software Packager: Jive Software
License: GPL License: GPL
# May reevaluate this at some point.
#Requires: jdk >= 1.5.0
URL: http://www.igniterealtime.org/ URL: http://www.igniterealtime.org/
%define prefix /opt
%define homedir %{prefix}/openfire
%description %description
Openfire is a leading Open Source, cross-platform IM server based on the Openfire is a leading Open Source, cross-platform IM server based on the
XMPP (Jabber) protocol. It has great performance, is easy to setup and use, XMPP (Jabber) protocol. It has great performance, is easy to setup and use,
and delivers an innovative feature set. and delivers an innovative feature set.
This particular release includes a bundled JRE.
%prep %prep
%setup -q -n openfire_src
%build %build
cd build
ant openfire
ant -Dplugin=search plugin
cd ..
%install %install
# There's no need to package this. # Prep the install location.
rm $RPM_BUILD_ROOT/opt/openfire/logs/stderr.out 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}
# Set up distributed JRE
pushd $RPM_BUILD_ROOT%{homedir}
gzip -cd %{SOURCE1} | tar xvf -
popd
# 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/opt/openfire/bin/extra/redhat/openfired $RPM_BUILD_ROOT/etc/init.d/openfired cp $RPM_BUILD_ROOT%{homedir}/bin/extra/redhat/openfire $RPM_BUILD_ROOT/etc/init.d/openfire
chmod 755 $RPM_BUILD_ROOT/etc/init.d/openfired chmod 755 $RPM_BUILD_ROOT/etc/init.d/openfire
# Make the startup script executable. # Make the startup script executable.
chmod 755 $RPM_BUILD_ROOT/opt/openfire/bin/openfire.sh chmod 755 $RPM_BUILD_ROOT%{homedir}/bin/openfire.sh
# Set up the sysconfig file. # Set up the sysconfig file.
mkdir -p $RPM_BUILD_ROOT/etc/sysconfig mkdir -p $RPM_BUILD_ROOT/etc/sysconfig
cp $RPM_BUILD_ROOT/opt/openfire/bin/extra/redhat/openfire-sysconfig $RPM_BUILD_ROOT/etc/sysconfig/openfire cp $RPM_BUILD_ROOT%{homedir}/bin/extra/redhat/openfire-sysconfig $RPM_BUILD_ROOT/etc/sysconfig/openfire
# Copy over the documentation
cp -R documentation $RPM_BUILD_ROOT%{homedir}/documentation
cp changelog.html $RPM_BUILD_ROOT%{homedir}/
cp LICENSE.html $RPM_BUILD_ROOT%{homedir}/
cp README.html $RPM_BUILD_ROOT%{homedir}/
# Copy over the i18n files
cp -R resources/i18n $RPM_BUILD_ROOT%{homedir}/resources/i18n
# Make sure scripts are executable
chmod 755 $RPM_BUILD_ROOT%{homedir}/bin/extra/openfired
chmod 755 $RPM_BUILD_ROOT%{homedir}/bin/extra/redhat-postinstall.sh
# Move over the embedded db viewer pieces
mv $RPM_BUILD_ROOT%{homedir}/bin/extra/embedded-db.rc $RPM_BUILD_ROOT%{homedir}/bin
mv $RPM_BUILD_ROOT%{homedir}/bin/extra/embedded-db-viewer.sh $RPM_BUILD_ROOT%{homedir}/bin
# We don't really need any of these things.
rm -rf $RPM_BUILD_ROOT%{homedir}/bin/extra
rm -f $RPM_BUILD_ROOT%{homedir}/bin/*.bat
rm -rf $RPM_BUILD_ROOT%{homedir}/resources/nativeAuth/osx-ppc
rm -rf $RPM_BUILD_ROOT%{homedir}/resources/nativeAuth/solaris-sparc
rm -rf $RPM_BUILD_ROOT%{homedir}/resources/nativeAuth/win32-x86
rm -f $RPM_BUILD_ROOT%{homedir}/lib/*.dll
rm -rf $RPM_BUILD_ROOT%{homedir}/resources/spank
%clean
rm -rf $RPM_BUILD_ROOT
%preun %preun
[ -x "/etc/init.d/openfired" ] && /etc/init.d/openfired stop [ -x "/etc/init.d/openfire" ] && /etc/init.d/openfire stop
/sbin/chkconfig --del openfired /sbin/chkconfig --del openfire
%post %post
/sbin/chkconfig --add openfired /sbin/chkconfig --add openfire
%files %files
%defattr(-,daemon,daemon) %defattr(-,daemon,daemon)
%dir /opt/openfire %dir %{homedir}
/opt/openfire/bin %dir %{homedir}/bin
%dir /opt/openfire/conf %{homedir}/bin/openfire.sh
%config(noreplace) /opt/openfire/conf/openfire.xml %config(noreplace) %{homedir}/bin/embedded-db.rc
/opt/openfire/lib %{homedir}/bin/embedded-db-viewer.sh
%dir /opt/openfire/logs %dir %{homedir}/conf
/opt/openfire/plugins %config(noreplace) %{homedir}/conf/openfire.xml
%dir /opt/openfire/resources %dir %{homedir}/lib
/opt/openfire/resources/database %{homedir}/lib/*.jar
/opt/openfire/resources/i18n %dir %{homedir}/logs
/opt/openfire/resources/nativeAuth %dir %{homedir}/plugins
/opt/openfire/resources/spank %{homedir}/plugins/search.jar
%dir /opt/openfire/resources/security %dir %{homedir}/plugins/admin
%config(noreplace) /opt/openfire/resources/security/keystore %{homedir}/plugins/admin/*
%config(noreplace) /opt/openfire/resources/security/truststore %dir %{homedir}/resources
%doc /opt/openfire/documentation %dir %{homedir}/resources/database
%doc /opt/openfire/LICENSE.html %{homedir}/resources/database/*.sql
%doc /opt/openfire/README.html %dir %{homedir}/resources/database/upgrade
%doc /opt/openfire/changelog.html %dir %{homedir}/resources/database/upgrade/*
/etc/init.d/openfired %{homedir}/resources/database/upgrade/*/*
%config(noreplace) /etc/sysconfig/openfire %dir %{homedir}/resources/i18n
%{homedir}/resources/i18n/*
%dir %{homedir}/resources/nativeAuth
%dir %{homedir}/resources/nativeAuth/linux-i386
%{homedir}/resources/nativeAuth/linux-i386/*
%{homedir}/resources/security
%doc %{homedir}/documentation
%doc %{homedir}/LICENSE.html
%doc %{homedir}/README.html
%doc %{homedir}/changelog.html
%{_sysconfdir}/init.d/openfire
%config(noreplace) %{_sysconfdir}/sysconfig/openfire
%{homedir}/jre
%changelog %changelog
* Sun Apr 12 2007 Jive Software <nobody@jivesoftware.com> * Mon Apr 30 2007 Daniel Henninger <jadestorm@nc.rr.com> 3.3.1-1
- Openfire 3.3.0 build. - Initial RPM creation.
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