File cpuburn.spec of Package cpuburn

#
# spec file for package cpuburn_1.4a
#
# Copyright (c) 2019 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/
#

%define         debrelease 6
Name:           cpuburn
Version:        1.4a
Release:        0
Summary:        CPU stress test
License:        GPL-2.0-only
Group:          Hardware/Other
URL:            https://launchpad.net/ubuntu/+source/cpuburn
Source:         %{name}_%{version}-%{debrelease}.dsc
Source1:        %{name}_%{version}-%{debrelease}.debian.tar.xz
Source2:        %{name}_%{version}.orig.tar.gz
BuildRequires:  dpkg-devel
ExclusiveArch:  x86_64 %ix86 armv7hl

%description
Little programs designed to load a CPU core as much as possible.

%prep
rm -rf %{name}-%{version}
dpkg-source -x %{SOURCE0}

%build
cd %{name}-%{version}
%ifarch %arm
cd ARM
%endif
%make_build CC=gcc

%install
cd %{name}-%{version}
%ifarch %arm
cd ARM
%endif
files=""
for f in *.S *.s ; do
	[ -f "$f" ] || continue
	f=$(basename $f .S)
	f=$(basename $f .s)
	files="$files $f"
done
install -D -m 755 -t %{buildroot}%{_bindir} $files
%ifarch %arm
cd ..
install -D -m 644 -T debian/arm/cpuburn.1 %{buildroot}%{_mandir}/man7/cpuburn.7
%else
install -D -m 644 -T debian/x86/cpuburn.1 %{buildroot}%{_mandir}/man7/cpuburn.7
%endif
mkdir -p %{buildroot}%{_mandir}/man1
for i in $files ; do
	ln -s ../man7/cpuburn.7 %{buildroot}%{_mandir}/man1/$i.1
done

%files
%ifarch %arm
%doc %{name}-%{version}/ARM/Design
%else
%doc %{name}-%{version}/Design
%endif
%doc %{name}-%{version}/README
%{_bindir}/*
%{_mandir}/*/*

%changelog

openSUSE Build Service is sponsored by