File pidgin.spec of Package pidgin
#
# spec file for package pidgin
#
# Copyright (c) 2012 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
%if 0%{?suse_version} > 1010 && 0%{?suse_version} < 1140
%define with_mono 1
%else
%define with_mono 0
%endif
%define with_evolution 0%{?suse_version} <= 1220
Name: pidgin
Summary: Multiprotocol Instant Messaging Client
License: GPL-2.0+
Group: Productivity/Networking/Instant Messenger
Version: 2.10.6
Release: 0
# FIXME: Remove unconditional --disable-vv parameter from configure once pidgin is ported to farstream 0.2
Url: http://www.pidgin.im/
Source: http://downloads.sourceforge.net/project/pidgin/Pidgin/%{version}/%{name}-%{version}.tar.bz2
Source1: pidgin-NLD-smiley-theme.tar.bz2
Source2: pidgin-Tango-smiley-theme.tar.bz2
Source3: pidgin-prefs.xml
Patch1: pidgin-gnome-keyring.patch
Patch3: pidgin-nonblock-common.patch
Patch4: pidgin-nonblock-gwim.patch
Patch5: pidgin-nonblock-common2.patch
# PATCH-FIX-UPSTREAM pidgin-mono-buildfix.patch http://developer.pidgin.im/ticket/12506 dimstar@opensuse.org -- Fix build with mono plugin loader; missing include statements.
Patch14: pidgin-mono-buildfix.patch
# PATCH-FIX-OPENSUSE pidgin-fix-perl-build.patch vuntz@opensuse.org -- Revert http://developer.pidgin.im/viewmtn/revision/info/f32151852a00fb5abd3fdccdd8df2419031666de as it breaks the build
Patch15: pidgin-fix-perl-build.patch
# Can use external libzephyr
BuildRequires: cyrus-sasl-devel
BuildRequires: dbus-1-devel
BuildRequires: doxygen
%if %{?with_evolution}
BuildRequires: evolution-data-server-devel
%endif
BuildRequires: libtool
%if %suse_version > 1110 && %suse_version <= 1210
BuildRequires: farsight2-devel
%endif
%if %suse_version > 1210
BuildRequires: farstream-devel
%endif
BuildRequires: gconf2-devel
%if %suse_version < 1020
BuildRequires: gnome-icon-theme
%endif
BuildRequires: graphviz
BuildRequires: gtk-doc
BuildRequires: gtkspell-devel
BuildRequires: intltool
BuildRequires: libidn-devel
%if %{suse_version} > 1030
BuildRequires: libgadu-devel
%endif
# There is no way to discriminate openSUSE 11.1 and SLE11. That is why we recognize openSUSE 11.1 as SLE.
# Ugly, but there is no other way. (bnc#566286#c17).
%if %suse_version == 1110
%define building_for_sle_ge_11 1
%else
%define building_for_sle_ge_11 0
%endif
# gnome-keyring support summary (bnc#566286):
# SLE10, 11.0, 11.1: patch present and broken (does nothing)
# SLE11: patch present and active (bnc#569025)
# 11.2: patch was present and active removed by an opdate
# 11.3 and above: patch not applied
# For openSUSE, it's better to avoid this patch:
# + does not work well outside GNOME
# - passwords are stored in readable form
%if 0%{?suse_version} > 1120
%if 0%{?building_for_sle_ge_11}
BuildRequires: libgnome-keyring-devel
%endif
%else
%if 0%{?building_for_sle_ge_11}
BuildRequires: gnome-keyring-devel
%endif
%endif
BuildRequires: libstdc++-devel
BuildRequires: libxml2-devel
BuildRequires: libxslt
%if %suse_version >= 1030
# Versions in older SUSE products are too old:
BuildRequires: meanwhile-devel
%endif
BuildRequires: mono-devel
BuildRequires: mozilla-nspr-devel
BuildRequires: mozilla-nss-devel
BuildRequires: ncurses-devel
%if %suse_version > 1020
BuildRequires: openssl-certs
%endif
%if %suse_version > 1030
%if %suse_version < 1120
# missing in silc-toolkit-devel:
BuildRequires: pam-devel
%endif
%endif
BuildRequires: python
BuildRequires: startup-notification-devel
BuildRequires: tk-devel
%if %suse_version > 1110
BuildRequires: translation-update-upstream
%endif
BuildRequires: NetworkManager-devel
BuildRequires: update-desktop-files
%if %suse_version > 1030
BuildRequires: gstreamer-0_10-devel
BuildRequires: gstreamer-0_10-plugins-base-devel
%else
BuildRequires: gstreamer010-devel
BuildRequires: gstreamer010-plugins-base-devel
%endif
%if %suse_version > 1020
BuildRequires: dbus-1-glib-devel
BuildRequires: silc-toolkit-devel
%else
BuildRequires: dbus-1-devel
BuildRequires: dbus-1-glib
%endif
%if %suse_version > 1020
BuildRequires: fdupes
%endif
BuildRequires: libnotify-devel
%if %suse_version > 1030
BuildRequires: libavahi-glib-devel
%else
BuildRequires: avahi-devel
BuildRequires: avahi-glib
%endif
%if %suse_version > 1210
# Explicit BuildRequires needed after big xorg-x11 packaging change in 12.2
BuildRequires: libSM-devel
BuildRequires: libXScrnSaver-devel
BuildRequires: libXext-devel
BuildRequires: pkgconfig(x11)
%endif
%if %suse_version > 1020
Requires: openssl-certs
%endif
Requires: perl-base = %{perl_version}
BuildRoot: %{_tmppath}/%{name}-%{version}-build
# Existed before 10.3 and SLED10 before SP2:
Obsoletes: gaim <= 1.5.0
# Has never been in SuSE:
Obsoletes: gaim-applet
# Was only in the Build Service after 10.2:
Obsoletes: gaim-unstable < 2.0.0
Provides: gaim
%if ! (%{with_evolution})
# If we can't build evolution, let's obsolete it for clean installations.
Obsoletes: %{name}-evolution <= %{version}
%endif
%if %suse_version <= 1021
%define _prefix /opt/gnome
%define _libdir %{_prefix}/%{_lib}
%define _datadir %{_prefix}/share
%define _sysconfdir /etc%_prefix
BuildRequires: gconf2-rpm-macros
%endif
%gconf_schemas_prereq
%description
Pidgin is a chat program which lets you log in to accounts on multiple
chat networks simultaneously.
Pidgin is compatible with the following chat networks out of the box:
AIM, ICQ, Google Talk, Jabber/XMPP, MSN Messenger, Yahoo!, Bonjour,
Gadu-Gadu, IRC, Novell GroupWise Messenger, QQ, Lotus Sametime, SILC,
SIMPLE, MXit, MySpaceIM, and Zephyr. It can support many more with
plugins.
%package devel
#'
Summary: Development Headers, Documentation, and Libraries for Pidgin
Group: Productivity/Networking/Instant Messenger
Requires: %{name} = %{version}
Requires: glib2-devel
Requires: gtk2-devel
Requires: libpurple-devel = %{version}
%package -n libpurple
Summary: GLib-based Instant Messenger Library
Group: System/Libraries
# Not really required, but standard Jabber accounts require it, if compiled with SASL support.
Requires: cyrus-sasl-digestmd5
Requires: cyrus-sasl-plain
# Needed for purple-url-handler:
Requires: dbus-1-python
Requires: perl = %{perl_version}
%if %suse_version > 1020
Requires: openssl-certs
%endif
%if %suse_version > 1030
Recommends: libpurple-lang
%endif
%package -n libpurple-devel
Summary: Development Headers, Documentation, and Libraries for libpurple
Group: Productivity/Networking/Instant Messenger
Requires: NetworkManager-devel
Requires: NetworkManager-glib
Requires: glib2-devel
Requires: libpurple = %{version}
Requires: libxml2-devel
%if 0%{?suse_version} > 1120
%if 0%{?building_for_sle_ge_11}
Requires: libgnome-keyring-devel
%endif
%else
%if 0%{?building_for_sle_ge_11}
Requires: gnome-keyring-devel
%endif
%endif
Requires: pkg-config
Provides: gaim-devel = %{version}
Obsoletes: gaim-devel <= 1.5.0
Provides: gaim-unstable-devel = %{version}
Obsoletes: gaim-unstable-devel < 2.0.0
%if %suse_version >= 1030
%package -n libpurple-meanwhile
Summary: Lotus Sametime Plugin for Pidgin Using the Meanwhile Library
Group: Productivity/Networking/Instant Messenger
Requires: libpurple = %{version}
%endif
%if %with_evolution
%package evolution
Summary: Evolution integration plugin for Pidgin
Group: Productivity/Networking/Instant Messenger
Requires: %{name} = %{version}
Supplements: packageand(%{name}:evolution-data-server)
%endif
%if %with_mono
%package -n libpurple-mono
Summary: Mono .NET Plugin Support for Pidgin
Group: Productivity/Networking/Instant Messenger
Requires: libpurple = %{version}
%endif
%package -n libpurple-tcl
Summary: TCL Plugin Support for Pidgin
Group: Productivity/Networking/Instant Messenger
Requires: libpurple = %{version}
Supplements: packageand(libpurple:tcl)
%package -n finch
Summary: Text-Based User Interface for Pidgin Instant Messaging Client
Group: Productivity/Networking/Instant Messenger
Requires: libpurple = %{version}
Obsoletes: gaim-unstable-text < 2.0.0
Provides: gaim-unstable-text
%package -n finch-devel
Summary: Headers etc. for finch Stuffs
Group: Productivity/Networking/Instant Messenger
Requires: finch = %{version}
Requires: glib2-devel
Requires: glibc-devel
Requires: libpurple-devel = %{version}
Requires: ncurses-devel
Requires: pkg-config
Obsoletes: gaim-unstable-text-devel
%if 0%{?suse_version} > 1140
%package -n libpurple-branding-upstream
Summary: GLib-based Instant Messenger Library -- Upstream default configuration
Group: System/Libraries
Requires: libpurple = %{version}
Provides: libpurple-branding = %{version}
Conflicts: otherproviders(libpurple-branding)
Supplements: packageand(libpurple:branding-upstream)
# It also provides pidgin branding
Provides: pidgin-branding = %{version}
Provides: pidgin-branding-upstream = %{version}
Conflicts: otherproviders(pidgin-branding)
Supplements: packageand(pidgin:branding-upstream)
BuildArch: noarch
#BRAND: Provides /etc/purple/prefs.xml, the default configuration for
#BRAND: libpurple, and libpurple-based clients.
%endif
%description devel
The pidgin-devel package contains the header files, developer
documentation, and libraries required for development of Pidgin scripts
and plugins.
%description -n libpurple
libpurple is a library intended to be used by programmers seeking
to write an IM client that connects to many IM networks.
libpurple is compatible with the following chat networks out of the box:
AIM, ICQ, Google Talk, Jabber/XMPP, MSN Messenger, Yahoo!, Bonjour,
Gadu-Gadu, IRC, Novell GroupWise Messenger, QQ, Lotus Sametime, SILC,
SIMPLE, MXit, MySpaceIM, and Zephyr. It can support many more with
plugins.
%description -n libpurple-devel
The libpurple-devel package contains the header files, developer
documentation, and libraries required for development of libpurple
based instant messaging clients or plugins for any libpurple based
client.
%if %suse_version >= 1030
%description -n libpurple-meanwhile
Lotus Sametime plugin for Pidgin using the Meanwhile library.
%endif
%if %with_evolution
%description evolution
Evolution integration plugin for Pidgin
%endif
%if %with_mono
%description -n libpurple-mono
Mono plugin loader for Pidgin. This package will allow you to write or
use Pidgin plugins written in the .NET programming language.
%endif
%description -n libpurple-tcl
TCL plugin loader for Pidgin. This package will allow you to write or
use Pidgin plugins written in the TCL programming language.
%description -n finch
A text-based user interface for using libpurple. This can be run from
a standard text console or from a terminal within X Windows. It uses
ncurses and our homegrown gnt library for drawing windows and text.
%description -n finch-devel
The finch-devel package contains the header files, developer
documentation, and libraries required for development of Finch scripts
and plugins.
%if 0%{?suse_version} > 1140
%description -n libpurple-branding-upstream
libpurple is a library intended to be used by programmers seeking
to write an IM client that connects to many IM networks.
libpurple is compatible with the following chat networks out of the box:
AIM, ICQ, Google Talk, Jabber/XMPP, MSN Messenger, Yahoo!, Bonjour,
Gadu-Gadu, IRC, Novell GroupWise Messenger, QQ, Lotus Sametime, SILC,
SIMPLE, MXit, MySpaceIM, and Zephyr. It can support many more with
plugins.
This package provides the openSUSE default configuration for Pidgin.
%endif
%if %suse_version > 1030
%lang_package -n libpurple
%endif
%prep
%setup -q -a1 -a2
%if %suse_version > 1110
translation-update-upstream
%endif
%if 0%{?building_for_sle_ge_11}
%patch1 -p1
%endif
%patch3 -p1
%patch4 -p1
%patch5 -p1
%patch14 -p1
%patch15 -p1
# Change Myanmar/Myanmar to Myanmar:
rename my_MM my po/my_MM.*
%{__sed} -i "/ALL_LINGUAS/s/ my_MM / my /" configure.ac
%build
export CFLAGS="$RPM_OPT_FLAGS -fstack-protector -fPIC"
export CXXFLAGS="$RPM_OPT_FLAGS -fstack-protector -fPIC"
export FFLAGS="$RPM_OPT_FLAGS -fstack-protector -fPIC"
export LDFLAGS="-pie"
autoreconf -fi
%configure\
--disable-static\
--disable-schemas-install\
%if %suse_version < 1120
--disable-vv\
%endif
--enable-plugins\
--enable-cyrus-sasl\
--enable-dbus\
%if %with_mono
--enable-mono\
%else
--disable-mono\
%endif
%if %with_evolution
--enable-gevolution\
%endif
--enable-gstreamer\
%if 0%{?building_for_sle_ge_11}
--enable-gnome-keyring\
%endif
--enable-nm\
--enable-dbus\
--enable-devhelp\
%if %suse_version < 1030
--disable-meanwhile\
%endif
--disable-vv\
--with-tclconfig=%{_libdir}\
--with-tkconfig=%{_libdir}\
--with-system-ssl-certs=/etc/ssl/certs
# make sure all subprojects are built with verbose output
export V=1
# Mono bindings sometimes fail with parallel build enabled in pidgin-2.5.5:
#%{__make} %{?jobs:-j%jobs}
%{__make}
%install
%{makeinstall}
install -d %{buildroot}%{_sysconfdir}/purple
%if 0%{?suse_version} > 1140
cp %{SOURCE3} %{buildroot}%{_sysconfdir}/purple/prefs.xml
%endif
%{perl_process_packlist}
%suse_update_desktop_file -N Pidgin -G "Instant Messenger" %{name}
# Provide only upstream emotes in openSUSE >= 11.2 and SLE > 11 (see bnc#569271#c1):
%if %suse_version < 1120
cp -a NLD $RPM_BUILD_ROOT%{_prefix}/share/pixmaps/pidgin/emotes
cp -a Tango $RPM_BUILD_ROOT%{_prefix}/share/pixmaps/pidgin/emotes
%endif
%{__rm} $RPM_BUILD_ROOT%{_libdir}/*.la $RPM_BUILD_ROOT%{_libdir}/*/*.la
%{__rm} -f $RPM_BUILD_ROOT%{perl_archlib}/perllocal.pod
%{__rm} -f $RPM_BUILD_ROOT%{_prefix}/lib/perl*/*/perllocal.pod
# FIXME: Should be nonversioned name:
test -L $RPM_BUILD_ROOT%{_libdir}/purple-2/liboscar.so && %{__rm} $RPM_BUILD_ROOT%{_libdir}/purple-2/liboscar.so
test -L $RPM_BUILD_ROOT%{_libdir}/purple-2/libjabber.so && %{__rm} $RPM_BUILD_ROOT%{_libdir}/purple-2/libjabber.so
test -L $RPM_BUILD_ROOT%{_libdir}/purple-2/libymsg.so && %{__rm} $RPM_BUILD_ROOT%{_libdir}/purple-2/libymsg.so
find $RPM_BUILD_ROOT -type f -name .packlist -exec %{__rm} {} ';'
find $RPM_BUILD_ROOT -type f -name '*.bs' -empty -exec %{__rm} {} ';'
%find_lang %{name} %{?no_lang_C}
find $RPM_BUILD_ROOT%{_libdir}/purple-2 -xtype f -print | \
%{__sed} "s@^$RPM_BUILD_ROOT@@g" | \
%{__grep} -v /libsametime.so | \
%{__grep} -v /mono.so | \
%{__grep} -v /tcl.so | \
%{__grep} -v ".dll$" > %{name}-%{version}-purpleplugins
find $RPM_BUILD_ROOT%{_libdir}/pidgin -maxdepth 1 -xtype f -print | \
%{__sed} "s@^$RPM_BUILD_ROOT@@g" | \
%{__grep} -v /gevolution.so > %{name}-%{version}-pidginplugins
find $RPM_BUILD_ROOT%{_libdir}/finch -maxdepth 1 -xtype f -print | \
%{__sed} "s@^$RPM_BUILD_ROOT@@g" > %{name}-%{version}-finchplugins
%find_gconf_schemas
%{__cat} %{name}.schemas_list %{name}-%{version}-pidginplugins >%{name}.lst
%if %suse_version <= 1030
%{__cat} %{name}.lang >>%{name}-%{version}-purpleplugins
%endif
%if %suse_version > 1020
%fdupes $RPM_BUILD_ROOT
%endif
%clean
%{__rm} -rf $RPM_BUILD_ROOT
%pre -f %{name}.schemas_pre
%posttrans -f %{name}.schemas_posttrans
%preun -f %{name}.schemas_preun
%if 0%{?suse_version} > 1130
%post
%desktop_database_post
%icon_theme_cache_post
%endif
%if 0%{?suse_version} > 1130
%postun
%desktop_database_postun
%icon_theme_cache_postun
%endif
%post -n libpurple -p /sbin/ldconfig
%postun -n libpurple -p /sbin/ldconfig
%post -n finch -p /sbin/ldconfig
%postun -n finch -p /sbin/ldconfig
%files -f %{name}.lst
%defattr(-,root,root)
%doc AUTHORS COPYING COPYRIGHT ChangeLog NEWS README README.MTN doc/the_penguin.txt
%dir %{_libdir}/pidgin
%{_libdir}/pidgin/perl
%{_bindir}/pidgin
%{_datadir}/pixmaps/pidgin
%{_datadir}/icons/hicolor/*/apps/pidgin.*
%{_datadir}/applications/*.desktop
%{_datadir}/sounds/purple
%doc %{_mandir}/man1/pidgin.*
%if %suse_version < 1020
/var/adm/perl-modules/pidgin
# man3 is not part of gnome-filesystem
%doc %dir %{_mandir}/man3
%endif
%files devel
%defattr(-,root,root)
%{_includedir}/pidgin
%{_libdir}/pkgconfig/pidgin.pc
%doc %{_mandir}/man3/Pidgin.*
%if %with_evolution
%files evolution
%defattr(-, root, root)
%{_libdir}/pidgin/gevolution.so
%endif
%files -n libpurple -f %{name}-%{version}-purpleplugins
%defattr(-, root, root)
%doc libpurple/purple-notifications-example
%dir %{_sysconfdir}/purple/
%{_bindir}/purple-client-example
%{_bindir}/purple-remote
%{_bindir}/purple-send
%{_bindir}/purple-send-async
%{_bindir}/purple-url-handler
%{_datadir}/purple
%{_libdir}/libpurple.so.*
%{_libdir}/libpurple-client.so.*
%dir %{_libdir}/purple-2
%{_libdir}/purple-2/perl
%if %suse_version > 1030
%files -n libpurple-lang -f %{name}.lang
%endif
%defattr(-, root, root)
# These locales are not yet included in respective products:
%if %suse_version < 1140
# See https://bugzilla.novell.com/show_bug.cgi?id=659001
%dir %{_datadir}/locale/mhr
%dir %{_datadir}/locale/mhr/LC_MESSAGES
%endif
%if %suse_version <= 1120
%dir %{_datadir}/locale/ms_MY
%dir %{_datadir}/locale/ms_MY/LC_MESSAGES
%endif
%if %suse_version < 1110
%dir %{_datadir}/locale/sr@latin
%dir %{_datadir}/locale/sr@latin/LC_MESSAGES
%endif
%if %suse_version < 1020
%dir %{_datadir}/locale/be@latin
%dir %{_datadir}/locale/be@latin/LC_MESSAGES
%dir %{_datadir}/locale/ca@valencia
%dir %{_datadir}/locale/ca@valencia/LC_MESSAGES
%dir %{_datadir}/locale/my
%dir %{_datadir}/locale/my/LC_MESSAGES
%dir %{_datadir}/locale/oc
%dir %{_datadir}/locale/oc/LC_MESSAGES
%dir %{_datadir}/locale/ps
%dir %{_datadir}/locale/ps/LC_MESSAGES
%dir %{_datadir}/locale/si
%dir %{_datadir}/locale/si/LC_MESSAGES
%dir %{_datadir}/locale/sw
%dir %{_datadir}/locale/sw/LC_MESSAGES
%dir %{_datadir}/locale/ur
%dir %{_datadir}/locale/ur/LC_MESSAGES
%endif
%if %suse_version >= 1030
%files -n libpurple-meanwhile
%defattr(-, root, root)
%{_libdir}/purple-2/libsametime.*
%endif
%ifnarch ppc64
%if %suse_version > 1010
%if %with_mono
%files -n libpurple-mono
%defattr(-, root, root)
%{_libdir}/purple-2/mono.so
%{_libdir}/purple-2/*.dll
%endif
%endif
%endif
%files -n libpurple-tcl
%defattr(-, root, root)
%{_libdir}/purple-2/tcl.so
%files -n libpurple-devel
%defattr(-, root, root)
%doc ChangeLog.API HACKING PLUGIN_HOWTO
%{_includedir}/libpurple
%{_datadir}/aclocal/purple.m4
%{_libdir}/libpurple.so
%{_libdir}/libpurple-client.so
%{_libdir}/pkgconfig/purple.pc
%doc %{_mandir}/man3/Purple.*
%if %suse_version < 1020
# man3 is not part of gnome-filesystem
%doc %dir %{_mandir}/man3
%endif
%files -n finch -f %{name}-%{version}-finchplugins
%defattr(-, root, root)
%{_bindir}/finch
%{_libdir}/libgnt.so.*
%{_libdir}/gnt
%dir %{_libdir}/finch
%doc %{_mandir}/man1/finch.*
%files -n finch-devel
%defattr(-, root, root)
%{_includedir}/finch
%{_includedir}/gnt
%{_libdir}/libgnt.so
%{_libdir}/pkgconfig/finch.pc
%{_libdir}/pkgconfig/gnt.pc
%if 0%{?suse_version} > 1140
%files -n libpurple-branding-upstream
%defattr(-, root, root)
%{_sysconfdir}/purple/prefs.xml
%endif
%changelog