Blob Blame History Raw
%{!?python_sitearch: %global python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)")}

## Minimum required versions of GLib, GTK+, libtelepathy, and Mission-Control,
## respectively.
%global	gtk2_min_version	2.12
%global	glib2_min_version	2.15.5
%global	tp_mc_min_version	4.61
%global	tp_glib_min_version	0.7.6		

Name:		empathy
Version:	0.23.1
Release:	2%{?dist}
Summary:	GNOME Instant Messaging Client

Group:		Applications/Communications
License:	GPLv2+
URL:		http://live.gnome.org/Empathy
Source0:	http://ftp.gnome.org/pub/GNOME/sources/%{name}/0.22/%{name}-%{version}.tar.bz2
Source1:	%{name}-README.ConnectionManagers
BuildRoot:	%{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)

BuildRequires:	aspell-devel
BuildRequires:	iso-codes-devel
BuildRequires:	desktop-file-utils
BuildRequires:	evolution-data-server-devel
BuildRequires:	GConf2-devel 
BuildRequires:	gettext
BuildRequires:	glib2-devel >= %{glib2_min_version}
BuildRequires:	gnome-doc-utils >= 0.3.2
BuildRequires:	gnome-panel-devel
BuildRequires:	gtk2-devel >= %{gtk2_min_version}
BuildRequires:	libglade2-devel
BuildRequires:	libtool
BuildRequires:	libxml2-devel
BuildRequires:	perl(XML::Parser)
BuildRequires:	pygtk2-devel
BuildRequires:	scrollkeeper	
BuildRequires:	telepathy-glib-devel >= %{tp_glib_min_version}
BuildRequires:	telepathy-mission-control-devel >= %{tp_mc_min_version}

Requires:	%{name}-libs = %{version}-%{release}
Requires:	telepathy-filesystem
## Empathy is useless without a proper Telepathy connection manager installed.
## We hardcode dependencies on Salut and Gabble to support XMPP on a default
## install, in both the link-local and Jabber/GoogleTalk incarnations. 
## (RHBZ: 308871 and 334221)
## TODO: Perhaps we can configure these to be installed "on demand" with
##       PackageKit and friends?
Requires:	telepathy-gabble
Requires:	telepathy-salut
# Require this for VOIP support 
Requires:	telepathy-stream-engine

Requires(pre):	GConf2

Requires(post):	GConf2
Requires(post):	scrollkeeper

Requires(preun):	GConf2

Requires(postun):	scrollkeeper

%description
Empathy provides a powerful multiple protocol instant messaging
client using the Telepathy framework.


%package	devel
Summary:	Development files for %{name}
Group:		Development/Libraries
Requires:	%{name}-libs = %{version}-%{release}
Requires:	pkgconfig
## Needs these for the various #include directives in its headers, as well
## as pkgconfig dependencies...
Requires:	glib2-devel >= %{glib2_min_version}
Requires:	telepathy-glib-devel >= %{tp_glib_min_version}
Requires:	telepathy-mission-control-devel >= %{tp_mc_min_version}
Requires:	libxml2-devel

%description	devel
The %{name}-devel package contains libraries and header files for
developing applications that use %{name}.


%package	libs
Summary:	Shared libraries for %{name}
Group:		Development/Libraries
Requires:	glib2 >= %{glib2_min_version}
Requires:	gtk2 >= %{gtk2_min_version}
Requires:	telepathy-glib >= %{tp_glib_min_version}
Requires:	telepathy-mission-control >= %{tp_mc_min_version}

%description	libs
The %{name}-libs package contains shared libraries used by Empathy.


%package	python
Summary:	Python bindings for libempathy and libempathy-gtk
Group:		Development/Languages
Requires:	%{name}-libs = %{version}-%{release}	

%description	python
This package contains the empathy and empathygtk Python modules, which provide
bindings to the libempathy and libempathy-gtk libraries, respectively.

%prep
%setup -q


%build
## GCC complains about some unused functions, so we forcibly show those as
## simple warnings instead of build-halting errors.
%configure --with-compile-warnings=yes --disable-static
make %{?_smp_mflags} LIBTOOL=%{_bindir}/libtool
install -m 0644 %{SOURCE1} ./README.ConnectionManagers


%install
rm -rf $RPM_BUILD_ROOT
make install DESTDIR=$RPM_BUILD_ROOT
find $RPM_BUILD_ROOT -name '*.la' -exec rm -f {} ';'

%find_lang %{name}

desktop-file-install --vendor fedora --delete-original	\
	--dir %{buildroot}%{_datadir}/applications	\
	%{buildroot}%{_datadir}/applications/%{name}.desktop


%clean
rm -rf %{buildroot}


%pre
if [ "$1" -gt 1 ]; then
	export GCONF_CONFIG_SOURCE=$(gconftool-2 --get-default-source)
	gconftool-2 --makefile-uninstall-rule	\
		%{_sysconfdir}/gconf/schemas/GNOME_Megaphone_Applet.schemas	\
		%{_sysconfdir}/gconf/schemas/%{name}.schemas > /dev/null ||:
fi


%post
export GCONF_CONFIG_SOURCE=$(gconftool-2 --get-default-source)
gconftool-2 --makefile-install-rule	\
	%{_sysconfdir}/gconf/schemas/GNOME_Megaphone_Applet.schemas	\
	%{_sysconfdir}/gconf/schemas/%{name}.schemas > /dev/null ||:
scrollkeeper-update -q -o %{_datadir}/omf/%{name} ||:
touch --no-create %{_datadir}/icons/hicolor ||:
%{_bindir}/gtk-update-icon-cache --quiet %{_datadir}/icons/hicolor ||:

%post libs -p /sbin/ldconfig


%preun
if [ "$1" -eq 0 ]; then
	export GCONF_CONFIG_SOURCE=$(gconftool-2 --get-default-source)
	gconftool-2 --makefile-uninstall-rule	\
		%{_sysconfdir}/gconf/schemas/GNOME_Megaphone_Applet.schemas	\
		%{_sysconfdir}/gconf/schemas/%{name}.schemas > /dev/null ||:
fi


%postun
scrollkeeper-update -q || :
touch --no-create %{_datadir}/icons/hicolor || :
if [ -x %{_bindir}/gtk-update-icon-cache ]; then
	%{_bindir}/gtk-update-icon-cache --quiet %{_datadir}/icons/hicolor || :
fi

%postun libs -p /sbin/ldconfig


%files -f %{name}.lang
%defattr(-,root,root,-)
%doc AUTHORS COPYING README README.ConnectionManagers NEWS
%{_sysconfdir}/gconf/schemas/%{name}.schemas
%{_sysconfdir}/gconf/schemas/GNOME_Megaphone_Applet.schemas
%{_bindir}/empathy
%{_bindir}/empathy-accounts
%{_bindir}/empathy-logs
%{_datadir}/empathy/
%{_datadir}/applications/fedora-%{name}.desktop
%{_datadir}/gnome/help/%{name}/
%{_datadir}/omf/%{name}/
%{_datadir}/icons/hicolor/*/apps/%{name}*
## Support for these are through Haze, and it (telepathy-haze-mission-control
## package) provides its own profiles with greater "out of the box"
## functionality, such as a slightly more sensible configuration UI with
## proper by-default login server settings from Pidgin.
%exclude %{_datadir}/mission-control/profiles/aim.profile
%exclude %{_datadir}/mission-control/profiles/icq.profile
%exclude %{_datadir}/mission-control/profiles/msn-haze.profile
%exclude %{_datadir}/mission-control/profiles/yahoo.profile
%{_datadir}/mission-control/profiles/ekiga.profile
%{_datadir}/mission-control/profiles/fwd.profile
%{_datadir}/mission-control/profiles/gtalk.profile
%{_datadir}/mission-control/profiles/groupwise.profile
%{_datadir}/mission-control/profiles/irc.profile
%{_datadir}/mission-control/profiles/jabber.profile
%{_datadir}/mission-control/profiles/msn.profile
%{_datadir}/mission-control/profiles/salut.profile
%{_datadir}/mission-control/profiles/sofiasip.profile
%{_datadir}/mission-control/profiles/sipphone.profile
%{_libexecdir}/megaphone-applet
%{_libexecdir}/nothere-applet
%{_libdir}/bonobo/servers/GNOME_Megaphone_Applet.server
%{_libdir}/bonobo/servers/GNOME_NotHere_Applet.server

%files	libs
%defattr(-,root,root,-)
%{_libdir}/libempathy*.so.*
%exclude %{_libdir}/*.a

%files	devel
%defattr(-,root,root,-)
%{_includedir}/libempathy*/
%{_libdir}/libempathy*.so
%{_libdir}/pkgconfig/libempathy*.pc
%{_datadir}/gtk-doc/html/libempathy*

%files	python
%defattr(-,root,root,-)
%{python_sitearch}/empathy*.so
%exclude %{python_sitearch}/*.a

%changelog
* Sun May  4 2008 Brian Pepple <bpepple@fedoraproject.org> - 0.23.1-2
- Drop multiple copies of COPYING file.
- Drop BR on gnome-vfs2-devel.
- Require telepathy-stream-engine for VOIP support.
- Add BR on iso-codes-devel, so spell-checking is enabled.

* Wed Apr 23 2008 Peter Gordon <peter@thecodergeek.com> - 0.23.1-1
- Update to new upstream release (0.23.1)
- Drop libtelepathy dependencies; upstream switched fully to telepathy-glib.

* Fri Apr 11 2008 Peter Gordon <peter@thecodergeek.com> - 0.22.1-1
- Update to new upstream release (0.22.1)

* Mon Mar 10 2008 Peter Gordon <peter@thecodergeek.com> - 0.22.0-1
- Update to new upstream release (0.22.0)

* Sun Mar 09 2008 Peter Gordon <peter@thecodergeek.com> - 0.21.91-1
- Update to new upstream release (0.21.91)

* Fri Feb 22 2008 Peter Gordon <peter@thecodergeek.com> - 0.21.90-1
- Update to new upstream release (0.21.90)

* Tue Feb 19 2008 Fedora Release Engineering <rel-eng@fedoraproject.org> - 0.21.4-2
- Autorebuild for GCC 4.3

* Mon Dec 17 2007 Peter Gordon <peter@thecodergeek.com> - 0.21.4-1
- Update to new upstream release (0.21.4)

* Tue Nov 13 2007 Peter Gordon <peter@thecodergeek.com> - 0.21.2-1
- Update to new upstream release (0.21.2)
- Drop backported drag-and-drop patch (fixed upstream):
    - svn380-fix-contact-DnD.patch
- Update README.ConnectionManagers: Include Haze package note, remove Galago
  note (a feed-only connection manager isn't useful for instant messaging),
  and fix some wording.

* Fri Oct 19 2007 Peter Gordon <peter@thecodergeek.com> - 0.14-5
- Backport upstream patch to fixes crashes when using drag-and-drop of a
  contact from the buddy list to the current conversation window to initiate a
  conversation:
    + svn380-fix-contact-DnD.patch 
- Resolves: GNOME bug 483168 (crash in Empathy Instant Messenger: I had
  dragged a contact ...) 

* Tue Oct 16 2007 Peter Gordon <peter@thecodergeek.com> - 0.14-4
- Depend on Salut and Gabble to enable XMPP by default. Otherwise, Empathy
  is essentially useless due to the need to install an external connection
  manager. Also, add a README.ConnectionManagers to the installed
  documentation which lists other possibilities.
- Resolves: bug 308871 (Make empathy dependent at least on telepathy-gabble)
  and bug 334221 (Default empathy install is useless).

* Wed Oct 10 2007 Peter Gordon <peter@thecodergeek.com> - 0.14-3
- Enable VoIP support for those brave enough to test/break/debug it (F9+
  only). Though it is functional, it is still deemed rather unstable by
  upstream. Use it at your own risk. :)

* Tue Oct 02 2007 Peter Gordon <peter@thecodergeek.com> - 0.14-2
- Disable VoIP support at this time, since it is deemed unstable by upstream
  for now. (Thanks to Brian Pepple for the notice.)
  
* Tue Oct 02 2007 Peter Gordon <peter@thecodergeek.com> - 0.14-1
- Update to new upstream release (0.14).

* Sun Sep 30 2007 Peter Gordon <peter@thecodergeek.com> - 0.13-1
- Update to new upstream release (0.13), which adds a panel applet (Megaphone)
  and python bindings.
- Split shared libraries into a libs subpackage for easier handling
  in multi-lib environments.

* Fri Aug 31 2007 Peter Gordon <peter@thecodergeek.com> - 0.12-2
- Add ldconfig invocations to %%post and %%postun scriptlets.

* Fri Aug 31 2007 Peter Gordon <peter@thecodergeek.com> - 0.12-1
- Update to new upstream release (0.12).
- Build against new mission-control stack.
- Update License tag (GPLv2+).
- Alphabetize BuildRequires list (aesthetic-only change).

* Wed Aug 29 2007 Fedora Release Engineering <rel-eng at fedoraproject dot org> - 0.8-2
- Rebuild for selinux ppc32 issue.

* Mon Aug 13 2007 Peter Gordon <peter@thecodergeek.com> - 0.11-1
- Update to new upstream release (0.11)

* Fri Jun 22 2007 David Nielsen <david@lovesunix.net> - 0.8-1
- bump to 0.8
- Now with aspell support (deat to teh speeling mistaks)

* Sat Jun  9 2007 David Nielsen <david@lovesunix.net> - 0.7-1
- bump to 0.7

* Mon Jun  4 2007 David Nielsen <david@lovesunix.net> - 0.6-3
- Add telepathy-filesystem to Requires
- Move .desktop from autostart to applications
- Nasty hackery to make empathy launch from the menu

* Mon Jun  4 2007 David Nielsen <david@lovesunix.net> - 0.6-2
- Add gettext to BuildRequires

* Fri Jun  1 2007 David Nielsen <david@lovesunix.net> - 0.6-1
- Bump to 0.6

* Fri Jun  1 2007 David Nielsen <david@lovesunix.net> - 0.5-2
- Let Empathy own the directory and not just the files in it

* Tue May 30 2007 David Nielsen <david@lovesunix.net> - 0.5-1
- Initial package