1 |
%define name mail-notification |
2 |
%define version 5.4 |
3 |
|
4 |
%define evo %(rpm -q evolution-devel --queryformat %%{VERSION}) |
5 |
%define fname %name-%version |
6 |
|
7 |
Version: %{version} |
8 |
Summary: New mail status tray icon |
9 |
Name: %{name} |
10 |
Release: %mkrel 17 |
11 |
License: GPLv3+ and GFDL+ |
12 |
Group: Networking/Mail |
13 |
Source: http://savannah.nongnu.org/download/mailnotify/%{fname}.tar.bz2 |
14 |
Source1: http://savannah.nongnu.org/download/mailnotify/%{fname}.tar.bz2.sig |
15 |
Patch0: mail-notification-5.4-evolution.patch |
16 |
Patch1: mail-notification-5.4-gmime.patch |
17 |
Patch2: mail-notification-5.4-sasl_encode64.patch |
18 |
Patch3: mail-notification-5.4-evolution-gtkhtml.patch |
19 |
Patch4: mail-notification-5.4-camel_headers.patch |
20 |
Patch5: mail-notification-5.4-icons.patch |
21 |
Patch6: mail-notification-5.4-weak.patch |
22 |
Patch7: mail-notification-5.4-popup-attach.patch |
23 |
Patch8: mail-notification-5.4-kde-trayicon.patch |
24 |
Patch9: mail-notification-5.4-evolution-3-0-support.patch |
25 |
Patch10: mail-notification-5.4-gtk3-support.patch |
26 |
Patch11: mail-notification-5.4-build-without-optimalisations.patch |
27 |
Patch12: mail-notification-5.4-add-fallback-icon.patch |
28 |
Patch13: popup-markup.patch |
29 |
URL: http://www.nongnu.org/mailnotify/ |
30 |
BuildRoot: %{_tmppath}/%{name}-%{version}-buildroot |
31 |
BuildRequires: libsasl-devel |
32 |
BuildRequires: openssl-devel |
33 |
BuildRequires: libgmime-devel |
34 |
BuildRequires: evolution-devel |
35 |
#gw with the patch1 we need e-d-s 2.23 |
36 |
BuildRequires: evolution-data-server-devel >= 2.23 |
37 |
BuildRequires: libgnomeui2-devel |
38 |
BuildRequires: libgnomeprintui-devel |
39 |
BuildRequires: libnotify-devel |
40 |
BuildRequires: avahi-glib-devel avahi-client-devel |
41 |
BuildRequires: gob2 |
42 |
BuildRequires: scrollkeeper |
43 |
BuildRequires: perl-XML-Parser |
44 |
BuildRequires: mono-devel |
45 |
BuildRequires: desktop-file-utils |
46 |
#gw aclocal called: |
47 |
BuildRequires: intltool |
48 |
BuildRequires: libglade2-devel |
49 |
Requires(post): scrollkeeper |
50 |
Requires(postun): scrollkeeper |
51 |
Suggests: fetchyahoo |
52 |
|
53 |
%description |
54 |
Mail Notification is a status icon (aka tray icon) that informs you if |
55 |
you have new mail. It works with system trays implementing the |
56 |
freedesktop.org System Tray Specification, such as the GNOME Panel |
57 |
Notification Area, the Xfce Notification Area, and the KDE System Tray. |
58 |
Mail Notification features include multiple mailbox support, mbox, MH, |
59 |
Maildir, Sylpheed, POP3, IMAP, and Gmail support, SASL and APOP |
60 |
authentication support, SSL support, automatic detection of mailbox |
61 |
format, automatic notification, and HIG 2.0 compliance. |
62 |
|
63 |
%package evolution |
64 |
Group: Networking/Mail |
65 |
Requires: %name = %version |
66 |
Requires: evolution >= %evo |
67 |
Summary: New mail status tray icon for Evolution |
68 |
|
69 |
%description evolution |
70 |
Mail Notification is a status icon (aka tray icon) that informs you if |
71 |
you have new mail. It works with system trays implementing the |
72 |
freedesktop.org System Tray Specification, such as the GNOME Panel |
73 |
Notification Area, the Xfce Notification Area, and the KDE System Tray. |
74 |
|
75 |
Install this if you use Evolution. |
76 |
|
77 |
%prep |
78 |
%setup -q -n %fname |
79 |
%patch0 -p1 -b .evolution |
80 |
%patch1 -p1 -b .gmime |
81 |
%patch2 -p1 -b .sasl_encode64 |
82 |
%patch3 -p1 -b .gtkhtml |
83 |
%patch4 -p1 -b .camel_headers |
84 |
%patch5 -p1 -b .icons |
85 |
%patch6 -p1 -b .weak |
86 |
%patch7 -p1 -b .popup_attach |
87 |
%patch8 -p1 -b .kde_trayicon |
88 |
|
89 |
# Evolution 3.0 requires a patch as the pkgconfig names have changed |
90 |
# GTK3 requires various changes as well |
91 |
%if 0%{?mgaver} >= 2 |
92 |
%patch9 -p0 -b .evolution30 |
93 |
%patch10 -p0 -b .gtk3 |
94 |
%endif |
95 |
|
96 |
# Temporary patch to build without any optimalisations so we |
97 |
# can get better stacktraces for RHBZ #531088 |
98 |
%patch11 -p0 -b .gcc |
99 |
|
100 |
# Don't throw assertion errors (and a possible crash) when |
101 |
# some icons can't be found. Fixes RHBZ #654826 |
102 |
# This is a temporary workaround until GNOME BZ #629878 is fixed |
103 |
%patch12 -p0 -b .fallback_icon |
104 |
|
105 |
# Don't use <span> tags as XFCE's notification daemon doesn't understand those |
106 |
%patch13 -p1 -b .span |
107 |
|
108 |
# Drop #line statements in C sources generated by .gob, |
109 |
# for the proper debuginfo package |
110 |
pushd build/src |
111 |
for f in *.c *.h |
112 |
do |
113 |
sed -i '/^#line / d' $f |
114 |
done |
115 |
popd |
116 |
|
117 |
# Convert the Glade UI to GtkBuilder |
118 |
%if 0%{?mgaver} >= 2 |
119 |
pushd ui |
120 |
gtk-builder-convert mailbox-properties-dialog.glade mailbox-properties-dialog.ui |
121 |
gtk-builder-convert properties-dialog.glade properties-dialog.ui |
122 |
sed -i s@'<property name="has_separator">False</property>'@@ mailbox-properties-dialog.ui |
123 |
sed -i s@'<property name="has_separator">False</property>'@@ properties-dialog.ui |
124 |
popd |
125 |
%endif |
126 |
|
127 |
%build |
128 |
#gw link error in evolution plugin |
129 |
%define _disable_ld_no_undefined 1 |
130 |
./jb configure prefix=%_prefix sysconfdir=%_sysconfdir gconf-schemas-dir=%_sysconfdir/gconf/schemas cflags="%optflags" ldflags="%ldflags -Wl,--export-dynamic" destdir=%buildroot |
131 |
./jb build |
132 |
|
133 |
%install |
134 |
rm -rf $RPM_BUILD_ROOT %name.lang |
135 |
|
136 |
GCONF_DISABLE_MAKEFILE_SCHEMA_INSTALL=1 ./jb install |
137 |
rm -f %buildroot%_libdir/evolution/*/plugins/*a |
138 |
%find_lang %name --with-gnome |
139 |
desktop-file-install --vendor="" \ |
140 |
--remove-category="Application" \ |
141 |
--add-category="X-MandrivaLinux-Internet-Mail" \ |
142 |
--dir $RPM_BUILD_ROOT%{_datadir}/applications $RPM_BUILD_ROOT%{_datadir}/applications/* |
143 |
|
144 |
mkdir -p %buildroot/{%_liconsdir,%_iconsdir,%_miconsdir} |
145 |
ln -s %_datadir/icons/hicolor/48x48/apps/mail-notification.png %{buildroot}%{_liconsdir}/%{name}.png |
146 |
ln -s %_datadir/icons/hicolor/32x32/apps/mail-notification.png %{buildroot}%{_iconsdir}/%{name}.png |
147 |
ln -s %_datadir/icons/hicolor/16x16/apps/mail-notification.png %{buildroot}%{_miconsdir}/%{name}.png |
148 |
|
149 |
|
150 |
%preun |
151 |
%preun_uninstall_gconf_schemas mail-notification |
152 |
|
153 |
%clean |
154 |
rm -rf $RPM_BUILD_ROOT |
155 |
|
156 |
%files -f %name.lang |
157 |
%defattr (-,root,root) |
158 |
%doc README COPYING TODO |
159 |
%config(noreplace) %_sysconfdir/xdg/autostart/mail-notification.desktop |
160 |
%_bindir/* |
161 |
%_datadir/%name |
162 |
%_datadir/applications/* |
163 |
%dir %_datadir/omf/mail-notification/ |
164 |
%_datadir/omf/mail-notification/%name-C.omf |
165 |
%_sysconfdir/gconf/schemas/mail-notification.schemas |
166 |
%_datadir/icons/hicolor/*/apps/* |
167 |
%_liconsdir/%name.png |
168 |
%_iconsdir/%name.png |
169 |
%_miconsdir/%name.png |
170 |
|
171 |
%files evolution |
172 |
%defattr (-,root,root) |
173 |
%doc COPYING |
174 |
%_libdir/evolution/*/plugins/* |
175 |
|
176 |
|
177 |
|