File duperemove.spec of Package duperemove

# spec file for package duperemove
# Copyright (c) 2015 SUSE LINUX Products GmbH, Nuernberg, Germany.
# 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 tar_version 0.10.beta4
%define samename btrfs-extent-same
Name:           duperemove
Version:        0.10.beta4
Release:        0
Summary:        Software to find duplicate extents in files and remove them
License:        GPL-2.0
Group:          System/Filesystems
BuildRequires:  gcc-c++
BuildRequires:  glib2-devel
BuildRequires:  sqlite3-devel
BuildRoot:      %{_tmppath}/%{name}-%{version}-build

Duperemove finds duplicate extents in files and prints them to the
console. It also has the option to remove duplicates on those file
systems which support the btrfs-extent-same ioctl.

%package -n %{samename}
Summary:        Debug/Test tool to exercise the btrfs out-of-band deduplication ioctl
Group:          System/Filesystems

%description -n %{samename}
Debug/Test tool to exercise a btrfs ioctl for deduplicating file regions.

%setup -q -n %{name}-%{tar_version}
# Set the destdir / prefix
sed -i \
    -e 's:DESTDIR =:DESTDIR ?=:g' \
    -e 's:%{_prefix}/local:/usr:g' \

%if %suse_version <= 1200
make %{?_smp_mflags} CFLAGS="%{optflags} -DNO_BTRFS_HEADER"
make %{?_smp_mflags} CFLAGS="%{optflags}"


%files -n %{samename}
%defattr(-, root, root)

%defattr(-, root, root)

openSUSE Build Service is sponsored by