File mail-notification.spec of Package mail-notification
%global git_revision 9ae8768
%global git_revision_long 9ae8768f58759ab767417721d562b759256e3314
Name: mail-notification
Version: 5.4
Release: 66.git.%{git_revision}
Summary: Status icon that informs you if you have new mail
Group: Productivity/Networking/Email/Clients
License: GPL-3.0+
URL: http://www.nongnu.org/mailnotify/
# Upstream isn't alive any more, use a github forked copy which contains all patches which
# have been collected over the past years: https://github.com/epienbroek/mail-notification
Source0: https://github.com/epienbroek/mail-notification/archive/%{git_revision}.tar.gz#./%{name}-%{git_revision}.tar.gz
Patch0: osc-fixes.diff
Patch1: update-for-evolution-3.12.patch
Patch3: mail-notification-dont-link-against-bsd-compat.patch
Patch4: more-fixes-for-3.12.patch
Patch5: fix-64bit-portability.patch
BuildRequires: gettext
BuildRequires: desktop-file-utils, scrollkeeper
BuildRequires: openssl-devel >= 0.9.6
BuildRequires: cyrus-sasl-devel >= 2.0
BuildRequires: glib2-devel >= 2.14
BuildRequires: gtk3-devel
BuildRequires: gconf2-devel, libgnome-devel
BuildRequires: dbus-1-glib-devel
BuildRequires: libnotify-devel >= 0.4.1
BuildRequires: gmime2_6-devel
BuildRequires: gnome-keyring-devel
BuildRequires: perl-XML-Parser
BuildRequires: gob2 >= 2.0.17
BuildRequires: evolution-devel
BuildRequires: evolution-data-server-devel >= 1.5
BuildRequires: update-desktop-files
BuildRequires: libgnomeui-devel
BuildRequires: enchant-devel
# needed for the gtk-builder-convert tool
BuildRequires: gtk2-devel
# needed for the GConf RPM macros
BuildRequires: gconf2
Requires: hicolor-icon-theme
Autoreqprov: on
Requires: %{name}-lang = %{version}
%gconf_schemas_prereq
%description
Mail Notification is a status icon (aka tray icon) that informs you if you
have new mail. It works with system trays implementing the freedesktop.org
System Tray Specification, such as the GNOME Panel Notification Area, the
Xfce Notification Area and the KDE System Tray.
%lang_package
%prep
%setup -q -n %{name}-%{git_revision_long}
%patch0 -p1
%patch1 -p1
%patch3 -p0
%patch4 -p1
%patch5 -p1
%build
# Temporary build without any optimalisations so we
# can get better stacktraces for RHBZ #531088
CFLAGS=$(echo $RPM_OPT_FLAGS | sed s/O2/O0/)
./jb configure \
destdir=$RPM_BUILD_ROOT \
prefix=%{_prefix} \
bindir=%{_bindir} \
libdir=%{_libdir} \
libexecdir=%{_libexecdir} \
datadir=%{_datadir} \
sysconfdir=%{_sysconfdir} \
localstatedir=%{_localstatedir}
./jb build
# The build command above hides away all gcc commands and their warnings
# As they can be interesting show the build log manually
cat build/build.log
%install
# For GConf apps: prevent schemas from being installed at this stage
export GCONF_DISABLE_MAKEFILE_SCHEMA_INSTALL=1
./jb install
# clear /var/lib/scrollkeeper stuff here
rm -rf $RPM_BUILD_ROOT%{_localstatedir}
find $RPM_BUILD_ROOT -type f -name "*.la" -exec rm -f {} ';'
chmod +x $RPM_BUILD_ROOT%{_libdir}/evolution/plugins/*.so
mkdir -p $RPM_BUILD_ROOT%{_prefix}/share/gnome/autostart
mv $RPM_BUILD_ROOT%{_sysconfdir}/xdg/autostart/mail-notification.desktop $RPM_BUILD_ROOT%{_prefix}/share/gnome/autostart
rmdir $RPM_BUILD_ROOT%{_sysconfdir}/xdg/autostart
%find_gconf_schemas
%find_lang %{name}
%suse_update_desktop_file mail-notification-properties Network Email
# jb doesn't allow for disabling scrollkeeper
rm -fr $RPM_BUILD_ROOT/var/lib/scrollkeeper
%pre -f %{name}.schemas_pre
%preun -f %{name}.schemas_preun
%posttrans -f %{name}.schemas_posttrans
%files -f %{name}.schemas_list
%defattr(-,root,root)
%doc AUTHORS COPYING COPYING-DOCS NEWS README TODO TRANSLATING
%{_bindir}/*
%{_datadir}/%{name}
%{_datadir}/gnome/autostart/*
%{_datadir}/applications/*
%{_datadir}/icons/hicolor/*/apps/mail-notification.*
%{_libdir}/evolution/plugins/*
%files lang -f %{name}.lang
%{_datadir}/omf
%changelog