File telegram-purple.spec of Package telegram-purple

#
# spec file for package telegram-purple
#
# Copyright (c) 2016 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/
#

Name:           telegram-purple
Version:        1.3.0
Release:        1
License:        GPL-2.0+
Summary:        Purple plugin for telegram
Url:            https://github.com/majn/telegram-purple
Group:          Productivity/Networking/Instant Messenger
Source0:        %{name}-%{version}.tar.xz
# PATCH-FIX-UPSTREAM telegram-purple-git-check.patch hillwood@opensuse.org
# Fix git version check error.
Patch0:         %{name}-git-check.patch
BuildRequires:  xz
%if 0%{?fedora} >= 24
BuildRequires:  pkgconfig
%else
BuildRequires:  pkg-config
%endif
BuildRequires:  gettext
BuildRequires:  libgcrypt-devel >= 1.6.0
BuildRequires:  pkgconfig(purple)
BuildRequires:  pkgconfig(zlib)
BuildRequires:  pkgconfig(libwebp)
BuildRoot:      %{_tmppath}/%{name}-%{version}-build

%description
Telegram-purple is a Libpurple protocol plugin that adds support for 
the Telegram messenger.

%package -n purple-plugin-telegram
Summary:        Pidgin plugin for telegram
Group:          Productivity/Networking/Instant Messenger

%description -n purple-plugin-telegram
Telegram-purple is a Libpurple protocol plugin that adds support for 
the Telegram messenger.

%prep
%setup -q -n %{name}-%{version}
%patch0 -p1

%build
%configure

make %{?_smp_mflags}
 
%install
%make_install

%find_lang %{name}

# Fix permissions
chmod 0644 AUTHORS HACKING.md HACKING.BUILD.md README.md CHANGELOG.md COPYING

%post  -p /sbin/ldconfig

%postun -p /sbin/ldconfig

%files -n purple-plugin-telegram -f %{name}.lang
%defattr(-, root, root)
%doc AUTHORS HACKING.md HACKING.BUILD.md README.md CHANGELOG.md COPYING
%dir %{_libdir}/purple-2
%dir %{_datadir}/appdata
%dir %{_sysconfdir}/%{name}
%config %{_sysconfdir}/%{name}/server.tglpub
%{_libdir}/purple-2/%{name}.so
%{_datadir}/appdata/%{name}.metainfo.xml
%dir %{_datadir}/pixmaps/pidgin
%dir %{_datadir}/pixmaps/pidgin/protocols
%dir %{_datadir}/pixmaps/pidgin/protocols/*
%{_datadir}/pixmaps/pidgin/protocols/*/telegram.png

%changelog
openSUSE Build Service is sponsored by