File i8kutils.spec of Package i8kutils

Name:           i8kutils
# List of additional build dependencies
# BuildRequires:  gcc-c++ libxml2-devel
Version:        1.33
Release:        5
License:        GPL v3
Source0:        %{name}_%{version}.tar.gz
Source1:	i8kmon_1.3.init
# PATCH-FIX-OPENSUSE init_scripts_1.0.patch 
Group:          Hardware/Other
Summary:        A set of tools for accessing the SMM BIOS on Dell laptops
URL: 		http://people.debian.org/~dz//i8k/
Requires: 	aumix ld-linux.so.2 libc.so.6 tcl tk

BuildRoot:      %{_tmppath}/%{name}-%{version}-build

%description
User-space programs for accessing the SMM BIOS of Dell Inspiron and
Latitude laptops. The SMM BIOS is used on most DELL laptops to
implement APM functionalities and to access and monitor custom
hardware, for example the cooling fans, CPU temperature, etc.

%prep
%setup -q -n %{name}-%{version}

%build
make all
mv README.i8kutils README

%install
mkdir -p $RPM_BUILD_ROOT/etc/init.d
mkdir -p $RPM_BUILD_ROOT/etc/default
install -d -m 0755 $RPM_BUILD_ROOT%{_bindir}
install -d -m 0755 $RPM_BUILD_ROOT%{_mandir}/man1
install -d -m 0755 $RPM_BUILD_ROOT%{_sbindir}

make DESTDIR=$RPM_BUILD_ROOT install
make DESTDIR=$RPM_BUILD_ROOT install-man

install -m 644 i8kmon.conf $RPM_BUILD_ROOT/etc

install -m 755 debian/i8kutils.i8kbuttons.init $RPM_BUILD_ROOT/etc/init.d/i8kbuttons
install -m 755 $RPM_SOURCE_DIR/i8kmon_1.3.init $RPM_BUILD_ROOT/etc/init.d/i8kmon
install -m 644 debian/i8kutils.i8kbuttons.default $RPM_BUILD_ROOT/etc/default/i8kbuttons

ln -sf %{_sysconfdir}/init.d/i8kbuttons $RPM_BUILD_ROOT/%{_sbindir}/rci8kbuttons
ln -sf %{_sysconfdir}/init.d/i8kmon $RPM_BUILD_ROOT/%{_sbindir}/rci8kmon

%clean
rm -rf %buildroot

%files 
%defattr(-,root,root)

# This is a place for a proper filelist:
%{_bindir}/i8kbuttons
%{_bindir}/i8kctl
%{_bindir}/i8kmon
%{_bindir}/i8kfan
%{_sbindir}/rci8kbuttons
%{_sbindir}/rci8kmon

# You can also use shell wildcards:
# /usr/share/i8kutils/*
# This installs documentation files from the top build directory
# into /usr/share/doc/...
%doc README COPYING TODO
%doc %{_mandir}/man?/*
%config /etc/init.d/i8kbuttons
%config /etc/init.d/i8kmon
%config /etc/default/i8kbuttons
%config /etc/i8kmon.conf

%changelog
* Sun Nov 29 2009 dawid@klej.net
- updated the i8kmon initscript: removed unneccessary start dependency, updated the failure message
* Sun Nov 29 2009 dawid@klej.net
- updated the i8kmon initscript, fixed restart/probe actions
* Sun Nov 29 2009 dawid@klej.net
- updated the i8kmon initscript
- added /sbin symlinks to initscripts
* Sat Nov 21 2009 dawid@klej.net
- packaged i8kutils version 1.33 using the buildservice spec file wizard
openSUSE Build Service is sponsored by