SHA256
1
0
forked from pool/pidgin
pidgin/pidgin.spec

450 lines
15 KiB
RPMSpec
Raw Normal View History

#
# spec file for package pidgin
#
# Copyright (c) 2015 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/
#
%define _name Pidgin
Name: pidgin
Version: 2.10.11
Release: 0
Summary: Multiprotocol Instant Messaging Client
License: GPL-2.0+
Group: Productivity/Networking/Instant Messenger
Url: http://pidgin.im/
Source: http://downloads.sourceforge.net/project/pidgin/Pidgin/2.10.11/%{name}-%{version}.tar.gz
Source1: %{name}-prefs.xml
Patch0: %{name}-nonblock-common.patch
Patch1: %{name}-nonblock-gwim.patch
Patch2: %{name}-nonblock-common2.patch
Patch3: %{name}-gnome-keyring.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
Patch4: %{name}-fix-perl-build.patch
# PATCH-FIX-UPSTREAM pidgin-crash-missing-gst-registry.patch bnc#866455 pidgin.im#16224 cxiong@suse.com -- Fix crash when GST registry cache file is missing.
Patch6: pidgin-crash-missing-gst-registry.patch
Patch7: pidgin-2.10.11-send-video-enum.patch
# PATCH-FEATURE-UPSTREAM pidgin-2.10.11-gst-references.patch dimstar@opensuse.org -- http://hg.pidgin.im/pidgin/main/rev/b52be4fef1de
Patch8: pidgin-2.10.11-gst-references.patch
# PATCH-FEATURE-UPSTREAM pidgin-2.10.11-add-dtmf-support.patch dimstar@opensuse.org -- http://hg.pidgin.im/pidgin/main/rev/6b4576edf2a6
Patch9: pidgin-2.10.11-add-dtmf-support.patch
# PATCH-FEATURE-UPSTREAM pidgin-port-to-gst-1.0.patch dimstar@opensuse.org -- Port to GStreamer 1.0 / farstream 0.2; taken from https://pidgin.im/pipermail/devel/2015-March/023645.html
Patch10: pidgin-port-to-gst-1.0.patch
# PATCH-FIX-UPSTREAM pidgin-2.10.11-init-media-optional.patch dimstar@opensuse.org -- make "init-media" signal handler optional
Patch11: pidgin-2.10.11-init-media-optional.patch
# PATCH-FIX-UPSTREAM pidgin-2.10.11-private-media.patch dimstar@opensuse.org -- Add Private media API.
Patch12: pidgin-2.10.11-private-media.patch
# PATCH-FIX-UPSTREAM pidgin-2.10.11-application-media.patch dimstar@opensuse.org -- Add application media type and APIs, pidgin.im#16315
Patch13: pidgin-2.10.11-application-media.patch
BuildRequires: NetworkManager-devel
# Can use external libzephyr.
BuildRequires: cyrus-sasl-devel
BuildRequires: dbus-1-devel
BuildRequires: dbus-1-glib-devel
BuildRequires: doxygen
BuildRequires: fdupes
BuildRequires: gconf2-devel
BuildRequires: graphviz
BuildRequires: gtk-doc
BuildRequires: gtkspell-devel
BuildRequires: intltool
BuildRequires: libavahi-glib-devel
BuildRequires: libgadu-devel
BuildRequires: libgnutls-devel
BuildRequires: libidn-devel
BuildRequires: libnotify-devel
BuildRequires: libstdc++-devel
BuildRequires: libtool
BuildRequires: libxml2-devel
BuildRequires: libxslt
BuildRequires: meanwhile-devel
BuildRequires: mozilla-nspr-devel
BuildRequires: ncurses-devel
BuildRequires: python-devel
BuildRequires: silc-toolkit-devel
BuildRequires: startup-notification-devel
BuildRequires: tk-devel
BuildRequires: update-desktop-files
BuildRequires: pkgconfig(farstream-0.2)
BuildRequires: pkgconfig(gstreamer-1.0)
BuildRequires: pkgconfig(gstreamer-video-1.0)
Requires: perl-base = %{perl_version}
%if 0%{?suse_version} <= 1110
Recommends: %{name}-emoticons-nld
Recommends: %{name}-emoticons-tango
%endif
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%{gconf_schemas_prereq}
# gnome-keyring support summary (bnc#566286):
# 11.1 & SLE11: patch present and active (bnc#569025)
# 11.2 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} <= 1110
BuildRequires: gnome-keyring-devel
%endif
%if 0%{?suse_version} > 1210
BuildRequires: libSM-devel
BuildRequires: libX11-devel
BuildRequires: libXScrnSaver-devel
BuildRequires: libXext-devel
%endif
%if 0%{?suse_version} > 1210
BuildRequires: mozilla-nss-devel
%endif
%if 0%{?suse_version} >= 1230
BuildRequires: ca-certificates-mozilla
%else
BuildRequires: openssl-certs
%endif
%if 0%{?suse_version} < 1120
# Missing in silc-toolkit-devel.
BuildRequires: pam-devel
%endif
%if 0%{?suse_version} > 1110
BuildRequires: translation-update-upstream
%endif
%if 0%{?suse_version} >= 1230
Requires: ca-certificates-mozilla
%else
Requires: openssl-certs
%endif
Recommends: gstreamer-plugins-good
%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:
Jabber/XMPP, AIM, ICQ, Yahoo!, Bonjour, Gadu-Gadu, IRC, SILC, SIMPLE,
Novell GroupWise Messenger, Lotus Sametime, MXit, MySpaceIM,
and Zephyr. It can support many more with plugins.
%package devel
Summary: Development Headers, Documentation, and Libraries for Pidgin
Group: Development/Libraries/C and C++
Requires: %{name} = %{version}
Requires: glib2-devel
Requires: gtk2-devel
Requires: libpurple-devel = %{version}
%description devel
The pidgin-devel package contains the header files, developer
documentation, and libraries required for development of Pidgin scripts
and plugins.
%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}
Recommends: libpurple-lang = %{version}
%if 0%{?suse_version} >= 1230
Requires: ca-certificates-mozilla
%else
Requires: openssl-certs
%endif
%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:
Jabber/XMPP, AIM, ICQ, Yahoo!, Bonjour, Gadu-Gadu, IRC, SILC, SIMPLE,
Novell GroupWise Messenger, Lotus Sametime, MXit, MySpaceIM,
and Zephyr. It can support many more with plugins.
%lang_package -n libpurple
%package -n libpurple-devel
Summary: Development Headers, Documentation, and Libraries for libpurple
Group: Development/Libraries/C and C++
Requires: NetworkManager-devel
Requires: NetworkManager-glib
Requires: glib2-devel
Requires: libpurple = %{version}
Requires: libxml2-devel
Requires: pkg-config
%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.
%package -n libpurple-meanwhile
Summary: Sametime Plugin for Pidgin using the Meanwhile Library
Group: Productivity/Networking/Instant Messenger
Requires: libpurple = %{version}
%description -n libpurple-meanwhile
Lotus Sametime plugin for Pidgin using the Meanwhile library.
%package -n libpurple-tcl
Summary: TCL Plugin Support for Pidgin
Group: Productivity/Networking/Instant Messenger
Requires: libpurple = %{version}
Supplements: packageand(libpurple:tcl)
%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.
%package -n finch
Summary: Text-Based User Interface for Pidgin Instant Messaging Client
Group: Productivity/Networking/Instant Messenger
Requires: libpurple = %{version}
%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.
%package -n finch-devel
Summary: Headers etc. for finch Stuffs
Group: Development/Libraries/C and C++
Requires: finch = %{version}
Requires: glib2-devel
Requires: glibc-devel
Requires: libpurple-devel = %{version}
Requires: ncurses-devel
Requires: pkg-config
%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
%package -n libpurple-branding-upstream
Summary: GLib-based Instant Messenger Library -- Upstream default configuration
Group: System/Libraries
Requires: libpurple = %{version}
Supplements: packageand(libpurple:branding-upstream)
Provides: libpurple-branding = %{version}
BuildArch: noarch
Conflicts: otherproviders(libpurple-branding)
#BRAND: Provides /etc/purple/prefs.xml, the default configuration for
#BRAND: libpurple, and libpurple-based clients.
%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:
Jabber/XMPP, AIM, ICQ, Yahoo!, Bonjour, Gadu-Gadu, IRC, SILC, SIMPLE,
Novell GroupWise Messenger, Lotus Sametime, MXit, MySpaceIM,
and Zephyr. It can support many more with plugins.
This package provides the openSUSE default configuration for Pidgin.
%endif
%prep
%setup -q
%if 0%{?suse_version} > 1110
translation-update-upstream
%endif
%patch0 -p1
%patch1 -p1
%patch2 -p1
%patch3 -p1
%patch4 -p1
%if 0%{?suse_version} >= 1310
%patch6 -p1
%endif
%patch7 -p1
%patch8 -p1
%patch9 -p1
%patch10 -p1
%patch11 -p1
%patch12 -p1
%patch13 -p1
# Change Myanmar/Myanmar to Myanmar.
mv -f po/my_MM.po po/my.po
sed -i "/ALL_LINGUAS/s/ my_MM / my /" configure.ac
%build
export CFLAGS="%{optflags} -fstack-protector -fPIC"
export CXXFLAGS="%{optflags} -fstack-protector -fPIC"
export FFLAGS="%{optflags} -fstack-protector -fPIC"
export LDFLAGS="-pie"
autoreconf -fi
%configure \
--disable-static \
--disable-schemas-install \
--enable-plugins \
--enable-cyrus-sasl \
--enable-dbus \
--enable-gstreamer \
--with-gstreamer=1.0 \
%if 0%{?suse_version} <= 1110
--enable-gnome-keyring \
%endif
--enable-nm \
--enable-dbus \
--enable-devhelp \
--enable-vv \
--with-tclconfig=%{_libdir} \
--with-tkconfig=%{_libdir} \
--with-system-ssl-certs=%{_sysconfdir}/ssl/certs/
make %{?_smp_mflags}
%install
%make_install
mkdir -p %{buildroot}%{_sysconfdir}/purple/
%if 0%{?suse_version} > 1140
cp -f %{SOURCE1} %{buildroot}%{_sysconfdir}/purple/prefs.xml
%endif
%perl_process_packlist
find %{buildroot} -type f -name "perllocal.pod" -delete -print
find %{buildroot} -type f -name ".packlist" -delete -print
find %{buildroot} -type f -name "*.bs" -empty -delete -print
find %{buildroot} -type f -name "*.la" -delete -print
# FIXME: Should be nonversioned name.
for im in jabber oscar ymsg; do
if [ -L %{buildroot}%{_libdir}/purple-2/lib$im.so ]; then
rm -f %{buildroot}%{_libdir}/purple-2/lib$im.so
fi
done
find %{buildroot}%{_libdir}/purple-2/ -xtype f -print | \
sed -e "s|^%{buildroot}||g;/\libsametime.so/d;/\/tcl.so/d" \
> %{name}-%{version}-purpleplugins
find %{buildroot}%{_libdir}/finch/ -maxdepth 1 -xtype f -print | \
sed -e "s|^%{buildroot}||g" > %{name}-%{version}-finchplugins
%fdupes %{buildroot}
%suse_update_desktop_file -N %{_name} -G "Instant Messenger" %{name}
%{find_gconf_schemas}
%find_lang %{name} %{?no_lang_C}
%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}.schemas_list
%defattr(-,root,root)
%doc AUTHORS COPYING COPYRIGHT ChangeLog NEWS README doc/the_penguin.txt
%{_bindir}/%{name}
%{_libdir}/%{name}/
%dir %{_datadir}/appdata
%{_datadir}/appdata/pidgin.appdata.xml
%{_datadir}/pixmaps/%{name}/
%{_datadir}/icons/hicolor/*/apps/*
%{_datadir}/applications/*.desktop
%{_datadir}/sounds/purple/
%{_mandir}/man1/%{name}.*
%files devel
%defattr(-,root,root)
%{_includedir}/%{name}
%{_libdir}/pkgconfig/%{name}.pc
%{_mandir}/man3/%{_name}.*
%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/
%dir %{_libdir}/purple-2/perl/
%dir %{_libdir}/purple-2/perl/*/
%dir %{_libdir}/purple-2/perl/*/*
%files -n libpurple-lang -f %{name}.lang
%defattr(-,root,root)
# These locales are not yet included in respective products:
%if 0%{?suse_version} < 1140
# See https://bugzilla.novell.com/show_bug.cgi?id=659001
%dir %{_datadir}/locale/mhr/
%dir %{_datadir}/locale/mhr/LC_MESSAGES/
%endif
%files -n libpurple-meanwhile
%defattr(-,root,root)
%{_libdir}/purple-2/libsametime.*
%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.*
%files -n finch -f %{name}-%{version}-finchplugins
%defattr(-,root,root)
%{_bindir}/finch
%{_libdir}/libgnt.so.*
%{_libdir}/gnt/
%dir %{_libdir}/finch/
%{_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)
%config %{_sysconfdir}/purple/prefs.xml
%endif
%changelog