File xbench.spec of Package xbench

# spec file for package xbench (Version 0.2)
# Copyright (c) 2010 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

# norootforbuild

Name:           xbench
BuildRequires:  xorg-x11 xorg-x11-devel
License:        Public Domain, Freeware
Group:          System/Benchmark
AutoReqProv:    on
Version:        0.2
Release:        1223
Summary:        Benchmark for X11
Source:         xbench-%{version}.tar.bz2
Patch:          xbench-%{version}.patch
Patch1:         xbench-%{version}-ia64.patch
Patch2:         xbench-%{version}-nonvoid.patch
Patch3:         xbench-%{version}-gets.patch
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
%define _xorg7libs %_lib
%define _xorg7libs32 lib
%define _xorg7bin bin
%define _xorg7_mandir %_mandir
%define _xorg7pixmaps include
%define _xorg7libshare share
%define _xorg7_xkb /usr/share/X11/xkb
%define _xorg7_termcap /usr/lib/X11/etc
%define _xorg7_serverincl /usr/include/xorg
%define _xorg7_fonts /usr/share/fonts
#%define _xorg7_config /usr/share/X11/config #use libshare macro
%define _xorg7_prefix /usr

A benchmark for X11.


xmkmf -a
make %{?jobs:-j%jobs} CCOPTIONS="$RPM_OPT_FLAGS"

make "DESTDIR=$RPM_BUILD_ROOT" install
install -d $RPM_BUILD_ROOT%{_defaultdocdir}/xbench
install -d $RPM_BUILD_ROOT/usr/%{_xorg7libshare}/X11/xbench/results
install -d $RPM_BUILD_ROOT/usr/%{_xorg7libshare}/X11/xbench/scripts
install -m 644 AUTHOR CHANGES IAFA-PACKAGE README xbench.doc Makefile \
install -m 644 results/* $RPM_BUILD_ROOT/usr/%{_xorg7libshare}/X11/xbench/results
install -m 644 scripts/* $RPM_BUILD_ROOT/usr/%{_xorg7libshare}/X11/xbench/scripts
chmod a+x $RPM_BUILD_ROOT/usr/%{_xorg7libshare}/X11/xbench/scripts/
cd $RPM_BUILD_ROOT%{_defaultdocdir}/xbench; ln -sf ../../../../%{_xorg7libshare}/X11/xbench benchmarks 

%doc %{_defaultdocdir}/xbench
%doc %{_xorg7_mandir}/man1/xbench.1x*