8679399
Name:           mailnag
ec7d183
Version:        1.2.1
1f83fad
Release:        2%{?dist}
6631f3d
Summary:        Mail notification daemon
8679399
8679399
License:        GPLv2
6631f3d
URL:            https://github.com/pulb/%{name}
52a1ac7
Source0:        https://github.com/pulb/%{name}/archive/v%{version}.tar.gz
07c42a9
8679399
# python3 won't work (as of 0.4.2)
8679399
Requires:       python2  
8679399
Requires:       pygobject2
52a1ac7
Requires:       gstreamer1-python
8679399
Requires:       notify-python
8679399
Requires:       pyxdg
1e6b059
Requires:       gnome-keyring
52a1ac7
Requires:       dbus-python
8679399
8679399
BuildArch:      noarch
72573ee
BuildRequires:  python2-devel
8679399
BuildRequires:  gettext
8679399
BuildRequires:  desktop-file-utils
ec7d183
BuildRequires:  libappstream-glib
8679399
8679399
%description
8679399
Mailnag checks POP3 and IMAP servers for new mail and when it finds one 
8679399
creates a proper GNOME 3 notification that mentions sender and subject.
8679399
8679399
8679399
%prep
1e6b059
%setup -q 
8679399
8679399
# sooner or later python3 might be the default in Fedora; be prepared
8679399
sed -i 's_#!.*/usr/bin/env.*python_#!%{_bindir}/env python2_' $(find . -name '*.py')
8679399
8679399
%build
72573ee
CFLAGS="$RPM_OPT_FLAGS" %{__python} setup.py build
8679399
8679399
%install
8679399
rm -rf %{buildroot}
72573ee
%{__python} setup.py install --skip-build --root $RPM_BUILD_ROOT
ef01937
desktop-file-validate $RPM_BUILD_ROOT/%{_datadir}/applications/mailnag.desktop
6631f3d
desktop-file-validate $RPM_BUILD_ROOT/%{_datadir}/applications/mailnag-config.desktop
ec7d183
appstream-util validate-relax --nonet $RPM_BUILD_ROOT/%{_datadir}/appdata/*.appdata.xml
8679399
8679399
%find_lang %{name}
8679399
8679399
8679399
%post
8679399
/bin/touch --no-create %{_datadir}/icons/hicolor &>/dev/null || :
8679399
8679399
%postun
8679399
if [ $1 -eq 0 ] ; then
8679399
    /bin/touch --no-create %{_datadir}/icons/hicolor &>/dev/null
8679399
    /usr/bin/gtk-update-icon-cache -f %{_datadir}/icons/hicolor &>/dev/null || :
8679399
fi
8679399
8679399
%posttrans
8679399
/usr/bin/gtk-update-icon-cache -f %{_datadir}/icons/hicolor &>/dev/null || :
8679399
8679399
8679399
%files -f %{name}.lang
8679399
%doc AUTHORS LICENSE NEWS README.md 
8679399
%{_bindir}/%{name}*
8679399
%{_datadir}/%{name}
ec7d183
%{_datadir}/appdata/
72573ee
%{python_sitelib}/Mailnag
6c02711
%{python_sitelib}/%{name}-%{version}-*.egg-info
8679399
%{_datadir}/applications/*
6631f3d
%{_datadir}/icons/hicolor/*/apps/%{name}*png
8679399
8679399
%changelog
1f83fad
* Tue Jul 19 2016 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.2.1-2
1f83fad
- https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_Packages
1f83fad
ec7d183
* Sun Jun 12 2016 Thorsten Leemhuis <fedora@leemhuis.info> - 1.2.1-1
ec7d183
- update to 1.2.1
ec7d183
- add appdata stuff (use appstream-util, BR libappstream-glib)
ec7d183
ef01937
* Sun Mar 27 2016 Thorsten Leemhuis <fedora@leemhuis.info> - 1.2.0-1
ef01937
- update to 1.2.0
ef01937
d8be45f
* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 1.1.0-5
d8be45f
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
d8be45f
ce68c57
* Wed Jun 17 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.1.0-4
ce68c57
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
ce68c57
66f0a9e
* Fri Apr 17 2015 Thorsten Leemhuis <fedora@leemhuis.info> - 1.1.0-3
52a1ac7
- update to 1.1.0
52a1ac7
- adjust BR: s/gstreamer-python/gstreamer1-python/
52a1ac7
- drop require on httplib2, not needed anymore
52a1ac7
- drop require on gnome-keyring, it's optional now
52a1ac7
- add dbus-python as requires, as mentioned in docs
52a1ac7
6631f3d
* Sun Jun 29 2014 Thorsten Leemhuis <fedora@leemhuis.info> - 1.0.0-1
6631f3d
- update to 1.0.0
6631f3d
- drop patches
6631f3d
8e84c7b
* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.5.2-5
8e84c7b
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
8e84c7b
07c42a9
* Wed Nov 06 2013 Thorsten Leemhuis <fedora@leemhuis.info> - 0.5.2-4
07c42a9
- add patch to fix sound problem (rhbz #1015900 comment 4)
07c42a9
fbbff09
* Sun Nov 03 2013 Thorsten Leemhuis <fedora@leemhuis.info> - 0.5.2-3
fbbff09
- add patch to work around a API change in NotifyNotification (rhbz #1015900)
fbbff09
95545a6
* Sat Aug 03 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.5.2-2
95545a6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
95545a6
1e6b059
* Sun Nov 25 2012 Thorsten Leemhuis <fedora@leemhuis.info> - 0.5.2-1
1e6b059
- update to 0.5.2
1e6b059
6c02711
* Sun Nov 25 2012 Thorsten Leemhuis <fedora@leemhuis.info> - 0.4.4-1
6c02711
- update to 0.4.4
6c02711
72573ee
* Sun Oct 07 2012 Thorsten Leemhuis <fedora@leemhuis.info> - 0.4.3-1
72573ee
- update to 0.4.3
72573ee
- use the newly added setup.py for install, which simplifies the spec file 
72573ee
  a lot
72573ee
8679399
* Mon Aug 13 2012 Thorsten Leemhuis <fedora@leemhuis.info> - 0.4.2-2
8679399
- apply patch that fixes a issue found during review #847512
8679399
8679399
* Sat Aug 11 2012 Thorsten Leemhuis <fedora@leemhuis.info> - 0.4.2-1
8679399
- initial build