File rmlint.spec of Package rmlint

Name: rmlint
Version: 2.2.0
Release: 1
Summary: Finds space waste and other broken things on filesystem and offers to remove it
License: GPL-3.0
Group: Productivity/File utilities
URL: https://github.com/sahib/%name
Source: %name-%version.tar.xz
Patch: %name-%version-git.patch

BuildRequires: scons pkg-config
BuildRequires: libelf-devel
BuildRequires: pkgconfig(blkid) pkgconfig(sqlite3)
BuildRequires: pkgconfig(gio-2.0) pkgconfig(gobject-2.0) pkgconfig(glib-2.0)
BuildRequires: python-Sphinx

%description
%name finds space waste and other broken things on filesystem and offers to
remove it.
Features:
Finds
  - duplicate Files and duplicate directories
  - nonstripped binaries (i.e. binaries with debug symbols)
  - paranoia mode for those who do not trust hashsums
  - broken symbolic links
  - empty files and directories
  - files with broken user or/and group ID.


%prep
%setup -q
%patch -p1
sed -i -r \
	-e "/'-Os'/d" \
	-e "/'-march=native'/d" \
	-e '/^def[[:blank:]]+check_sse42/,/^[[:blank:]]+return/s/^([[:blank:]]+return)[[:blank:]].*$/\1 0/' \
	-e "/^if[[:blank:]]+conf\.env\['HAVE_LIBELF'\]:/,/^[[:blank:]]/d" \
	-e "/^if[[:blank:]]+conf\.env\['HAVE_SQLITE3'\]:/,/^[[:blank:]]/d" \
	SConstruct


%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


%files -f %name.lang
%defattr(-,root,root)
%doc CHANGELOG* README*
%_bindir/*
%_mandir/man1/*


%changelog
openSUSE Build Service is sponsored by