File f3.spec of Package f3

# spec file for package f3
# Copyright (c) 2018 SUSE LINUX 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

Name:           f3
Version:        7.0
Release:        0
Summary:        Fight Flash Fraud / Fight Fake Flash
License:        GPL-3.0
Group:          Hardware/Other
Patch0:         remove-ownership-setting.patch
BuildRequires:  libudev-devel
BuildRequires:  parted-devel

This package contains tools for identifying fake flash drives (primarily USB
sticks and memory cards).

A fake flash drive fraudulently inflates its apparent storage capacity (far)
beyond the physical capacity of its flash memory. Not surprisingly, using such
a flash drive will, sooner or later, result in data loss and/or corruption.

The main tools in this package are an open-source implementation of the H2testw
algorithm. Some extra tools are also provided, among them one for using
the actual storage capacity of fake drives as safely as possible.

%setup -q

# workaround for libargp problem. see:
%if %{?suse_version} < 1500
export CFLAGS="%{optflags} -fgnu89-inline"
export CFLAGS="%{optflags}"
make %{?_smp_mflags} all extra

mkdir examples
mv log-f3wr f3write.h2w examples
chmod a-x examples/*

%make_install PREFIX=%{_prefix} install-extra

%doc changelog README.rst LICENSE examples