buc 8373a80
%global git_revision 9ae8768
b1eb968
buc d2e93a3
%bcond_with	evolution
buc d2e93a3
4a5f242
Name:           mail-notification
e603c2b
Version:        5.4
a5b8b3e
Release:        93.git.%{git_revision}%{?dist}
a5c330f
Summary:        Status icon that informs you if you have new mail
4a5f242
4a5f242
Group:          Applications/Internet
de81748
License:        GPLv3+
4a5f242
URL:            http://www.nongnu.org/mailnotify/
b1eb968
#Source0:        http://savannah.nongnu.org/download/mailnotify/mail-notification-%{version}.tar.bz2
b1eb968
# Upstream isn't alive any more, use a github forked copy which contains all patches which
b1eb968
# have been collected over the past years: https://github.com/epienbroek/mail-notification
b1eb968
#
b1eb968
# To regenerate source tarball:
b1eb968
# wget https://github.com/epienbroek/mail-notification/tarball/$git_revision -O mail-notification-$git_revision.tar.gz
b1eb968
Source0:        mail-notification-%{git_revision}.tar.gz
fcbe51c
# jb build system is turning on -Werror to build itself.  This patch fixes a
fcbe51c
# warning with current gcc
fcbe51c
Patch0: mail-notification-jb-gcc-format.patch
b1eb968
27b3a34
# build break when building with evolution 3.11.2
27b3a34
Patch2:         mail-notification-evo3_11_2.patch
27b3a34
00cda42
# Fix FTBFS against latest glibc
00cda42
Patch3:         mail-notification-dont-link-against-bsd-compat.patch
00cda42
buc ec030db
# Build against evolution-data-server 3.23.2
buc ec030db
Patch4:         mail-notification-eds3_23_2.patch
buc ec030db
buc 9fee339
# Use gstreamer-1.0 to play sound
buc 9fee339
Patch5:		mail-notification-gstreamer1.patch
buc 9fee339
ead6d3a
BuildRequires:  gettext
ead6d3a
BuildRequires:  desktop-file-utils, scrollkeeper
ead6d3a
BuildRequires:  openssl-devel >= 0.9.6
a5c330f
BuildRequires:  cyrus-sasl-devel >= 2.0
ead6d3a
BuildRequires:  glib2-devel >= 2.14
ea205ed
BuildRequires:  gtk3-devel
ea205ed
BuildRequires:  GConf2-devel, libgnome-devel
ea205ed
BuildRequires:  dbus-glib-devel
ead6d3a
BuildRequires:  libnotify-devel >= 0.4.1
9df6b27
BuildRequires:  gmime-devel >= 2.4
8e6cdda
BuildRequires:  libgnome-keyring-devel
c330ed1
BuildRequires:  perl-XML-Parser
b1eb968
BuildRequires:  gob2 >= 2.0.17
buc d2e93a3
%if %{with evolution}
buc ec030db
BuildRequires:  evolution-devel
97f2f77
BuildRequires:  evolution-data-server-devel >= 1.5
buc d2e93a3
%endif
f2febfb
ea205ed
# needed for the gtk-builder-convert tool
ea205ed
BuildRequires:  gtk2-devel
ea205ed
035bed4
# needed for the GConf RPM macros
b1eb968
BuildRequires:  GConf2
035bed4
df2d2ce
Requires:         hicolor-icon-theme
ead6d3a
d0c987e
Requires(pre):    GConf2
d0c987e
Requires(post):   GConf2, scrollkeeper
4a5f242
Requires(preun):  GConf2
4a5f242
Requires(postun): scrollkeeper
4a5f242
bba9e72
4a5f242
%description
a5c330f
Mail Notification is a status icon (aka tray icon) that informs you if you
4a5f242
have new mail. It works with system trays implementing the freedesktop.org
a5c330f
System Tray Specification, such as the GNOME Panel Notification Area, the
4a5f242
Xfce Notification Area and the KDE System Tray.
4a5f242
4a5f242
buc d2e93a3
%if %{with evolution}
4f4f261
%package        evolution-plugin
4f4f261
Summary:        Evolution plugin for Mail Notification
4f4f261
Group:          Applications/Internet
4f4f261
Requires:       %{name} = %{version}-%{release}
4f4f261
4f4f261
%description	evolution-plugin
4f4f261
Evolution support for Mail Notification.
buc d2e93a3
%endif
4f4f261
bba9e72
4a5f242
%prep
b1eb968
%setup -q -n epienbroek-%{name}-%{git_revision}
1a61929
fcbe51c
%patch0 -p1
27b3a34
%patch2 -p1 -b .evo3_11_2
00cda42
%patch3 -p0
buc ec030db
%patch4 -p1 -b .eds3_23_2
buc 9fee339
%patch5 -p1
f0f6c45
9e8d2c9
# update config.{guess,sub} manually
9e8d2c9
cp -p /usr/lib/rpm/redhat/config.{guess,sub} jbsrc/tools/
9e8d2c9
bba9e72
4a5f242
%build
bba9e72
9ff898f
./jb configure \
b1eb968
  cc="%{__cc}" \
buc 63ce968
  cflags="$RPM_OPT_FLAGS" \
b1eb968
  cppflags="-D_GNU_SOURCE" \
buc 63ce968
  ldflags="$RPM_LD_FLAGS" \
b1eb968
  destdir=$RPM_BUILD_ROOT \
b1eb968
  prefix=%{_prefix} \
b1eb968
  bindir=%{_bindir} \
b1eb968
  libdir=%{_libdir} \
b1eb968
  libexecdir=%{_libexecdir} \
b1eb968
  datadir=%{_datadir} \
b1eb968
  sysconfdir=%{_sysconfdir} \
b1eb968
  localstatedir=%{_localstatedir} \
buc 8373a80
  gtk3=yes \
buc ec030db
%if %{with evolution}
buc ec030db
  evolution=yes \
buc ec030db
%else
buc ec030db
  evolution=no \
buc ec030db
%endif
b1eb968
  install-gconf-schemas=no
bba9e72
ead6d3a
./jb build
4a5f242
1a61929
# The build command above hides away all gcc commands and their warnings
1a61929
# As they can be interesting show the build log manually
1a61929
cat build/build.log
1a61929
4a5f242
4a5f242
%install
4a5f242
# For GConf apps: prevent schemas from being installed at this stage
4a5f242
export GCONF_DISABLE_MAKEFILE_SCHEMA_INSTALL=1
4a5f242
ead6d3a
./jb install
ead6d3a
ead6d3a
#  clear /var/lib/scrollkeeper stuff here
ead6d3a
rm -rf $RPM_BUILD_ROOT%{_localstatedir}
ead6d3a
4a5f242
find $RPM_BUILD_ROOT -type f -name "*.la" -exec rm -f {} ';'
4a5f242
buc d2e93a3
%if %{with evolution}
fd045f1
chmod +x $RPM_BUILD_ROOT%{_libdir}/evolution/plugins/*.so
buc d2e93a3
%endif
fcb02df
03077b9
desktop-file-install \
03077b9
%if (0%{?fedora} && 0%{?fedora} < 19) || (0%{?rhel} && 0%{?rhel} < 7)
03077b9
  --vendor fedora                   \
03077b9
%endif
73846fe
  --dir ${RPM_BUILD_ROOT}%{_datadir}/gnome/autostart/  \
4a5f242
  --delete-original                                    \
73846fe
  ${RPM_BUILD_ROOT}%{_sysconfdir}/xdg/autostart/mail-notification.desktop
4a5f242
03077b9
desktop-file-install \
03077b9
%if (0%{?fedora} && 0%{?fedora} < 19) || (0%{?rhel} && 0%{?rhel} < 7)
03077b9
  --vendor fedora                   \
03077b9
%endif
f2febfb
  --dir ${RPM_BUILD_ROOT}%{_datadir}/applications      \
f2febfb
  --delete-original                                    \
2f64a94
  --add-category X-GNOME-NetworkSettings               \
f2febfb
  ${RPM_BUILD_ROOT}%{_datadir}/applications/mail-notification-properties.desktop
4a5f242
ead6d3a
%find_lang %{name}
ead6d3a
4a5f242
de81748
%pre
035bed4
%gconf_schema_prepare %{name}
4a5f242
bba9e72
4a5f242
%post
035bed4
%gconf_schema_upgrade %{name}
bba9e72
d0c987e
/usr/bin/scrollkeeper-update -q -o %{_datadir}/omf/%{name} || :
bba9e72
df2d2ce
touch --no-create %{_datadir}/icons/hicolor || :
df2d2ce
%{_bindir}/gtk-update-icon-cache --quiet %{_datadir}/icons/hicolor || :
df2d2ce
bba9e72
4a5f242
%preun
035bed4
%gconf_schema_remove %{name}
4a5f242
bba9e72
4a5f242
%postun
4a5f242
/usr/bin/scrollkeeper-update -q ||:
bba9e72
df2d2ce
touch --no-create %{_datadir}/icons/hicolor || :
df2d2ce
%{_bindir}/gtk-update-icon-cache --quiet %{_datadir}/icons/hicolor || :
4a5f242
de81748
4a5f242
%files -f %{name}.lang
df2d2ce
%doc AUTHORS COPYING NEWS README TODO
4a5f242
%{_sysconfdir}/gconf/schemas/mail-notification.schemas
4a5f242
%{_bindir}/*
4a5f242
%{_datadir}/%{name}
03077b9
%{_datadir}/gnome/autostart/*mail-notification.desktop
03077b9
%{_datadir}/applications/*mail-notification-properties.desktop
4a5f242
%{_datadir}/gnome/help/mail-notification/
02741b0
%dir %{_datadir}/omf/mail-notification/
4a5f242
%{_datadir}/omf/mail-notification/mail-notification-C.omf
df2d2ce
%{_datadir}/icons/hicolor/*/apps/mail-notification.*
4a5f242
fcb02df
buc d2e93a3
%if %{with evolution}
4f4f261
%files evolution-plugin
fd045f1
%{_libdir}/evolution/plugins/*
buc d2e93a3
%endif
4f4f261
4f4f261
4a5f242
%changelog
a5b8b3e
* Thu Feb 08 2018 Fedora Release Engineering <releng@fedoraproject.org> - 5.4-93.git.9ae8768
a5b8b3e
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
a5b8b3e
buc 9fee339
* Thu Aug  3 2017 Dmitry Butskoy <Dmitry@Butskoy.name> - 5.4-92.git.9ae8768
buc 9fee339
- Use gstreamer1 by default for playing sound (<wislufle@australiamail.com>, #1370188)
buc 9fee339
1410d7c
* Wed Jul 26 2017 Fedora Release Engineering <releng@fedoraproject.org> - 5.4-91.git.9ae8768
1410d7c
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
1410d7c
c8bc220
* Fri Feb 10 2017 Fedora Release Engineering <releng@fedoraproject.org> - 5.4-90.git.9ae8768
c8bc220
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
c8bc220
buc ec030db
* Wed Nov  2 2016 Dmitry Butskoy <Dmitry@Butskoy.name> - 5.4-89.git.9ae8768
buc 9fee339
- add patch for evolution-3.23.2 (Milan Crna <mcrha@redhat.com>, #1390590)
buc ec030db
buc 63ce968
* Tue Aug 23 2016 Dmitry Butskoy <Dmitry@Butskoy.name> - 5.4-88.git.9ae8768
buc 63ce968
- rebuild with the proper compiler and linker options (#1368912)
buc 63ce968
buc 8373a80
* Thu Aug 18 2016 Dmitry Butskoy <Dmitry@Butskoy.name> - 5.4-87.git.9ae8768
buc 8373a80
- Update to the latest upstream git revision 9ae8768 (#1288891)
buc 8373a80
- Use gtk3=yes for build
buc 8373a80
5759794
* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 5.4-86.git.eab5c13
5759794
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
5759794
9e8d2c9
* Tue Dec 08 2015 Dan Horák <dan[at]danny.cz> - 5.4-85.git.eab5c13
9e8d2c9
- support secondary arches via updated config.{guess,sub} from system
9e8d2c9
05010fe
* Wed Jun 17 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 5.4-84.git.eab5c13
05010fe
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
05010fe
fd045f1
* Mon Sep 22 2014 Milan Crha <mcrha@redhat.com> 5.4-83.git.eab5c13
fd045f1
- Rebuild against newer evolution (changed folder structure)
fd045f1
bbc6caf
* Sun Aug 17 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 5.4-82.git.eab5c13
bbc6caf
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild
bbc6caf
buc d2e93a3
* Mon Jun  9 2014 Dmitry Butskoy <Dmitry@Butskoy.name> - 5.4-81.git.eab5c13
buc d2e93a3
- Drop evolution plugin for now (too hard to maintain it further)
dee0aff
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
dee0aff
51c28fa
* Mon Feb 03 2014 Milan Crha <mcrha@redhat.com> 5.4-80.git.eab5c13
51c28fa
- Rebuild against newer evolution-data-server
51c28fa
00cda42
* Sun Jan 19 2014 Erik van Pienbroek <epienbro@fedoraproject.org> - 5.4-79.git.eab5c13
00cda42
- Fix FTBFS against latest glibc
00cda42
10f6be4
* Tue Jan 14 2014 Milan Crha <mcrha@redhat.com> 5.4-78.git.eab5c13
10f6be4
- Rebuild against newer evolution-data-server
10f6be4
27b3a34
* Wed Nov 20 2013 Milan Crha <mcrha@redhat.com> 5.4-77.git.eab5c13
4ce0394
- Rebuild against newer evolution-data-server
27b3a34
- Add patch to be buildable against evolution 3.11.2 release
4ce0394
ed07c51
* Sat Oct 26 2013 Erik van Pienbroek <epienbro@fedoraproject.org> - 5.4-76.git.eab5c13
ed07c51
- Rebuild against latest evolution
ed07c51
f3e2ef7
* Mon Aug 19 2013 Milan Crha <mcrha@redhat.com> 5.4-75.git.eab5c13
f3e2ef7
- Rebuild against newer evolution-data-server
f3e2ef7
387483e
* Sat Aug 03 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 5.4-74.git.eab5c13
387483e
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
387483e
46ee746
* Wed Jul 10 2013 Milan Crha <mcrha@redhat.com> 5.4-73.git.eab5c13
46ee746
- Rebuild against newer evolution-data-server
46ee746
2bd6a2a
* Sun Jun 23 2013 Erik van Pienbroek <epienbro@fedoraproject.org> - 5.4-72.git.eab5c13
2bd6a2a
- Rebuild against latest evolution
2bd6a2a
f0f6c45
* Sat May  4 2013 Erik van Pienbroek <epienbro@fedoraproject.org> - 5.4-71.git.eab5c13
f0f6c45
- Add support for aarch64 (RHBZ #926114)
f0f6c45
8e6cdda
* Mon Apr 29 2013 Erik van Pienbroek <epienbro@fedoraproject.org> - 5.4-70.git.eab5c13
8e6cdda
- Replaced BR: gnome-keyring-devel with libgnome-keyring-devel (RHBZ #956705)
8e6cdda
fcbe51c
* Fri Feb 15 2013 Toshio Kuratomi <toshio@fedoraproject.org> - 5.4-69.git.eab5c13
fcbe51c
- Fix FTBFS.  Patch is to the complex build scripts rather than the installed code.
fcbe51c
03077b9
* Thu Feb 14 2013 Toshio Kuratomi <toshio@fedoraproject.org> - 5.4-68.git.eab5c13
03077b9
- Remove --vendor from desktop-file-install on F19+ https://fedorahosted.org/fesco/ticket/1077
03077b9
ecda2b6
* Thu Feb 14 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 5.4-67.git.eab5c13
ecda2b6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
ecda2b6
5240858
* Tue Jan 15 2013 Milan Crha <mcrha@redhat.com> 5.4-66.git.eab5c13
5240858
- Rebuild against newer evolution-data-server
5240858
e018f0a
* Wed Dec 26 2012 Kevin Fenzi <kevin@scrye.com> 5.4-65.git.
e018f0a
- Rebuild for new evolution
e018f0a
4ce2406
* Wed Nov 21 2012 Erik van Pienbroek <epienbro@fedoraproject.org> - 5.4.64.git.eab5c13
4ce2406
- Update to eab5c13 snapshot
4ce2406
- Fixes new e-mail detection in evolution 3.6
4ce2406
- Use a more efficient method to retrieve unread mails from
4ce2406
  evolution as suggested by Milan Crha (GNOME BZ #688429)
4ce2406
- Replaced the patch with a sed call to avoid multiple gcc -O optimalisation flags being used
4ce2406
eb4c7e8
* Tue Nov 20 2012 Erik van Pienbroek <epienbro@fedoraproject.org> - 5.4-63.git72ad191
eb4c7e8
- Update to 72ad191 snapshot
eb4c7e8
- Fixes compatibility with GLib 2.35 (deprecated g_type_init)
eb4c7e8
- Fixes location of tooltip
ea693e0
- Trimmed old changelog entries from the .spec file
eb4c7e8
2286ae3
* Tue Nov 20 2012 Milan Crha <mcrha@redhat.com> - 5.4-62.gitb4ca832
2286ae3
- Rebuild against newer evolution-data-server
2286ae3
2d2638b
* Thu Oct 25 2012 Milan Crha <mcrha@redhat.com> - 5.4-61.gitb4ca832
2d2638b
- Rebuild against newer evolution-data-server
2d2638b
b1eb968
* Wed Aug 22 2012 Erik van Pienbroek <epienbro@fedoraproject.org> - 5.4-60.gitb4ca832
b1eb968
- Switch to using a GitHub fork of mail-notification as upstream is dead:
b1eb968
  https://github.com/epienbroek/mail-notification
b1eb968
- Removed (almost) all patches as they're now part of the GitHub fork
b1eb968
- Removed hack to link against libX11 as a proper fix was applied in the GitHub fork
b1eb968
- Fixes compatibility with evolution 3.5.3 and higher
b1eb968
- Re-added the BR: gob2
b1eb968
- Removed ancient obsoletes tag
b1eb968
- Fixed mixed-use-of-spaces-and-tabs rpmlint warning
b1eb968
16c0ae8
* Thu Jul 19 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 5.4-59
16c0ae8
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
16c0ae8
14785bd
* Fri Jun 15 2012 Erik van Pienbroek <epienbro@fedoraproject.org> - 5.4-58
14785bd
- Drop Fedora >= 15 conditionals as older Fedora versions aren't supported any more
14785bd
- Don't crash when the system tray manager (like gnome-shell) is restarted
14785bd
  Patch created by Julien Danjou, http://bugs.debian.org/500880
14785bd
- Fix segfault when the Polish translation is used
14785bd
  Patch created by Przemysław, http://bugs.debian.org/523873
14785bd
e84a87c
* Sun Jun 10 2012 Erik van Pienbroek <epienbro@fedoraproject.org> - 5.4-57
e84a87c
- Another rebuild against the latest evolution
e84a87c
37652a0
* Wed May  9 2012 Erik van Pienbroek <epienbro@fedoraproject.org> - 5.4-56
37652a0
- Fix compatibility with latest evolution (again..)
37652a0
d50843d
* Mon Apr  9 2012 Erik van Pienbroek <epienbro@fedoraproject.org> - 5.4-55
d50843d
- Adding mailboxes was broken with evolution 3.4. Fixed
d50843d
- Various minor improvements in the gtk3 user interface
d50843d
1a08be0
* Thu Apr  5 2012 Erik van Pienbroek <epienbro@fedoraproject.org> - 5.4-54
1a08be0
- Fixed a stack overflow which occured while verifying SSL certificates
1a08be0
  for POP3 and IMAP mailboxes. RHBZ #810054
1a08be0
Erik van Pienbroek b732e43
* Wed Mar 21 2012 Erik van Pienbroek <epienbro@fedoraproject.org> - 5.4-53
Erik van Pienbroek b732e43
- Fixed a posible segfault in the evolution plugin
Erik van Pienbroek b732e43
a501f4f
* Wed Feb 22 2012 Milan Crha <mcrha@redhat.com> - 5.4-52
a501f4f
- Rebuild against newer evolution-data-server
a501f4f
14bad69
* Wed Feb 08 2012 Milan Crha <mcrha@redhat.com> - 5.4-51
14bad69
- Rebuild against newer evolution-data-server
14bad69
- Add patch to build with evolution-3.3.5's libemail
14bad69
48a4452
* Fri Jan 13 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 5.4-50
48a4452
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
48a4452
4385cab
* Tue Dec 20 2011 Milan Crha <mcrha@redhat.com> - 5.4-49
4385cab
- Rebuild against newer evolution-data-server
4385cab