File skype4pidgin.spec of Package skype4pidgin

#
# spec file for package skype4pidgin
#
# Copyright (c) 2017 SUSE LINUX 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/
#


Name:           skype4pidgin
Version:        1.4
Release:        0
Summary:        Libpurple plugin for Skype API
License:        GPL-3.0+
Group:          Productivity/Networking/Instant Messenger
Url:            http://eion.robbmob.com/
Source:         https://github.com/EionRobb/%{name}/archive/%{version}.tar.gz#/%{name}-%{version}.tar.gz
# PATCH-FIX-OPENSUSE skype4pidgin-libdir.patch vuntz@opensuse.org -- Do not hardcode /usr/lib/.
Patch0:         skype4pidgin-libdir.patch
# PATCH-FIX-OPENSUSE skype4pidgin-icon-conflict.patch sor.alexei@meowr.ru -- Resolve icon naming conflict between plugins.
Patch1:         skype4pidgin-icon-conflict.patch
BuildRequires:  dbus-1-devel
BuildRequires:  glib2-devel
BuildRequires:  json-glib-devel
BuildRequires:  libpurple-devel
# For directory ownership.
BuildRequires:  pidgin
BuildRequires:  pkgconfig
BuildRequires:  xorg-x11-libX11-devel
BuildRequires:  zlib-devel
BuildRoot:      %{_tmppath}/%{name}-%{version}-build

%description
This is a Skype Plugin for libpurple/Pidgin. It lets you view
and chat with all your Skype buddies from within Pidgin.

%package -n libpurple-plugin-skype
Summary:        Libpurple plugin for Skype API
Group:          Productivity/Networking/Instant Messenger
Recommends:     skype
Enhances:       libpurple

%description -n libpurple-plugin-skype
This is a Skype Plugin for libpurple. It lets you view and chat
with all your Skype buddies from within Pidgin.

%package -n pidgin-plugin-skype
Summary:        Pidgin plugin for Skype API
Group:          Productivity/Networking/Instant Messenger
Requires:       libpurple-plugin-skype = %{version}
Enhances:       pidgin
Supplements:    packageand(libpurple-plugin-skype:pidgin}
# skype4pidgin was last used in openSUSE 12.1.
Provides:       %{name} = %{version}
Obsoletes:      %{name} < %{version}
%requires_ge    pidgin

%description -n pidgin-plugin-skype
This is a Skype Plugin for Pidgin. It lets you view and chat
with all your Skype buddies from within Pidgin.

%lang_package -n libpurple-plugin-skype

%package -n libpurple-plugin-skypeweb
Summary:        Libpurple plugin for SkypeWeb API
Group:          Productivity/Networking/Instant Messenger
Enhances:       libpurple

%description -n libpurple-plugin-skypeweb
This is a SkypeWeb Plugin for libpurple. It lets you view and chat
with all your Skype buddies from within Pidgin.

%package -n pidgin-plugin-skypeweb
Summary:        Pidgin plugin for SkypeWeb API
Group:          Productivity/Networking/Instant Messenger
Requires:       libpurple-plugin-skypeweb = %{version}
Enhances:       pidgin
Supplements:    packageand(libpurple-plugin-skypeweb:pidgin}
%requires_ge    pidgin

%description -n pidgin-plugin-skypeweb
This is a SkypeWeb Plugin for Pidgin. It lets you view and chat
with all your Skype buddies from within Pidgin.

%prep
%setup -q
%patch0 -p1
%patch1 -p1

%build
make all %{?_smp_mflags} V=1
make %{?_smp_mflags} V=1 -C skypeweb

%install
%make_install LIB=%{_lib}
%make_install -C skypeweb

# Manually install translations for libpurple-plugin-skype.
mkdir -p %{buildroot}%{_datadir}/locale/
ls po/ | while read file; do
    install -Dpm 0644 "po/$file" "%{buildroot}%{_datadir}/locale/${file/.mo}/LC_MESSAGES/%{name}.mo"
done
%find_lang %{name}

%files -n libpurple-plugin-skype
%defattr(-,root,root)
%doc CHANGELOG.txt COPYING.txt
%{_libdir}/purple-2/libskype.so
%{_libdir}/purple-2/libskype_dbus.so

%files -n libpurple-plugin-skype-lang -f %{name}.lang
%defattr(-,root,root)

%files -n libpurple-plugin-skypeweb
%defattr(-,root,root)
%doc COPYING.txt skypeweb/README.md
%{_libdir}/purple-2/libskypeweb.so

%files -n pidgin-plugin-skype
%defattr(-,root,root)
%doc CHANGELOG.txt COPYING.txt
%{_datadir}/pixmaps/pidgin/emotes/skype/
%{_datadir}/pixmaps/pidgin/protocols/*/skypelegacy.png
%{_datadir}/pixmaps/pidgin/protocols/*/skypelegacyout.png

%files -n pidgin-plugin-skypeweb
%defattr(-,root,root)
%doc COPYING.txt skypeweb/README.md
%{_datadir}/pixmaps/pidgin/protocols/*/skype.png
%{_datadir}/pixmaps/pidgin/protocols/*/skypeout.png

%changelog
openSUSE Build Service is sponsored by