LogoopenSUSE Build Service > Projects
Sign Up | Log In

View File i7z.spec of Package i7z (Project home:malcolmlewis:openSUSE_General)

#
# spec file for package i7z
#
# Copyright (c) 2012 Malcolm J Lewis <malcolmlewis@opensuse.org>
#
# 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:           i7z
Version:        0.27.2+r112
Release:        0
Summary:        Reporting Tool for i3, i5 and i7 CPU's
License:        GPL-2.0 and GPL-3.0
Group:          System/Monitoring
Url:            http://i7z.googlecode.com
Source0:        %{name}-%{version}.tar.bz2
#Source0 via svn checkout http://i7z.googlecode.com/svn/trunk/ i7z-0.27.2+r112
# Then tar cvjf i7z-0.27.2+r112.tar.bz2 i7z-0.27.2+r112/
Source1:        http://i7z.googlecode.com/svn/trunk/i7z_rw_registers.rb
Source2:        i7z.1
Source3:        i7z_rw_registers.1
# PATCH-FIX-OPENSUSE i7z-add-optflags.patch malcolmlewis@opensuse.org -- Add additional CFLAGS for compiling to fix build check warning.
Patch0:         i7z-add-optflags.patch
BuildRequires:  ncurses-devel
Requires:       msr-tools
Requires:       ruby
BuildRoot:      %{_tmppath}/%{name}-%{version}-build

%description
A better i7 (and now i3, i5) reporting tool for Linux. This package also
provides a ncurces gui.

Includes a script to read/write to registers on Nehalems and Sandy Bridges
to change multipliers, turbo mode, check power and clock modulation.

%prep
%setup -q
%patch0 -p1

%build
make clean
export OPT_FLAGS="%{optflags}"
make bin %{?_smp_mflags}

%install
install -D -m 0755 %{name} %{buildroot}%{_sbindir}/%{name}
install -D -m 0644 %{S:1}  %{buildroot}%{_datadir}/%{name}/i7z_rw_registers.rb
cat > %{buildroot}%{_sbindir}/i7z_rw_registers <<EOF
#!/usr/bin/sh
ruby %{_datadir}/%{name}/i7z_rw_registers.rb
EOF
chmod 0755 %{buildroot}%{_sbindir}/i7z_rw_registers
mkdir -p %{buildroot}%{_mandir}/man1
install -D -m 0644 %{S:2} %{buildroot}%{_mandir}/man1/
install -D -m 0644 %{S:3} %{buildroot}%{_mandir}/man1/

%files
%defattr(-,root,root)
%doc README.txt
%{_sbindir}/%{name}
%{_sbindir}/i7z_rw_registers
%dir %{_datadir}/%{name}
%{_datadir}/%{name}/i7z_rw_registers.rb
%{_mandir}/man1/i7z.1%{?ext_man}
%{_mandir}/man1/i7z_rw_registers.1%{?ext_man}

%changelog