diff --git a/.gitignore b/.gitignore index e9c9941..61ce093 100644 --- a/.gitignore +++ b/.gitignore @@ -7,3 +7,4 @@ /v1.2.0.tar.gz /v1.2.1.tar.gz /v1.3.0.tar.gz +/mailnag-python3-migration-20191029.zip diff --git a/mailnag.spec b/mailnag.spec index c0cf550..0b2e22e 100644 --- a/mailnag.spec +++ b/mailnag.spec @@ -1,22 +1,25 @@ +%global dailysnapshot 20191029 + Name: mailnag -Version: 1.3.0 -Release: 2%{?dist} +Version: 1.3.1 +Release: 0%{?dist}.py3migration.%{dailysnapshot}.1 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 1.3.0) -Requires: python2 -Requires: pygobject2 -Requires: python2-gstreamer1 -Requires: python2-pyxdg +#URL: https://github.com/pulb/%{name} +#Source0: https://github.com/pulb/%{name}/archive/v%{version}.tar.gz +URL: https://github.com/pulb/mailnag/tree/python3-migration +Source0: mailnag-python3-migration-%{dailysnapshot}.zip + +Requires: python3 +Requires: python3-dbus +Requires: python3-gobject +Requires: python3-gstreamer1 +Requires: python3-pyxdg Requires: gnome-keyring -Requires: python2-dbus BuildArch: noarch -BuildRequires: python2-devel +BuildRequires: python3-devel BuildRequires: gettext BuildRequires: desktop-file-utils BuildRequires: libappstream-glib @@ -27,23 +30,22 @@ 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}/python2_' $(find . -name '*.py') +%setup -q -n mailnag-python3-migration +# make python3 explicit +sed -i 's_#!.*/usr/bin/env.*python.*_#!%{_bindir}/python3_' $(find . -name '*.py') %build -%py2_build +%py3_build %install rm -rf %{buildroot} -%py2_install +%py3_install 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 +appstream-util validate-relax --nonet $RPM_BUILD_ROOT/%{_datadir}/metainfo/*.appdata.xml # fix "non-executable-script" errors -find $RPM_BUILD_ROOT/%{python2_sitelib}/Mailnag -name '*.py' | xargs chmod 755 +chmod 755 $RPM_BUILD_ROOT/%{python3_sitelib}/Mailnag/{__init__.py,common/imaplib2.py} %find_lang %{name} @@ -51,13 +53,16 @@ find $RPM_BUILD_ROOT/%{python2_sitelib}/Mailnag -name '*.py' | xargs chmod 755 %doc AUTHORS LICENSE NEWS README.md %{_bindir}/%{name}* %{_datadir}/%{name} -%{_datadir}/appdata/ -%{python2_sitelib}/Mailnag -%{python2_sitelib}/%{name}-%{version}-*.egg-info +%{_datadir}/metainfo/ +%{python3_sitelib}/Mailnag +%{python3_sitelib}/%{name}-*-*.egg-info %{_datadir}/applications/* %{_datadir}/icons/hicolor/*/apps/%{name}*png %changelog +* Tue Oct 29 2019 Thorsten Leemhuis - 1.3.0-0.py3migration.20191029.1 +- switch to python3-migration snapshot, as python2 nears EOL in rawhide + * Thu Jul 25 2019 Fedora Release Engineering - 1.3.0-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild diff --git a/sources b/sources index e74e56d..c7194c8 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (v1.3.0.tar.gz) = b87a13712af8bc4650a7f64b602a03d6e1a3d2e508d384967e1b8b315c93e460983c879437ef5d661775c84db83193dfdd863be7080630ae99c5757736e0233d +SHA512 (mailnag-python3-migration-20191029.zip) = 2b461d35b1338ff109a53deb8fd8df87b6b9d3b0ad6790a6e46fd5bf38de25f6bded08e08b5aafb65bb74d6903eaaba09ca712cd4d288a71cb65a2e26536ef9e