]> git.pld-linux.org Git - packages/lm_sensors.git/blobdiff - lm_sensors.spec
- back to 2.6.5
[packages/lm_sensors.git] / lm_sensors.spec
index 46583cda308d5f6003e5078d8f06ee0a6495dc80..b5919d0b75641acf28587f33867e5142b5405cae 100644 (file)
@@ -1,7 +1,10 @@
 # conditional build
 # _without_dist_kernel         without kernel for distributions
+#
 %include        /usr/lib/rpm/macros.perl
-%define         _rel 0.9
+
+%define                _kernel_ver     %(grep UTS_RELEASE %{_kernelsrcdir}/include/linux/version.h 2>/dev/null | cut -d'"' -f2)
+%define                _kernel_ver_str %(echo %{_kernel_ver} | sed s/-/_/g)
 
 Summary:       Hardware health monitoring
 Summary(pl):   Monitor stanu sprzêtu
@@ -9,7 +12,8 @@ Summary(pt_BR):        Ferramentas para monitora
 Summary(ru):   õÔÉÌÉÔÙ ÄÌÑ ÍÏÎÉÔÏÒÉÎÇÁ ÁÐÐÁÒÁÔÕÒÙ
 Summary(uk):   õÔÉ̦ÔÉ ÄÌÑ ÍÏΦÔÏÒÉÎÇÕ ÁÐÁÒÁÔÕÒÉ
 Name:          lm_sensors
-Version:       2.6.4
+Version:       2.6.5
+%define _rel   1
 Release:       %{_rel}
 License:       GPL
 Group:         Applications/System
@@ -17,6 +21,7 @@ Source0:      http://secure.netroedge.com/~lm78/archive/%{name}-%{version}.tar.gz
 Source1:       sensors.init
 Source2:       sensors.sysconfig
 Patch0:                %{name}-make.patch
+Patch1:                %{name}-ppc.patch
 URL:           http://www.lm-sensors.nu/
 BuildRequires: bison
 BuildRequires: flex >= 2.5.1
@@ -29,6 +34,8 @@ PreReq:               /sbin/ldconfig
 BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 Obsoletes:     liblm_sensors1
 
+%define                _kernel24       %(echo %{_kernel_ver} | grep -q '2\.[012]\.' ; echo $?)
+
 %description
 Tools for monitoring the hardware health of Linux systems containing
 hardware health monitoring hardware such as the LM78 and LM75.
@@ -155,6 +162,7 @@ Modu
 %prep
 %setup -q
 %patch0 -p1
+%patch1 -p1
 
 %build
 #up
@@ -200,8 +208,9 @@ install -d $RPM_BUILD_ROOT{%{_sbindir},%{_mandir}/man8} \
        MODDIR=/lib/modules/%{_kernel_ver}smp/misc \
        MODPREF=/lib/modules/%{_kernel_ver}smp
 
-install prog/eepromer/{eeprom,eepromer} $RPM_BUILD_ROOT%{_sbindir}
+install prog/eepromer/{eeprom,eepromer}        $RPM_BUILD_ROOT%{_sbindir}
 install prog/dump/{i2c{dump,set},isadump} $RPM_BUILD_ROOT%{_sbindir}
+install prog/detect/i2cdetect $RPM_BUILD_ROOT%{_sbindir}
 
 install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/sensors
 install %{SOURCE2} $RPM_BUILD_ROOT/etc/sysconfig/sensors
@@ -211,19 +220,19 @@ install kernel-up-modules/misc/* $RPM_BUILD_ROOT/lib/modules/%{_kernel_ver}/misc
 %clean
 rm -rf $RPM_BUILD_ROOT
 
-%post
-/sbin/ldconfig
+%post -p /sbin/ldconfig
+
+%post sensord
 /sbin/chkconfig --add sensors
 if [ -f /var/lock/subsys/sensors ]; then
        /etc/rc.d/init.d/sensors restart >&2
 else
-       echo "You have to configure sensors modules."
-       echo "Please edit /etc/sysconfig/sensors file according to your hardware."
+       echo "You have to configure sensors modules in /etc/sysconfig/sensors"
        echo
        echo "Run \"/etc/rc.d/init.d/sensors start\" to start sensors daemon." >&2
 fi
 
-%preun
+%preun sensord
 if [ "$1" = "0" ]; then
        if [ -f /var/lock/subsys/sensors ]; then
                /etc/rc.d/init.d/sensors stop >&2
@@ -252,6 +261,9 @@ fi
 %doc prog/{config,daemon,eeprom,eepromer/README*,matorb,maxilife,xeon}
 %attr(755,root,root) %{_bindir}/sensors
 %attr(755,root,root) %{_sbindir}/sensors-detect
+%if %{_kernel24}
+%attr(755,root,root) %{_sbindir}/dmidecode
+%endif
 %attr(755,root,root) %{_sbindir}/eeprom*
 %attr(755,root,root) %{_sbindir}/i2c*
 %attr(755,root,root) %{_sbindir}/isadump
This page took 0.041133 seconds and 4 git commands to generate.