File f3.spec of Package f3

#
# spec file for package f3
#
# Copyright (c) 2016 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 http://bugs.opensuse.org/
#


Name:           f3
Version:        6.0
Release:        0
Summary:        Fight Flash Fraud / Fight Fake Flash
License:        GPL-3.0
Group:          Hardware/Other
Url:            http://oss.digirati.com.br/f3/
Source:         https://github.com/AltraMayor/f3/archive/v6.0.tar.gz#/f3-6.0.tar.gz
Patch:          man-www-ref.patch
BuildRequires:  libudev-devel
BuildRequires:  parted-devel

%description
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 experimental tools are also provided, among them one for using
the actual storage capacity of fake drives as safely as possible.

%prep
%setup -q
%patch -p1

%build
make %{?_smp_mflags} all experimental

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

%install
mkdir -p %{buildroot}%{_prefix}/bin
install f3read f3write %{buildroot}%{_prefix}/bin

mkdir -p %{buildroot}%{_prefix}/sbin
install f3probe f3brew f3fix %{buildroot}%{_prefix}/sbin

mkdir -p %{buildroot}%{_mandir}/man1/
install -m 0644 f3read.1 %{buildroot}%{_mandir}/man1/
ln -sf f3read.1 %{buildroot}%{_mandir}/man1/f3write.1

ls -l %{buildroot}%{_mandir}/man1

%files
%defattr(-,root,root)
%doc changelog README.md LICENSE examples
%{_bindir}/f3read
%{_bindir}/f3write
%{_sbindir}/f3probe
%{_sbindir}/f3brew
%{_sbindir}/f3fix
%{_mandir}/man1/f3read.1.gz
%{_mandir}/man1/f3write.1.gz

%changelog
openSUSE Build Service is sponsored by