c9c5bb3
Name:       bleachbit
c9c5bb3
Summary:    Remove sensitive data and free up disk space
c9c5bb3
URL:        https://www.bleachbit.org/
c9c5bb3
Version:    4.0.0
8c11525
Release:    3%{?dist}
c9c5bb3
License:    GPLv3+ and MIT
c9c5bb3
BuildArch:  noarch
c9c5bb3
1aa55c0
# Development and bug reports mostly seem to happen BleachBit's GitHub project, but their documentation points to SourceForge for the GPG public key and signatures, so that's where we'll need to get the source tarballs -- https://docs.bleachbit.org/doc/install-on-linux.html#digital-signatures
1aa55c0
#Source0: https://github.com/%%{name}/%%{name}/archive/v%%{version}/%%{name}-%%{version}.tar.gz
1aa55c0
Source0: https://svwh.dl.sourceforge.net/project/bleachbit/bleachbit/%{version}/bleachbit-%{version}.tar.gz
1aa55c0
Source1: https://svwh.dl.sourceforge.net/project/bleachbit/bleachbit/%{version}/detached_signatures/bleachbit-%{version}.tar.gz.sig
1aa55c0
Source2: https://svwh.dl.sourceforge.net/project/bleachbit/public_key/andrew2019.key
c9c5bb3
c9c5bb3
BuildRequires: desktop-file-utils
c9c5bb3
BuildRequires: gettext
1aa55c0
BuildRequires: gnupg2
c9c5bb3
BuildRequires: libappstream-glib
c9c5bb3
BuildRequires: make
c9c5bb3
BuildRequires: python3-devel
c9c5bb3
BuildRequires: python3-setuptools
c9c5bb3
%if 0%{?rhel}  &&  0%{?rhel} < 8
c9c5bb3
BuildRequires: python3-rpm-macros
c9c5bb3
%endif
c9c5bb3
c9c5bb3
Requires: gtk3
c9c5bb3
Requires: python3-chardet
c9c5bb3
Requires: python3-gobject
c9c5bb3
c9c5bb3
%description
c9c5bb3
Delete traces of your computer activity and other junk files to free
c9c5bb3
disk space and maintain privacy.
c9c5bb3
c9c5bb3
With BleachBit, you can free cache, delete cookies, clear Internet
c9c5bb3
history, shred temporary files, delete logs, and discard junk you didn't
c9c5bb3
know was there. Designed for Linux and Windows systems, it wipes clean
c9c5bb3
thousands of applications including Firefox, Internet Explorer, Adobe
c9c5bb3
Flash, Google Chrome, Opera, Safari, and many more. Beyond simply
c9c5bb3
deleting files, BleachBit includes advanced features such as shredding
c9c5bb3
files to prevent recovery, wiping free disk space to hide traces of
c9c5bb3
files deleted by other applications, and cleaning Web browser profiles
c9c5bb3
to make them run faster.
c9c5bb3
c9c5bb3
c9c5bb3
c9c5bb3
%prep
1aa55c0
%{gpgverify} --keyring='%{SOURCE2}' --signature='%{SOURCE1}' --data='%{SOURCE0}'
c9c5bb3
%setup -q
c9c5bb3
4ed5f1e
c9c5bb3
# Disable update notifications, since package will be updated by DNF or Packagekit.
c9c5bb3
sed 's/online_update_notification_enabled = True/online_update_notification_enabled = False/g'  --in-place ./bleachbit/__init__.py
c9c5bb3
0e563b7
# These get installed to %%{_datadir} as non-executable files, and so shouldn't need a shebang at all.
0e563b7
find ./bleachbit/  -type f  -iname '*.py'  -exec sed --regexp-extended '1s|^#! ?/.+$||g' --in-place '{}' +
0e563b7
0e563b7
# Replace any remaining env shebangs, or shebangs calling unversioned or unnecessarily specifically versioned Python, with plain python3.
0e563b7
find ./  -type f  -iname '*.py'  -exec sed --regexp-extended '1s|^#! ?/usr/bin/env python3?$|#!%{_bindir}/python3|g' --in-place '{}' +
0e563b7
find ./  -type f  -iname '*.py'  -exec sed --regexp-extended '1s|^#! ?/usr/bin/python[[:digit:][:punct:]]*$|#!%{_bindir}/python3|g' --in-place '{}' +
c9c5bb3
c9c5bb3
cc74d6d
c9c5bb3
%build
c9c5bb3
%py3_build
c9c5bb3
%make_build --directory ./po/
c9c5bb3
c9c5bb3
# Remove Windows-specific functionality.
7611d38
%make_build delete_windows_files
c9c5bb3
c9c5bb3
c9c5bb3
c9c5bb3
%install
7a3afdd
%make_install  PYTHON=%{__python3}  prefix=%{_prefix}  INSTALL="%{_bindir}/install -Dp"
7a3afdd
%make_install --directory ./po/  PYTHON=%{__python3}  prefix=%{_prefix}  INSTALL="%{_bindir}/install -Dp"
c9c5bb3
cc74d6d
desktop-file-install --dir=%{buildroot}/%{_datadir}/applications/  org.bleachbit.BleachBit.desktop
c9c5bb3
install -Dp  org.bleachbit.BleachBit.metainfo.xml  %{buildroot}/%{_metainfodir}/
c9c5bb3
cc74d6d
# "BleachBit As Administrator" app launcher is broken, so we're not shipping any polkit files for now -- https://github.com/bleachbit/bleachbit/issues/950
cc74d6d
rm %{buildroot}/%{_datadir}/polkit-1/actions/org.bleachbit.policy
cc74d6d
c9c5bb3
%find_lang %{name}
c9c5bb3
c9c5bb3
c9c5bb3
c9c5bb3
%check
cc74d6d
desktop-file-validate %{buildroot}/%{_datadir}/applications/org.bleachbit.BleachBit.desktop
c9c5bb3
appstream-util validate-relax --nonet %{buildroot}/%{_metainfodir}/org.bleachbit.BleachBit.metainfo.xml
c9c5bb3
c9c5bb3
c9c5bb3
c9c5bb3
%files -f %{name}.lang
c9c5bb3
%doc  README*  CONTRIBUTING.md
c9c5bb3
%license COPYING
cc74d6d
%{_bindir}/bleachbit
c9c5bb3
%{_datadir}/bleachbit/
cc74d6d
%{_datadir}/applications/org.bleachbit.BleachBit.desktop
4ed5f1e
%{_metainfodir}/org.bleachbit.BleachBit.metainfo.xml
c9c5bb3
%{_datadir}/pixmaps/bleachbit.png
c9c5bb3
c9c5bb3
c9c5bb3
c9c5bb3
c9c5bb3
c9c5bb3
%changelog
8c11525
* Mon Jul 27 2020 Fedora Release Engineering <releng@fedoraproject.org> - 4.0.0-3
8c11525
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
8c11525
1aa55c0
* Tue Jul 14 2020 Andrew Toskin <andrew@tosk.in> - 4.0.0-2
1aa55c0
- Finished unretired package.
1aa55c0
- GPG-verify source tarball.
1aa55c0
- Omit upstream's "BleachBit As Administrator" app launcher, since it's
1aa55c0
  broken on Fedora.
1aa55c0
376b2b2
* Wed Apr 22 2020 Andrew Toskin <andrew@tosk.in> - 4.0.0-1
c9c5bb3
- Prepare to unretire package after upstream ported to GTK3 and Python3.