Summary: Linux hardware monitoring
Summary(ja): Linux ハードウェア監視ソフト
Name: lm-sensors
Version: 3.3.0
Release: 1%{?_dist_release}
License: GPL
Group: Applications/System
URL: http://www.lm-sensors.org/
Source0: http://dl.lm-sensors.org/lm-sensors/releases/lm_sensors-%{version}.tar.bz2
BuildRequires: sysfsutils-devel
BuildRequires: bison, flex
Requires: perl
Requires: initscripts
BuildRoot: %{_tmppath}/%{name}-%{version}-root
Vendor: Project Vine
Distribution: Vine Linux
Packager: shaolin, owa

%description
The lm-sensors package, version 3, provides user-space support for the
hardware monitoring drivers in Linux 2.6.5 and later. For older kernel
versions, you have to use lm-sensors version 2.

Lm-sensors is a hardware health monitoring package for Linux. 
It allows you to access information from temperature, voltage, 
and fan speed sensors. It works with most newer systems.


%package devel
Summary: Development libraries and headers for %{name}
Group: Development/Libraries
Requires: %{name} = %{version}-%{release}

%description devel
Development libraries and headers for %{name}.

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

%build
make all

%install
rm -rf %{buildroot}
make install \
	PREFIX=%{buildroot}%{_prefix} \
	LIBDIR=%{buildroot}%{_libdir} \
	ETCDIR=%{buildroot}%{_sysconfdir} \
	MANDIR=%{buildroot}%{_mandir}

# add initscript from proc/init
mkdir -p %{buildroot}%{_initdir}
install -m755 prog/init/lm_sensors.init %{buildroot}%{_initdir}/lm_sensors

# remove unuse files
rm -f %{buildroot}/%{_libdir}/*.a

%clean
rm -rf %{buildroot}

%post
/sbin/ldconfig
if [ "$1" = 1 ] ; then
	/sbin/chkconfig --add lm_sensors
fi
%{_initdir}/lm_sensors condrestart

%preun
if [ "$1" = 0 ] ; then
	%{_initdir}/lm_sensors stop > /dev/null 2>&1
    /sbin/chkconfig --del lm_sensors
fi

%postun
/sbin/ldconfig


%files
%defattr(-,root,root,-)
%doc CHANGES CONTRIBUTORS COPYING INSTALL README doc
%dir %{_sysconfdir}/sensors.d
%config(noreplace) %{_sysconfdir}/sensors3.conf
%config %{_initdir}/lm_sensors
%{_bindir}/sensors
%{_bindir}/sensors-conf-convert
%{_sbindir}/fancontrol
%ifarch %{ix86} x86_64
%{_sbindir}/isadump
%{_sbindir}/isaset
%endif
%{_sbindir}/pwmconfig
%{_sbindir}/sensors-detect
%{_libdir}/libsensors.so*
%{_mandir}/*/*

%files devel
%{_includedir}/sensors

%changelog
* Tue Apr 12 2011 Satoshi IWAMOTO <satoshi.iwamoto@nifty.ne.jp> 3.3.0-1
- new upstrem release 3.3.0

* Tue Dec 14 2010 Shu KONNO <owa@bg.wakwak.com> 3.2.0-1
- updated lm-sensors to 3.2.0
- added RQ: initscripts

* Tue Mar 16 2010 Shu KONNO <owa@bg.wakwak.com> 3.1.2-1
- updated lm-sensors to 3.1.2

* Tue Oct 20 2009 MATSUBAYASHI Kohji <shaolin@vinelinux.org> - 3.1.1-2
- isadump/isaset only available on ix86/x86_64 archs

* Mon Aug 31 2009 Shu KONNO <owa@bg.wakwak.com> 3.1.1-1
- updated lm-sensors to 3.1.1
- added japanese summary, spec in utf-8
- added %{_initdir}/lm_sensors to %%files
- added %%post, %%preun, %%postun scripts

* Fri Oct 03 2008 Shu KONNO <owa@bg.wakwak.com> 2.10.7-1vl5
- new upstream release
- applied new versioning policy

* Sun Nov 25 2007 Shu KONNO <owa@bg.wakwak.com> - 2.10.3-0vl2
- fixed libdir in Makefile (for support lib64)

* Thu May 29 2007 USAMI Kosuke <usami-k@yc5.so-net.ne.jp> - 2.10.3-0vl1
- Initial build.