File stream-5.6.spec of Package stream
#
# spec file for package stream (version 5.6)
#
# Copyright (c) 2009 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 http://bugs.opensuse.org/
#
# norootforbuild
#%define _unpackaged_files_terminate_build 0
Name: stream
Url: http://www.cs.virginia.edu/stream/
License: GPLv2
#BuildRequires:
Group: SUSE internal
Summary: Simple workload generator for POSIX systems
#Requires: perl
#Requires: ctcs2
#PreReq: %install_info_prereq
Version: 5.6
Release: 1
Source0: %{name}-%{version}.tar.bz2
Source1: %{name}-ctcs-glue-%{version}.tar.bz2
#Source2: %{name}-%{version}-rpmlintrc
#Patch: %{name}-full-%{version}.diff
BuildRoot: %{_tmppath}/%{name}-%{version}-build
#BuildArch: i386
%description
This program measures memory transfer rates in MB/s for simple
computational kernels coded in C.
%package ctcs-glue
Summary: The let-stream-be-run-via-ctcs glue
Group: SUSE internal
Autoreqprov: on
Requires: ctcs2 >= 0.1.6
Requires: stream = %{version}
#BuildArch: noarch
%description ctcs-glue
This package contains the glue for integrating stream into the ctcs
testing framework.
%prep
cd $RPM_BUILD_DIR
bzip2 -dc $RPM_SOURCE_DIR/%{name}-%{version}.tar.bz2 | tar -xvf -
bzip2 -dc $RPM_SOURCE_DIR/%{name}-ctcs-glue-%{version}.tar.bz2 | tar -xvf -
%build
cd $RPM_BUILD_DIR/%{name}-%{version}
CFLAGS="$RPM_OPT_FLAGS -fno-strict-aliasing"
export CFLAGS
gcc $CFLAGS -O -o stream2 stream2.c
gcc $CFLAGS -O -o stream4 stream4.c
gcc $CFLAGS -O -o stream8 stream8.c
gcc $CFLAGS -O -o stream16 stream16.c
gcc $CFLAGS -O -o stream32 stream32.c
%install
# install for package stress
%{__install} -m 755 -d $RPM_BUILD_ROOT/usr/bin
%{__install} -m 755 %{name}-%{version}/stream2 $RPM_BUILD_ROOT/usr/bin/
%{__strip} -s $RPM_BUILD_ROOT/usr/bin/stream2
%{__install} -m 755 %{name}-%{version}/stream4 $RPM_BUILD_ROOT/usr/bin/
%{__strip} -s $RPM_BUILD_ROOT/usr/bin/stream4
%{__install} -m 755 %{name}-%{version}/stream8 $RPM_BUILD_ROOT/usr/bin/
%{__strip} -s $RPM_BUILD_ROOT/usr/bin/stream8
%{__install} -m 755 %{name}-%{version}/stream16 $RPM_BUILD_ROOT/usr/bin/
%{__strip} -s $RPM_BUILD_ROOT/usr/bin/stream16
%{__install} -m 755 %{name}-%{version}/stream32 $RPM_BUILD_ROOT/usr/bin/
%{__strip} -s $RPM_BUILD_ROOT/usr/bin/stream32
# install for package ctcs-glue
%{__install} -m 755 -d $RPM_BUILD_ROOT/usr/lib/ctcs2
%{__install} -m 755 -d $RPM_BUILD_ROOT/usr/lib/ctcs2/tcf
%{__install} -m 755 -d $RPM_BUILD_ROOT/usr/lib/ctcs2/tools
%{__install} -m 755 -d $RPM_BUILD_ROOT/usr/lib/ctcs2/bin
%{__install} -m 755 -d $RPM_BUILD_ROOT/usr/lib/ctcs2/bin/stream
%{__install} -m 644 %{name}-ctcs-glue-%{version}/stream.tcf $RPM_BUILD_ROOT/usr/lib/ctcs2/tcf/
%{__install} -m 755 %{name}-ctcs-glue-%{version}/stream-run $RPM_BUILD_ROOT/usr/lib/ctcs2/tools/
%{__install} -m 755 %{name}-ctcs-glue-%{version}/stream.sh $RPM_BUILD_ROOT/usr/bin
%{__ln_s} ../../../../bin/stream2 $RPM_BUILD_ROOT/usr/lib/ctcs2/bin/stream/
%{__ln_s} ../../../../bin/stream4 $RPM_BUILD_ROOT/usr/lib/ctcs2/bin/stream/
%{__ln_s} ../../../../bin/stream8 $RPM_BUILD_ROOT/usr/lib/ctcs2/bin/stream/
%{__ln_s} ../../../../bin/stream16 $RPM_BUILD_ROOT/usr/lib/ctcs2/bin/stream/
%{__ln_s} ../../../../bin/stream32 $RPM_BUILD_ROOT/usr/lib/ctcs2/bin/stream/
##%post
##%install_info --info-dir=%{_infodir} %{_infodir}/%{name}.info.gz
##%postun
##%install_info_delete --info-dir=%{_infodir} %{_infodir}/%{name}.info.gz
%clean
rm -rf $RPM_BUILD_ROOT
%files
%defattr(-, root, root)
%attr (0755, root, root) %{_bindir}/stream2
%attr (0755, root, root) %{_bindir}/stream4
%attr (0755, root, root) %{_bindir}/stream8
%attr (0755, root, root) %{_bindir}/stream16
%attr (0755, root, root) %{_bindir}/stream32
%files ctcs-glue
%defattr(-, root, root)
%dir /usr/lib/ctcs2
%dir /usr/lib/ctcs2/tcf
%dir /usr/lib/ctcs2/tools
%dir /usr/lib/ctcs2/bin
%dir /usr/lib/ctcs2/bin/stream
%attr (0644, root, root) /usr/lib/ctcs2/tcf/stream.tcf
%attr (0755, root, root) /usr/lib/ctcs2/tools/stream-run
%attr (0755, root, root) /usr/bin/stream.sh
/usr/lib/ctcs2/bin/stream/stream2
/usr/lib/ctcs2/bin/stream/stream4
/usr/lib/ctcs2/bin/stream/stream8
/usr/lib/ctcs2/bin/stream/stream16
/usr/lib/ctcs2/bin/stream/stream32
%changelog