Blob Blame History Raw
Name:           mailnag
Version:        1.2.1
Release:        1%{?dist}
Summary:        Mail notification daemon

License:        GPLv2
URL:            https://github.com/pulb/%{name}
Source0:        https://github.com/pulb/%{name}/archive/v%{version}.tar.gz

# python3 won't work (as of 0.4.2)
Requires:       python2  
Requires:       pygobject2
Requires:       gstreamer1-python
Requires:       notify-python
Requires:       pyxdg
Requires:       gnome-keyring
Requires:       dbus-python

BuildArch:      noarch
BuildRequires:  python2-devel
BuildRequires:  gettext
BuildRequires:  desktop-file-utils
BuildRequires:  libappstream-glib

%description
Mailnag checks POP3 and IMAP servers for new mail and when it finds one 
creates a proper GNOME 3 notification that mentions sender and subject.


%prep
%setup -q 

# sooner or later python3 might be the default in Fedora; be prepared
sed -i 's_#!.*/usr/bin/env.*python_#!%{_bindir}/env python2_' $(find . -name '*.py')

%build
CFLAGS="$RPM_OPT_FLAGS" %{__python} setup.py build

%install
rm -rf %{buildroot}
%{__python} setup.py install --skip-build --root $RPM_BUILD_ROOT
desktop-file-validate $RPM_BUILD_ROOT/%{_datadir}/applications/mailnag.desktop
desktop-file-validate $RPM_BUILD_ROOT/%{_datadir}/applications/mailnag-config.desktop
appstream-util validate-relax --nonet $RPM_BUILD_ROOT/%{_datadir}/appdata/*.appdata.xml

%find_lang %{name}


%post
/bin/touch --no-create %{_datadir}/icons/hicolor &>/dev/null || :

%postun
if [ $1 -eq 0 ] ; then
    /bin/touch --no-create %{_datadir}/icons/hicolor &>/dev/null
    /usr/bin/gtk-update-icon-cache -f %{_datadir}/icons/hicolor &>/dev/null || :
fi

%posttrans
/usr/bin/gtk-update-icon-cache -f %{_datadir}/icons/hicolor &>/dev/null || :


%files -f %{name}.lang
%doc AUTHORS LICENSE NEWS README.md 
%{_bindir}/%{name}*
%{_datadir}/%{name}
%{_datadir}/appdata/
%{python_sitelib}/Mailnag
%{python_sitelib}/%{name}-%{version}-*.egg-info
%{_datadir}/applications/*
%{_datadir}/icons/hicolor/*/apps/%{name}*png

%changelog
* Sun Jun 12 2016 Thorsten Leemhuis <fedora@leemhuis.info> - 1.2.1-1
- update to 1.2.1
- add appdata stuff (use appstream-util, BR libappstream-glib)

* Sun Mar 27 2016 Thorsten Leemhuis <fedora@leemhuis.info> - 1.2.0-1
- update to 1.2.0

* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 1.1.0-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild

* Wed Jun 17 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.1.0-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild

* Fri Apr 17 2015 Thorsten Leemhuis <fedora@leemhuis.info> - 1.1.0-3
- update to 1.1.0
- adjust BR: s/gstreamer-python/gstreamer1-python/
- drop require on httplib2, not needed anymore
- drop require on gnome-keyring, it's optional now
- add dbus-python as requires, as mentioned in docs

* Sun Jun 29 2014 Thorsten Leemhuis <fedora@leemhuis.info> - 1.0.0-1
- update to 1.0.0
- drop patches

* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.5.2-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild

* Wed Nov 06 2013 Thorsten Leemhuis <fedora@leemhuis.info> - 0.5.2-4
- add patch to fix sound problem (rhbz #1015900 comment 4)

* Sun Nov 03 2013 Thorsten Leemhuis <fedora@leemhuis.info> - 0.5.2-3
- add patch to work around a API change in NotifyNotification (rhbz #1015900)

* Sat Aug 03 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.5.2-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild

* Sun Nov 25 2012 Thorsten Leemhuis <fedora@leemhuis.info> - 0.5.2-1
- update to 0.5.2

* Sun Nov 25 2012 Thorsten Leemhuis <fedora@leemhuis.info> - 0.4.4-1
- update to 0.4.4

* Sun Oct 07 2012 Thorsten Leemhuis <fedora@leemhuis.info> - 0.4.3-1
- update to 0.4.3
- use the newly added setup.py for install, which simplifies the spec file 
  a lot

* Mon Aug 13 2012 Thorsten Leemhuis <fedora@leemhuis.info> - 0.4.2-2
- apply patch that fixes a issue found during review #847512

* Sat Aug 11 2012 Thorsten Leemhuis <fedora@leemhuis.info> - 0.4.2-1
- initial build