File bandwidth.spec of Package bandwidth

# spec file for package bandwidth
# 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:           bandwidth
Version:        1.5.1
Release:        0
Summary:        Memory and network benchmark program
License:        GPL-2.0
Group:          System/Benchmark
Patch0:         bandwidth-fix-cflags.diff
BuildRequires:  nasm
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
ExclusiveArch:  %{ix86} x86_64

bandwidth is an artificial benchmark primarily for measuring memory bandwidth
on x86 and x86_64 based computers, useful for identifying weaknesses in a
computer's memory subsystem, in the bus architecture, in the cache architecture
and in the processor itself.

%setup -q
%patch0 -p1
chmod 644 README.txt COPYING.txt

# currently fails with No rule to make target 'routines-arm-32bit.asm', needed by 'bandwidth-arm32'
%ifarch %arm
make %{?_smp_mflags} bandwidth-arm32

export CFLAGS="%{optflags}"
%ifarch %{ix86}
make %{?_smp_mflags} bandwidth32
mv bandwidth32 %{name}

%ifarch x86_64
make %{?_smp_mflags} bandwidth64
mv bandwidth64 %{name}

install -Dsm 755 %{name} %{buildroot}/%{_bindir}/%{name}

%doc README.txt COPYING.txt

openSUSE Build Service is sponsored by