File bleachbit.spec of Package bleachbit

# spec file for package bleachbit
# Copyright (c) 2021 SUSE LLC
# Copyright (c) 8/2011 by open-slx GmbH <>
# Copyright (c) 2010 - 7/2011 by Sascha Manns <>
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.

# Please submit bugfixes or comments via

%define         _desktopname       org.bleachbit.BleachBit

Name:           bleachbit
Version:        4.3.0
Release:        0
Summary:        Tool for removing unnecessary files, freeing space, and maintaining privacy
License:        GPL-3.0-only
Group:          Productivity/File utilities
BuildRequires:  fdupes
BuildRequires:  gobject-introspection
BuildRequires:  kf5-filesystem
BuildRequires:  python-rpm-macros
BuildRequires:  python3-setuptools
BuildRequires:  update-desktop-files
BuildRequires:  pkgconfig(systemd)
Requires:       python3
Requires:       python3-chardet
Requires:       python3-gobject
Requires:       python3-gobject-Gdk
Requires:       python3-xml
Requires:       xdg-utils
BuildArch:      noarch

BleachBit deletes unnecessary files to free valuable disk space and
maintain privacy. Rid your system of old junk including broken
menu entries, cache, cookies, localizations, and temporary files.
Designed for Linux  systems, it wipes clean Bash, Beagle, Epiphany,
Firefox, Flash, GNOME, Java, KDE,, Opera, RealPlayer,
VIM, XChat, and more.

%setup -q
sed -i -e 's|%{_bindir}/env python.*|%{_bindir}/python3|g' \

make -C po local %{?_smp_mflags}
python3 build

make DESTDIR=%{buildroot} install prefix=%{_prefix}

# create root desktop-file and change exec
cp %{_desktopname}.desktop %{_desktopname}-root.desktop
sed -i -e 's/Name=BleachBit$/Name=BleachBit as Administrator/g' \
sed -i -e 's/^Exec=bleachbit$/Exec=xdg-su -c bleachbit/g' \
# installing .desktop Files
%suse_update_desktop_file -n    %{_desktopname}      Utility Filesystem
%suse_update_desktop_file -n -i %{_desktopname}-root Utility Filesystem

%find_lang %{name}
%fdupes -s %{buildroot}

# Fix non-executable-script
chmod +x %{buildroot}%{_datadir}/%{name}/
chmod +x %{buildroot}%{_datadir}/%{name}/

%doc doc/*
%license COPYING

%files lang -f %{name}.lang

openSUSE Build Service is sponsored by