File pidgin-sipe.spec of Package pidgin-sipe

#
# spec file for package pidgin-sipe
#
# Copyright (c) 2013 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/
#


%define build_telepathy 1

Name:           pidgin-sipe
Version:        1.14.1
Release:        0
# FIXME: enable telepathy plugin when it'll be available (not in 1.11.0)
Summary:        Pidgin protocol plugin to connect to MS Office Communicator
License:        GPL-2.0+
Group:          Productivity/Networking/Instant Messenger
Url:            http://sipe.sourceforge.net/
Source:         http://downloads.sourceforge.net/project/sipe/sipe/pidgin-sipe-1.14.1/%{name}-%{version}.tar.bz2
BuildRequires:  gettext-devel
BuildRequires:  glib2-devel >= 2.12.0
BuildRequires:  gmime-devel
BuildRequires:  intltool
BuildRequires:  krb5-devel
BuildRequires:  libpurple-devel >= 2.4.0
BuildRequires:  libtool
# For directory ownership
BuildRequires:  pidgin
BuildRequires:  translation-update-upstream
%if 0%{?suse_version} > 1140
# Put gstreamer in the %%if too, since it's only checked if we have libnice
BuildRequires:  pkgconfig(gstreamer-0.10)
BuildRequires:  pkgconfig(nice) >= 0.1.0
%endif
BuildRequires:  pkgconfig(nss)
%if %{build_telepathy}
BuildRequires:  pkgconfig(telepathy-glib) >= 0.18.0
%endif
Requires:       libpurple-plugin-sipe = %{version}
Requires:       pidgin
Supplements:    packageand(libpurple-plugin-sipe:pidgin}
BuildRoot:      %{_tmppath}/%{name}-%{version}-build

%description
A third-party plugin for the Pidgin multi-protocol instant messenger.
It implements the extended version of SIP/SIMPLE used by various products:

    * Microsoft Office Communications Server (OCS 2007/2007 R2 and newer)
    * Microsoft Live Communications Server (LCS 2003/2005)
    * Reuters Messaging

With this plugin you should be able to replace your Microsoft Office
Communicator client with Pidgin.

This package provides the icon set for Pidgin.

%package -n libpurple-plugin-sipe
Summary:        Libpurple third-party plugin for Microsoft LCS/OCS
Group:          Productivity/Networking/Instant Messenger
Enhances:       libpurple

%description -n libpurple-plugin-sipe
A third-party plugin for the libpurple multi-protocol instant messaging core.
It implements the extended version of SIP/SIMPLE used by various products:

    * Microsoft Office Communications Server (OCS 2007/2007 R2 and newer)
    * Microsoft Live Communications Server (LCS 2003/2005)
    * Reuters Messaging

%if %{build_telepathy}

%package -n telepathy-plugin-sipe

Summary:        Microsoft LCS/OCS connection manager for Telepathy
Group:          Productivity/Networking/Instant Messenger

%description -n telepathy-plugin-sipe
A third-party connection manager for the telepathy multi-protocol instant
messaging core. It implements the extended version of SIP/SIMPLE used by
various products:

    * Microsoft Office Communications Server (OCS 2007/2007 R2 and newer)
    * Microsoft Live Communications Server (LCS 2003/2005)
    * Reuters Messaging
%endif

%prep
%setup -q
translation-update-upstream

%build
%{?env_options}
%configure \
        --with-krb5 \
        --enable-purple \
%if %{build_telepathy}
        --enable-telepathy
%else
        --disable-telepathy
%endif
make %{_smp_mflags}

%install
%makeinstall
find %{buildroot} -type f -name "*.la" -delete -print
# SLES11 defines suse_version = 1110
%if 0%{?suse_version} && 0%{?suse_version} < 1120
rm -r %{buildroot}/%{_datadir}/pixmaps/pidgin/protocols/scalable
%endif
%find_lang %{name}

%check
make check

%clean
rm -rf %{buildroot}

%files -n libpurple-plugin-sipe -f %{name}.lang
%defattr(-,root,root,-)
%doc AUTHORS ChangeLog COPYING NEWS README TODO
%{_libdir}/purple-2/libsipe.so

%files
%defattr(-,root,root,-)
%doc AUTHORS COPYING
%dir %{_datadir}/pixmaps/pidgin/protocols/24
%dir %{_datadir}/pixmaps/pidgin/protocols/32
%{_datadir}/pixmaps/pidgin/protocols/*/sipe.png
# SLES11 defines suse_version = 1110
%if !0%{?suse_version} || 0%{?suse_version} >= 1120
%{_datadir}/pixmaps/pidgin/protocols/*/sipe.svg
%endif

%if %{build_telepathy}

%files -n telepathy-plugin-sipe
%defattr(-, root, root)
%{_libexecdir}/telepathy-sipe
%{_datadir}/dbus-1/services/org.freedesktop.Telepathy.ConnectionManager.sipe.service
%{_datadir}/empathy/
%{_datadir}/telepathy/
%endif}

%changelog
openSUSE Build Service is sponsored by