File mail-notification.spec of Package mail-notification

# spec file for package mail-notification
# Copyright (c) 2011 SUSE LINUX Products GmbH, Nuernberg, Germany.
# Copyright (c) 2008 James Ogley
# 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

Name:           mail-notification
Version:        5.4
Release:        4
License:        GPL
Summary:        Status icon checking for new mail
Group:          Productivity/Networking/Email/Utilities
Source:         %{name}-%{version}.tar.bz2
# PATCH-FIX-UPSTREAM mail-notification-5.4-evo2.29.patch lp501624 -- Fix build with recent Evolution (from Fedora)
Patch1:         mail-notification-5.4-evo2.29.patch
# PATCH-FIX-UPSTREAM mail-notification-5.4-evo2.29.patch lp501624 -- Fix build with recent Evolution (from Fedora) gob2 part, only for 11.3 and later
Patch8:         mail-notification-5.4-evo2.29-gob2.patch
# PATCH-FIX-UPSTREAM mail-notification-5.4-missing-icons.patch lp557137 -- fix incorrect stock icons being used
Patch2:         mail-notification-5.4-missing-icons.patch
# PATCH-FIX-UPSTREAM mail-notification-5.4-gmime.patch lp297094 -- Fix build with gmime 2.4
Patch3:         mail-notification-5.4-gmime.patch
# PATCH-FIX-UPSTREAM mail-notification-5.4-eds-2.32.patch -- Fix build with evolution 2.32
Patch4:         mail-notification-5.4-eds-2.32.patch
# PATCH-FIX-UPSTREAM mail-notification-5.4-gob2-2.0.16.patch deb#580886 -- Fix build with gob2 2.0.16 
Patch5:         mail-notification-5.4-gob2-2.0.16.patch
# PATCH-FIX-UPSTREAM mail-notification-5.4-evolution-gtkhtml.patch lp#458882 -- Fix build with recent gtkhtml (Fedora)
Patch6:         mail-notification-5.4-evolution-gtkhtml.patch
# PATCH-FIX-UPSTREAM mail-notification-5.4-sasl_encode64.patch lp#602623 -- Fix buffer overflow (Fedora)
Patch7:         mail-notification-5.4-sasl_encode64.patch 
BuildRequires:  evolution-data-server-devel
BuildRequires:  evolution-devel
BuildRequires:  gconf2-devel
%if 0%{?suse_version} <= 1110 && ! 0%{?sles_version}
BuildRequires:  gmime-devel
BuildRequires:  gmime-2_4-devel
BuildRequires:  gnome-vfs2-devel
BuildRequires:  gtk2-devel
BuildRequires:  intltool
BuildRequires:  libglade2-devel
%if 0%{?suse_version} >= 1130
BuildRequires:  libgnome-keyring-devel
BuildRequires:  gnome-keyring-devel
BuildRequires:  libgnomeui-devel
BuildRequires:  libnotify-devel
BuildRequires:  libxml2-devel
BuildRequires:  openssl-devel
BuildRequires:  scrollkeeper
BuildRequires:  startup-notification-devel
BuildRequires:  update-desktop-files
%if %suse_version >= 1130
BuildRequires:  gob2 >= 2.0.16
Recommends:     %{name}-lang
BuildRoot:      %{_tmppath}/%{name}-%{version}-build

Mail Notification is a status icon (aka tray icon) that informs you if
you have new mail.

It works with system trays implementing the System
Tray Specification, such as the GNOME Panel Notification Area, the
Xfce Notification Area and the KDE System Tray.

%setup -q
%if %suse_version >= 1120
%patch1 -p1 -b .evolution-2.29
%if %suse_version >= 1130
%patch8 -p1 -b .evolution-2.29-gob2
%patch4 -p1 -b .eds-2.32
%patch5 -p1 -b .gob2.0.16
%patch2 -p1 -b .incorrect-icons
%if 0%{?suse_version} > 1110 || 0%{?sles_version}
%patch3 -p1 -b .gmime24
%if %suse_version < 1140
%patch6 -p1 -b .gtkhtml
%patch7 -p1 -b .sasl_encode64

#  Drop #line statements in C sources generated bu .gob,
#  for the proper debuginfo package
pushd build/src
for f in *.c *.h
	sed -i '/^#line / d' $f

# See
%if %suse_version >= 1120

./jb configure prefix=%{_prefix} \
     sysconfdir=%{_sysconfdir} \
     cc="%{__cc}" \
     cflags="%{optflags}" \
     cppflags="-D_GNU_SOURCE" \
     destdir=%{buildroot} \
     gconf-schemas-dir=%{_sysconfdir}/gconf/schemas \

./jb build

./jb install
# jb doesn't allow disabling scrollkeeper
rm -fr %{buildroot}%{_localstatedir}/lib/scrollkeeper
# sr@latin is the right locale name
mv %{buildroot}%{_datadir}/locale/sr@Latn %{buildroot}%{_datadir}/locale/sr@latin
%find_lang %{name} %{?no_lang_C}
%suse_update_desktop_file mail-notification
%suse_update_desktop_file mail-notification-properties

%pre -f %{name}.schemas_pre

%preun -f %{name}.schemas_preun

%posttrans -f %{name}.schemas_posttrans

%if 0%{?suse_version} > 1130


%if 0%{?suse_version} > 1130


rm -rf %{buildroot}

%files -f %{name}.schemas_list
%defattr(-, root, root)
%dir %{_datadir}/gnome/
%dir %{_datadir}/gnome/help/
%dir %{_datadir}/gnome/help/%{name}/
%doc %{_datadir}/gnome/help/%{name}/C/
%dir %{_datadir}/omf/
%dir %{_datadir}/omf/%{name}/
%doc %{_datadir}/omf/%{name}/%{name}-C.omf

%files lang -f %{name}.lang

openSUSE Build Service is sponsored by