%define __jar_repack /bin/true %define openfire_user daemon %define openfire_group daemon %define homedir %{_libdir}/openfire Name: openfire Version: 3.6.3 Release: 1%{?dist} Summary: Instant messaging and groupchat server based on XMPP Group: Applications/Internet License: GPLv2 URL: http://www.igniterealtime.org/ # Original URL of the tarball is # http://www.igniterealtime.org/downloadServlet?filename=openfire/openfire_src_%{upver}.tar.gz # openfire contains code that we cannot or don't want to ship. Therefore we use # this script to remove such code before shipping it. # Download the upstream tarball and invoke the clean-source-tarball.sh script # sh clean-source-tarball.sh Source0: http://download.igniterealtime.org/openfire/openfire_src_3_6_3.tar.gz #Source999: clean-source-tarball.sh Patch0: openfire-MC-build.patch BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX) BuildRequires: java-devel BuildRequires: ant >= 1.6, ant-junit BuildRequires: sed Requires: java >= 1.6 Requires: shadow-utils chkconfig Requires(post): shadow-utils Requires(preun): chkconfig %description Openfire is an Open Source, cross-platform IM server based on the XMPP (Jabber) protocol. It has great performance, is easy to setup and use, and delivers an innovative feature set. %prep %setup -q -n %{name}_src %patch0 -p1 -b .MC-build rm -fv src/resources/nativeAuth/linux-i386/libshaj.so %build cd build ant openfire ant -Dplugin=search plugin cd .. sed -i 's!@LIBDIR@!%{_libdir}!g' \ target/openfire/bin/extra/redhat/openfire-sysconfig %install rm -rf $RPM_BUILD_ROOT rm -rvf target/resources/nativeAuth/solaris-sparc install -D -p -m 755 target/openfire/bin/extra/redhat/openfire \ $RPM_BUILD_ROOT%{_sysconfdir}/init.d/%{name} install -D -p -m 644 target/openfire/bin/extra/redhat/openfire-sysconfig \ $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig/%{name} rm -rf target/openfire/bin install -d $RPM_BUILD_ROOT%{homedir} cp -r -p target/openfire/ $RPM_BUILD_ROOT%{_libdir}/ cp -r resources/i18n $RPM_BUILD_ROOT%{homedir} install -d $RPM_BUILD_ROOT%{homedir}/bin cp -p src/bin/extra/embedded-db{.rc,-viewer.sh} $RPM_BUILD_ROOT%{homedir}/bin rm -rf $RPM_BUILD_ROOT%{homedir}/resources/nativeAuth/{osx-ppc,solaris-sparc,win32-x86} # make symlinks #install -d $RPM_BUILD_ROOT%{_bindir} #ln -sf %{_libdir}/bin/ # fix the file mode bits %clean rm -rf $RPM_BUILD_ROOT %post if [ $1 -eq 1 ]; then chkconfig --add openfire getent group %{openfire_group} || groupadd %{openfire_group} getent passwd %{openfire_user} || \ useradd %{openfire_user} -g %{openfire_group} -s /bin/bash /bin/chown -R %{openfire_user}:%{openfire_group} %{homedir} install -o %{openfire_user} -g %{openfire_group} -d %{_localstatedir}/log/openfire fi exit 0 %preun if [ $1 -eq 0 ]; then chkconfig --del openfire fi exit 0 %files %defattr(-,root,root,-) %doc documentation/dist/* %{homedir} %{_sysconfdir}/init.d/openfire %config(noreplace) %{_sysconfdir}/sysconfig/openfire %changelog * Wed Jan 28 2009 Peter Lemenkov 3.6.3-1 - Ver. 3.6.3 - Merged some stuff from openSuSE package * Tue Mar 18 2008 Matej Cepl 3.4.5-3 - New upstream release + rebuild to java-1.6.0-openjdk * Wed Jan 23 2008 Matej Cepl 3.4.4-2 - Some improvements according to the upstream spec file - Remove src/resources/nativeAuth/linux-i386/libshaj.so * Tue Jan 22 2008 Matej Cepl 3.4.4-1 - Initial attempt to package