aekoroglu ad5bb95
# EPEL7 changes for Python and metainfodir
aekoroglu ad5bb95
%if 0%{?rhel} && 0%{?rhel} < 8
aekoroglu ad5bb95
%global __python %{__python3}
aekoroglu ad5bb95
%global _metainfodir %{_datadir}/metainfo
aekoroglu ad5bb95
%endif
aekoroglu ad5bb95
aekoroglu ad5bb95
Name:		bleachbit
7a85c11
Version:	4.6.0
7a85c11
Release:	1%{?dist}
aekoroglu ad5bb95
Summary:	Remove sensitive data and free up disk space
aekoroglu ad5bb95
7a85c11
License:	GPL-3.0-or-later
aekoroglu ad5bb95
URL:		https://www.bleachbit.org/
aekoroglu ad5bb95
Source:		https://github.com/bleachbit/bleachbit/archive/v%{version}/%{name}-%{version}.tar.gz
aekoroglu ad5bb95
aekoroglu ad5bb95
Patch0:		no_update.patch
aekoroglu ad5bb95
# https://github.com/bleachbit/bleachbit/issues/950
aekoroglu ad5bb95
Patch1:		disable_policykit.patch
aekoroglu ad5bb95
aekoroglu ad5bb95
BuildArch:	noarch
aekoroglu ad5bb95
aekoroglu ad5bb95
BuildRequires:	desktop-file-utils
aekoroglu ad5bb95
BuildRequires:	gettext
aekoroglu ad5bb95
BuildRequires:	libappstream-glib
aekoroglu ad5bb95
BuildRequires:	make
aekoroglu ad5bb95
BuildRequires:	python3-devel
c9c5bb3
%if 0%{?rhel}  &&  0%{?rhel} < 8
aekoroglu ad5bb95
BuildRequires:	python3-rpm-macros
c9c5bb3
%endif
7a85c11
BuildRequires:	pkgconfig(systemd)
c9c5bb3
aekoroglu ad5bb95
Requires:	gtk3
aekoroglu ad5bb95
Requires:	python3-chardet
6f9e603
%if 0%{?rhel}  &&  0%{?rhel} < 8
aekoroglu ad5bb95
Requires:	python36-gobject
6f9e603
%else
aekoroglu ad5bb95
Requires:	python3-gobject
6f9e603
%endif
c9c5bb3
aekoroglu ad5bb95
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
%prep
aekoroglu ad5bb95
%autosetup -p1
53152d1
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
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
# 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
73e2181
# SafeConfigParser class removed from the configparser module in Python 3.12
73e2181
sed -i -e "s|SafeConfigParser|ConfigParser|" bleachbit/__init__.py
73e2181
aekoroglu ad5bb95
%generate_buildrequires
aekoroglu ad5bb95
%pyproject_buildrequires -r
c9c5bb3
cc74d6d
c9c5bb3
%build
aekoroglu ad5bb95
%pyproject_wheel
c9c5bb3
aekoroglu ad5bb95
make -C po local
c9c5bb3
# Remove Windows-specific functionality.
7611d38
%make_build delete_windows_files
c9c5bb3
c9c5bb3
c9c5bb3
%install
aekoroglu ad5bb95
%make_install prefix=%{_prefix}
c9c5bb3
aekoroglu ad5bb95
desktop-file-install --dir=%{buildroot}/%{_datadir}/applications/ org.bleachbit.BleachBit.desktop
aekoroglu ad5bb95
install -Dp org.bleachbit.BleachBit.metainfo.xml %{buildroot}/%{_metainfodir}/
cc74d6d
c9c5bb3
%find_lang %{name}
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
%files -f %{name}.lang
aekoroglu ad5bb95
%doc README* doc
c9c5bb3
%license COPYING
cc74d6d
%{_bindir}/bleachbit
cc74d6d
%{_datadir}/applications/org.bleachbit.BleachBit.desktop
aekoroglu ad5bb95
%{_datadir}/bleachbit
c9c5bb3
%{_datadir}/pixmaps/bleachbit.png
aekoroglu ad5bb95
%{_metainfodir}/org.bleachbit.BleachBit.metainfo.xml
c9c5bb3
c9c5bb3
c9c5bb3
%changelog
7a85c11
* Thu Feb 22 2024 Ali Erdinc Koroglu <aekoroglu@fedoraproject.org> - 4.6.0-1
7a85c11
- Update to 4.6.0
7a85c11
d2301da
* Tue Jan 23 2024 Fedora Release Engineering <releng@fedoraproject.org> - 4.4.2-6
d2301da
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
d2301da
decd026
* Fri Jan 19 2024 Fedora Release Engineering <releng@fedoraproject.org> - 4.4.2-5
decd026
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
decd026
73e2181
* Fri Jul 28 2023 Ali Erdinc Koroglu <aekoroglu@fedoraproject.org> - 4.4.2-4
73e2181
* Python 3.12 fix (RHBZ #2226993)
73e2181
a3f8584
* Wed Jul 19 2023 Fedora Release Engineering <releng@fedoraproject.org> - 4.4.2-3
a3f8584
- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild
a3f8584
8b34f80
* Wed Jan 18 2023 Fedora Release Engineering <releng@fedoraproject.org> - 4.4.2-2
8b34f80
- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild
8b34f80
aekoroglu ad5bb95
* Mon Jul 25 2022 Ali Erdinc Koroglu <aekoroglu@fedoraproject.org> - 4.4.2-1
aekoroglu ad5bb95
- Update to 4.4.2 (RHBZ #2016863)
aekoroglu ad5bb95
03ea841
* Wed Jul 20 2022 Fedora Release Engineering <releng@fedoraproject.org> - 4.4.0-3
03ea841
- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
03ea841
ae3f2a5
* Wed Jan 19 2022 Fedora Release Engineering <releng@fedoraproject.org> - 4.4.0-2
ae3f2a5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
ae3f2a5
d08afec
* Mon Sep 13 2021 Audrey Toskin <audrey@tosk.in> - 4.4.0-1
d08afec
- Bump to upstream version 4.4.0, with upstream enhancements documented
d08afec
  here: https://www.bleachbit.org/news/bleachbit-440
d08afec
29382c9
* Wed Jul 21 2021 Fedora Release Engineering <releng@fedoraproject.org> - 4.2.0-4
29382c9
- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
29382c9
055ceec
* Tue Jan 26 2021 Fedora Release Engineering <releng@fedoraproject.org> - 4.2.0-3
055ceec
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
055ceec
6fe7f96
* Fri Jan 15 2021 Audrey Toskin <audrey@tosk.in> - 4.2.0-2
6f9e603
- Adjust package spec to build for EPEL7.
6f9e603
6fe7f96
* Wed Jan 6 2021 Audrey Toskin <audrey@tosk.in> - 4.2.0-1
53152d1
- Bump to upstream version 4.2.0, which, among other things, adds new
53152d1
  cleaners and regular expression-based searches during deep scans.
53152d1
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