diff --git a/bleachbit.spec b/bleachbit.spec index 3fba673..2f48bfa 100644 --- a/bleachbit.spec +++ b/bleachbit.spec @@ -2,7 +2,7 @@ Name: bleachbit Summary: Remove sensitive data and free up disk space URL: https://www.bleachbit.org/ Version: 4.2.0 -Release: 1%{?dist} +Release: 2%{?dist} License: GPLv3+ and MIT BuildArch: noarch @@ -26,7 +26,11 @@ BuildRequires: python3-rpm-macros Requires: gtk3 Requires: python3-chardet +%if 0%{?rhel} && 0%{?rhel} < 8 +Requires: python36-gobject +%else Requires: python3-gobject +%endif %description Delete traces of your computer activity and other junk files to free @@ -44,13 +48,32 @@ to make them run faster. +# EPEL7 still defaults to Python 2. +%if 0%{?rhel} && 0%{?rhel} < 8 +%global __python %{__python3} +%endif + +# EPEL7 rpmbuild still defines _metainfodir as /usr/share/appdata/, even though plenty of packages use the newer /usr/share/metainfo/. +%if 0%{?rhel} && 0%{?rhel} < 8 +%global _metainfodir %{_datadir}/metainfo +%endif + + + %prep # Can't verify the tarball all at once because upstream switched from detached signature file to a signed checksum... # %%{gpgverify} --keyring='%%{SOURCE2}' --signature='%%{SOURCE1}' --data='%%{SOURCE0}' gpg2 --import %{SOURCE2} gpg2 --verify %{SOURCE1} + cd %{_sourcedir} +# Old version of sha256sum on EPEL7 doesn't support ignoring missing files or PGP signature in the checksum file, so we have to filter for the one line we want. +%if 0%{?rhel} && 0%{?rhel} < 8 +grep "bleachbit-%{version}.tar.bz2" %{SOURCE1} > ./extracted-checksum.txt +sha256sum --check ./extracted-checksum.txt +%else sha256sum --ignore-missing --check %{SOURCE1} +%endif @@ -116,6 +139,9 @@ appstream-util validate-relax --nonet %{buildroot}/%{_metainfodir}/org.bleachbit %changelog +* Fri Jan 15 2021 Andrew Toskin - 4.2.0-2 +- Adjust package spec to build for EPEL7. + * Wed Jan 6 2021 Andrew Toskin - 4.2.0-1 - Bump to upstream version 4.2.0, which, among other things, adds new cleaners and regular expression-based searches during deep scans.