File rmlint.spec of Package rmlint

#
# spec file for package rmlint
#
# Copyright (c) 2023 SUSE LLC
#
# 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 https://bugs.opensuse.org/
#


Name:           rmlint
Version:        2.10.2
Release:        0
Summary:        Extremely fast tool to remove duplicates and other lint from your filesystem
License:        GPL-3.0-only
URL:            http://rmlint.rtfd.org/
Source:         %{name}-%{version}.tar.gz
Patch0:         rmlint-scons-c99.patch
Patch1:		rmlint-issue-679-illegal-number.patch

BuildRequires:  pkgconfig
BuildRequires:  scons
BuildRequires:  %{python_module Sphinx}
BuildRequires:	%{python_module distutils-extra}

BuildRequires:  pkgconfig(blkid)
BuildRequires:  pkgconfig(gio-2.0)
BuildRequires:  pkgconfig(glib-2.0)
BuildRequires:  pkgconfig(gobject-2.0)
BuildRequires:  pkgconfig(json-glib-1.0)
BuildRequires:  pkgconfig(libelf)
BuildRequires:  pkgconfig(sqlite3)

%description
rmlint finds space waste and other broken things on your filesystem and offers to remove it.

%prep
%autosetup -p1

%build
CFLAGS="%{optflags}" scons VERBOSE=1 %{?_smp_mflags} --actual-prefix=%{_prefix}

%install
CFLAGS="%{optflags}" scons VERBOSE=1 %{?_smp_mflags} --prefix=%{buildroot}%{_prefix} --actual-prefix=%{_prefix} install

%find_lang %{name}
%if ! %{with python_frontend}
rm -rvf \
%{buildroot}%{python3_sitelib}/Shredder-*.egg-info \
%{buildroot}%{python3_sitelib}/shredder/ \
%{buildroot}%{_datadir}/applications/shredder.desktop \
%{buildroot}%{_datadir}/glib-2.0/schemas/ \
%{buildroot}%{_datadir}/icons/hicolor/scalable/apps/shredder.svg
%endif


%files -f %{name}.lang
%{_bindir}/rmlint
%if %{with python_frontend}
%{python3_sitelib}/Shredder-*.egg-info
%{python3_sitelib}/shredder/
%{_datadir}/applications/shredder.desktop
%{_datadir}/glib-2.0/schemas/gschemas.compiled
%{_datadir}/glib-2.0/schemas/org.gnome.Shredder.gschema.xml
%{_datadir}/icons/hicolor/scalable/apps/shredder.svg
%endif
%{_mandir}/man1/rmlint.1%{?ext_man}

%changelog
openSUSE Build Service is sponsored by