Sophie

Sophie

distrib > Fedora > 13 > i386 > media > updates-src > by-pkgid > 7de8d7653c38a1d49766fe5e7a6ef070 > files > 4

spectrum-1.4.7-1.fc13.src.rpm

%{!?python_sitelib: %global python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}
%{!?_initddir: %global _initddir %{_initrddir}}

%global groupname spectrum
%global username spectrum

Summary: XMPP transport/gateway
Name: spectrum
Version: 1.4.7
Release: 1%{?dist}
Group: System Environment/Daemons
# spectrumctl is GPLv3+, rest GPLv2+
License: GPLv2+ and GPLv3+
# git clone http://github.com/hanzz/spectrum.git
# git archive --prefix=spectrum/ d55ba67ea9dc | bzip2 >spectrum.tar.bz2
#Source0: %{name}.tar.bz2
# The following URL needs to be bumped for every release ... that 26 is not stable
Source0: http://spectrum.im/attachments/download/37/%{name}-%{version}.tar.gz
# Patch to make spectrum build with an obsolete cmake on RHEL-5
Source1: spectrum-tmpfiles.conf
Patch1: spectrum-cmake.patch
URL: http://spectrum.im/
BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX)
BuildRequires: libpurple-devel
BuildRequires: poco-devel
BuildRequires: gloox-devel
BuildRequires: cppunit-devel
BuildRequires: cmake
BuildRequires: python2-devel
BuildRequires: python-xmpp
BuildRequires: ImageMagick-c++-devel
Requires: logrotate
Requires: python-xmpp
Requires(pre): shadow-utils
Requires(preun): initscripts, chkconfig
Requires(postun): initscripts
Requires(post): chkconfig
%if 0%{?rhel} > 0 && 0%{?rhel} <= 5
ExcludeArch: ppc
%endif

%description
Spectrum is an XMPP transport/gateway. It allows XMPP users to communicate with
their friends who are using one of the supported networks. Spectrum is written
in C++ and uses the Gloox XMPP library and libpurple for “legacy networks”.
Spectrum supports a wide range of different networks such as ICQ, XMPP (Jabber,
GTalk), AIM, MSN, Facebook, Twitter, Gadu-Gadu, IRC and SIMPLE.
%if 0%{?rhel} > 0 && 0%{?rhel} <= 5
Users of RHEL-5 Server need to have RHEL Optional Productivity Apps channel
switched on in order to get libpurple.
%endif

%prep
%setup -q

%if 0%{?rhel} > 0 && 0%{?rhel} <= 5
%patch1 -p1 -b .RH-build
%endif

rm -vf po/*.po

%build
%cmake .
make VERBOSE=1 %{?_smp_mflags}
(cd spectrumctl && python setup.py build)

cat <<EOS >spectrum-logrotate
/var/log/spectrum/*.log {
    rotate 5
    size 1M
    missingok
    notifempty
}
EOS

%install
rm -rf %{buildroot}

make install DESTDIR=%{buildroot}
(cd spectrumctl && \
    python setup.py install --root %{buildroot} --prefix %{_prefix} \
)

# Stuff that 'make install' does not install:
install -p -D -m 644 schemas/mysql_schema.sql \
    %{buildroot}%{_datadir}/spectrum/schemas/mysql_schema.sql
install -p -D -m 755 initscripts/fedora/spectrum \
    %{buildroot}%{_initddir}/spectrum
install -p -D -m 644 spectrum-logrotate \
    %{buildroot}%{_sysconfdir}/logrotate.d/spectrum

install -d %{buildroot}%{_localstatedir}/{lib,run,log}/spectrum

# move daemon binary to /usr/sbin
install -d %{buildroot}%{_sbindir}
mv %{buildroot}%{_bindir}/spectrum %{buildroot}%{_sbindir}

mv -v %{buildroot}%{_sysconfdir}/spectrum/*.example .

%if 0%{?fedora} >= 15
install -p -D %{SOURCE1} \
	%{buildroot}%{_sysconfdir}/tmpfiles.d/spectrum.conf
%endif

%clean
rm -rf %{buildroot}

%pre
getent group %{groupname} >/dev/null || groupadd -r %{groupname}
getent passwd %{username} >/dev/null || \
    useradd -r -g %{groupname} -d %{_localstatedir}/lib/spectrum \
        -s /sbin/nologin \
        -c "spectrum XMPP transport" %{username}
exit 0

%post
/sbin/chkconfig --add spectrum

%preun
if [ $1 = 0 ]; then
    /sbin/service spectrum stop >/dev/null 2>&1
    /sbin/chkconfig --del spectrum
fi

%postun
if [ "$1" -ge "1" ] ; then
   /sbin/service spectrum condrestart >/dev/null 2>&1 || :
fi


%check
#./spectrum_tests

%files
%defattr(-, root, root,-)
%doc spectrum.cfg.example AUTHORS ChangeLog TODO COPYING
%{python_sitelib}/spectrum*
%attr(755, root, root) %{_bindir}/spectrumctl
%{_sbindir}/spectrum
%{_datadir}/spectrum/
%{_initddir}/spectrum
%{_mandir}/man*/spectrum*
%attr(700, %{username}, %{groupname}) %{_localstatedir}/lib/spectrum/
%attr(700, %{username}, %{groupname}) %{_localstatedir}/run/spectrum/
%attr(700, %{username}, %{groupname}) %{_localstatedir}/log/spectrum/
%attr(750, root, %{groupname}) %dir %{_sysconfdir}/spectrum
%config(noreplace) %{_sysconfdir}/logrotate.d/spectrum
%if 0%{?fedora} >= 15
%config(noreplace) %attr(644, %{username}, %{groupname}) %{_sysconfdir}/tmpfiles.d/spectrum.conf
%endif

%changelog
* Mon Jan 24 2011 Matěj Cepl <mcepl@redhat.com> - 1.4.7-1
- New upstream release.

* Mon Jan 03 2011 Matěj Cepl <mcepl@redhat.com> - 1.4.6-1
- New upstream release.

* Wed Dec 29 2010 Matěj Cepl <mcepl@redhat.com> - 1.4.5-2
- Fix ownership and rights of /etc/tmpfiles.d/spectrum.conf.

* Tue Dec 28 2010 Matěj Cepl <mcepl@redhat.com> - 1.4.5-1
- New upstream release
- Switch off tests, following the upstream. 

* Thu Nov 25 2010 Matěj Cepl <mcepl@redhat.com> - 1.4.4-1
- New upstream release (#656693)
- Instead of %%ghosting, the new fashion is tmpfiles.d ;)

* Wed Nov 24 2010 Matěj Cepl <mcepl@redhat.com> - 1.4.3-2
- /var/run/spectrum should be %%ghost (#656693).

* Tue Nov 16 2010 Matěj Cepl <mcepl@redhat.com> - 1.4.3-1
- New upstream release.

* Fri Oct 08 2010 Matěj Cepl <mcepl@redhat.com> - 1.4.2-1
- New upstream release

* Thu Aug 12 2010 Matěj Cepl <mcepl@redhat.com> - 1.4.0-1
- New upstream release.

* Wed Jul 21 2010 Matěj Cepl <mcepl@redhat.com> - 0.3.1-1
- New upstream release.
- Restart the server on upgrade.

* Tue Jul 13 2010 Matěj Cepl <mcepl@redhat.com> - 0.3-1
- New upstream release.

* Tue Jul 13 2010 Matěj Cepl <mcepl@redhat.com> - 0.3-0.12.git20100712
- New upstream checkout, fixed compiler warnings.

* Mon Jul 12 2010 Matěj Cepl <mcepl@redhat.com> - 0.3-0.11.git20100712
- New upstream checkout, preparation for 0.3 release.
- Fix location of spectrum.cfg example.

* Tue Jun 29 2010 Matěj Cepl <mcepl@redhat.com> - 0.10.git20100629
- New pull from the upstream git

* Thu Jun 17 2010 Matěj Cepl <mcepl@redhat.com> - 0.9.git20100614
- fix %% in %%changelog.

* Tue Jun 15 2010 Matěj Cepl <mcepl@redhat.com> - 0.8.git20100614
- Use %%global insted of %%define
- Preserve timestamps whenever possible
- Fix Requires and BuildRequires

* Mon Jun 14 2010 Matěj Cepl <mcepl@redhat.com> - 0.7.git20100614
- Even the later checkout which fixes missing function in glib on RHEL-5
- Adding missing Requires ... python-xmpp

* Sun Jun 13 2010 Matěj Cepl <mcepl@redhat.com> - 0.6.git20100613
- Merged to the latest upstream checkout, and removed
  unnecessary patches

* Sat Jun 12 2010 Matěj Cepl <mcepl@redhat.com> - 0.5.git20100526
- Another batch of reviewer's comments
- Add mschmidt@RH's new initscript

* Fri Jun 11 2010 Matěj Cepl <mcepl@redhat.com> - 0.4.git20100526
- file right bits fixed per reviewer's comments

* Fri Jun 11 2010 Matěj Cepl <mcepl@redhat.com> - 0.3.git20100526
- Err, of course, the same patch should be applied to Rawhide as well,
  it is not RHEL-5 exclusive.

* Fri Jun 11 2010 Matěj Cepl <mcepl@redhat.com> - 0.2.git20100526
- Finally managed to get a patch which makes spectrum building (wrong
  inline method hasAuthRequest).

* Tue Jun 08 2010 Matěj Cepl <mcepl@redhat.com> - 0.1.git20100526
- Fix release number and other objections from the package reviewer
- Use %%cmake and make VERBOSE=1 %%{?_smp_mflags} as we should
- Make a comment to the bug about reasons for not building for PPC
  on RHEL-5

* Fri Jun 04 2010 Matěj Cepl <mcepl@redhat.com> - 0.3-0.git20100526.1
- The later checkout from git
- Fix issues pointed out by package reviewer.

* Tue May 25 2010 Matěj Cepl <mcepl@redhat.com> - 0.2-5
- Do not use libgettextpo library anymore

* Tue May 25 2010 Matěj Cepl <mcepl@redhat.com> - 0.2-4
- move daemon binary to /usr/sbin

* Tue May 25 2010 Matěj Cepl <mcepl@redhat.com> - 0.2-3
- Make special spectrum user/group

* Tue May 18 2010 Matěj Cepl <mcepl@redhat.com> - 0.2-2
- make spectrum build on RHEL 5

* Thu Apr 01 2010 Matěj Cepl <mcepl@redhat.com> - 0.1-4
- Fix description and initscript location
- Fix %%{buildroot} and %%defattr

* Wed Mar 31 2010 Matěj Cepl <mcepl@redhat.com> - 0.1-3
- Fix requires and ownerships

* Tue Mar 30 2010 Matěj Cepl <mcepl@redhat.com> 0.1-2
- Attempt to make package building in koji with the latest gcc
- Fixing packaging issues

* Mon Feb 22 2010 Joost Ruijsch <joost@ruijsch.com>
- Created this SPEC file