%bcond_with kernel24 %lib_package sensors 3 %kmdl lm_sensors %if %{with kernel24} %define i2c_headers %{_includedir}/i2c %else %define i2c_headers %{_includedir} %endif Name: lm_sensors Version: 2.10.6 Release: 53%{?dist} URL: http://lm-sensors.org/ Source0: http://dl.lm-sensors.org/lm-sensors/releases/lm_sensors-%{version}.tar.gz Source1: http://dl.lm-sensors.org/lm-sensors/releases/lm_sensors-%{version}.tar.gz.asc Source3: sensord Source4: sensord.cgi Patch3: lm_sensors-2.6.4-glibc22.patch #Patch5: lm_sensors-2.8.0-utf8.patch #Patch6: lm_sensors-2.8.2-expr.patch Patch10: lm_sensors-2.8.5-adm1026id.patch Summary: Hardware monitoring tools. Group: Applications/System License: GPL Buildroot: %{_tmppath}/%{name}-root BuildRequires: flex, bison, m4, rrdtool-devel %if %{with kernel24} BuildRequires: i2c-devel >= 2.10.1 %kmdl_parentdependencies %else #BuildRequires: sysfsutils-devel BuildRequires: %{_includedir}/sysfs/libsysfs.h %endif %lib_dependencies %description The lm_sensors package includes a collection of modules for general SMBus access and hardware monitoring. NOTE: this requires special support which is not in standard 2.2-vintage kernels. %package -n sensord Summary: Sensor information logging daemon Group: System Environment/Daemons Requires: lm_sensors = %{evr}, rrdtool Obsoletes: lm_sensors-sensord <= %{evr} %description -n sensord Sensord is a daemon that can be used to periodically log sensor readings from hardware health-monitoring chips to syslog(3) or a round-robin database (RRD) and to alert when a sensor alarm is signalled; for example, if a fan fails, a temperature limit is exceeded, etc. %package -n %kmdl_name %kmdl_dependencies Summary: Kernel modules for lm_sensors Group: System Environment/Kernel Requires: %{kmdl_nameof i2c} >= 2.10.1 %description -n %kmdl_name The lm_sensors package includes a collection of modules for general SMBus access and hardware monitoring. %kmdl_desc %prep %setup -q #patch3 -p1 -b .glibc22 #patch5 -p1 -b .utf8 #patch6 -p1 -b .expr %patch10 -p1 -b .adm1026id grep -rl /usr/lib . | xargs perl -pi -e's,/usr/lib,%{_libdir},g' grep -rl '\$(PREFIX)/lib' . | xargs perl -pi -e's,\$\(PREFIX\)/lib,\$\(PREFIX\)/%{_lib},g' mv prog/hotplug/p4b_smbus.c prog/hotplug/82801_smbus.c mv prog/hotplug/Makefile.p4b prog/hotplug/Makefile.i82801 perl -pi -e's,p4b,82801,g' prog/hotplug/Makefile.i82801 %build %if %{kmdl_userland} make LINUX=%{kmdl_kernelsrcdir} KERNELVERSION=%{_kernel} \ I2C_HEADERS=%{i2c_headers} \ COMPILE_KERNEL=0 \ PROG_EXTRA=sensord \ user %else %if %{with kernel24} %kmdl_config make LINUX=%{kmdl_kernelsrcdir} KERNELVERSION=%{_kernel} \ I2C_HEADERS=%{i2c_headers} \ COMPILE_KERNEL=1 \ SRCDIRS='mkpatch kernel/busses kernel/chips' make LINUX=%{kmdl_kernelsrcdir} KERNELVERSION=%{_kernel} \ -C prog/hotplug -f Makefile.i82801 %endif %endif %install rm -rf %{buildroot} %if %{kmdl_userland} mkdir -p %{buildroot}%{_bindir} mkdir -p %{buildroot}%{_libdir} mkdir -p %{buildroot}%{_sysconfdir} make LINUX=%{kmdl_kernelsrcdir} KERNELVERSION=%{_kernel} \ I2C_HEADERS=%{i2c_headers} \ COMPILE_KERNEL=0 \ PROG_EXTRA=sensord \ PREFIX=%{_prefix} \ MANDIR=%{_mandir} \ DESTDIR=%{buildroot} \ user_install chmod 755 %{buildroot}%{_libdir}/*.so* mkdir -p %{buildroot}%{_initrddir} install -p prog/init/lm_sensors.init %{buildroot}%{_initrddir}/lm_sensors install -p $RPM_SOURCE_DIR/sensord %{buildroot}%{_initrddir}/sensord mkdir -p %{buildroot}%{_sysconfdir}/sysconfig touch %{buildroot}%{_sysconfdir}/sysconfig/lm_sensors mkdir -p %{buildroot}/var/www/cgi-bin mkdir -p %{buildroot}/var/www/html/sensord #%{buildroot}%{_sbindir}/sensord --load-average --rrd-file /var/log/sensord.rrd --rrd-cgi /var/www/html/sensord > %{buildroot}/var/www/cgi-bin/sensord.cgi install -p $RPM_SOURCE_DIR/sensord.cgi %{buildroot}/var/www/cgi-bin/ chmod +x %{buildroot}/var/www/cgi-bin/sensord.cgi mv prog/init/README prog/init/README.initscripts # Remove userland kernel headers, belong in glibc-kernheaders. rm -rf %{buildroot}%{_includedir}/linux # Fix all /usr/local references find %{buildroot} -type f | xargs file | grep -E '(ASCII|Bourne shell|script text executable)' \ | awk -F: '{print $1}' \ | xargs perl -pi -e's,/usr/local,/usr,' %else %if %{with kernel24} make LINUX=%{kmdl_kernelsrcdir} KERNELVERSION=%{_kernel} \ I2C_HEADERS=%{i2c_headers} \ COMPILE_KERNEL=1 \ PREFIX=%{_prefix} \ MODPREF=%{kmdl_moduledir} \ PREFIX=%{_prefix} \ DESTDIR=%{buildroot} \ SRCDIRS='mkpatch kernel/busses kernel/chips' \ install mv %{buildroot}%{kmdl_moduledir}/kernel/drivers %{buildroot}%{kmdl_moduledir}/drivers rmdir %{buildroot}%{kmdl_moduledir}/kernel install -p prog/hotplug/82801_smbus.o %{buildroot}%{kmdl_moduledir}/drivers/i2c/busses/ %endif %endif %clean rm -rf %{buildroot} %post -p /sbin/ldconfig %preun if [ $1 = 0 ]; then service lm_sensors stop || : chkconfig --del lm_sensors fi %postun -p /sbin/ldconfig %post -n sensord %preun -n sensord if [ $1 = 0 ]; then service sensord stop || : chkconfig --del sensord fi %post -n %kmdl_name %kmdl_install %postun -n %kmdl_name %kmdl_remove %if %{kmdl_userland} %files %defattr(-,root,root,-) %doc BACKGROUND BUGS CHANGES CONTRIBUTORS COPYING doc INSTALL QUICKSTART README* TODO prog/init/* %config(noreplace) %{_sysconfdir}/sensors.conf %{_bindir}/sensors %{_libdir}/*.so.* %{_sbindir}/sensors-detect %{_sbindir}/fancontrol %{_sbindir}/pwmconfig %{_sbindir}/i2c* %ifarch %{ix86} x86_64 %{_sbindir}/isadump %{_sbindir}/isaset %endif %{_sbindir}/fancontrol.pl %{_bindir}/decode-dimms.pl %{_bindir}/decode-edid.pl %{_bindir}/decode-vaio.pl %{_bindir}/decode-xeon.pl %{_bindir}/ddcmon %{_mandir}/man1/sensors.1* %{_mandir}/man3/libsensors.3* %{_mandir}/man8/i2cdetect.8* %{_mandir}/man8/i2cdump.8* %{_mandir}/man8/i2cset.8* %{_mandir}/man8/i2cget.8* %ifarch %{ix86} x86_64 %{_mandir}/man8/isadump.8* %{_mandir}/man8/isaset.8.gz %endif %{_mandir}/man8/sensors-detect.8* %{_mandir}/man8/fancontrol.8* %{_mandir}/man8/pwmconfig.8* %{_initrddir}/lm_sensors %config(noreplace) %{_sysconfdir}/sysconfig/lm_sensors %files -n sensord %defattr(-,root,root,-) %{_mandir}/man5/sensors.conf.5* %{_mandir}/man8/sensord.8* %{_sbindir}/sensord %{_initrddir}/sensord /var/www/cgi-bin/sensord.cgi %defattr(-,apache,apache,-) /var/www/html/sensord %else %if %{with kernel24} %files -n %kmdl_name %defattr(-,root,root,-) %dir %{kmdl_moduledir}/drivers %dir %{kmdl_moduledir}/drivers/i2c %{kmdl_moduledir}/drivers/i2c/busses %{kmdl_moduledir}/drivers/i2c/chips %endif %endif %changelog * Sat Mar 8 2008 Axel Thimm - 2.10.6-53 - Update to 2.10.6. * Fri Nov 9 2007 Axel Thimm - 2.10.5-51 - Update to 2.10.5. * Sat Jul 21 2007 Axel Thimm - 2.10.4-50 - Update to 2.10.4. * Thu Jun 21 2007 Axel Thimm - 2.10.3-49 - Use libfoo scheme for compatibility. * Sun Mar 25 2007 Axel Thimm - 2.10.3-47 - Update to 2.10.3. * Wed Jan 17 2007 Axel Thimm - 2.10.2-46 - Update to 2.10.2. * Thu Mar 30 2006 Axel Thimm - Update to 2.10.0. * Sun Sep 11 2005 Axel Thimm - Update to 2.9.2. * Sun May 29 2005 Axel Thimm - Make %%{_sysconfdir}/sysconfig/lm_sensors %%config(noreplace) (Chien-Chung Yeh ). * Thu Apr 14 2005 Axel Thimm - Update to 2.9.1. * Wed Dec 29 2004 Axel Thimm - Update to 2.9.0. - Remove mixed declarations patch from previous update (merged upstream). * Sat Oct 23 2004 Axel Thimm - Fix mixed declarations im lm93. * Fri Oct 8 2004 Axel Thimm - Update to 2.8.8. * Sun Jun 13 2004 Axel Thimm - Update to 2.8.7. * Mon Apr 5 2004 Axel Thimm - Update to 2.8.6. * Sat Apr 3 2004 Axel Thimm - Move sensord man pages to the right package (J. Miller ). * Sun Mar 7 2004 Axel Thimm - Updated to 2.8.5. * Sat Feb 21 2004 Axel Thimm - Updated to 2.8.4. * Thu Jan 8 2004 Axel Thimm - Remove dependency of userland to kernelland. * Fri Jan 2 2004 Axel Thimm - Update to 2.8.2. * Tue Aug 19 2003 Axel Thimm - Fix /usr/local to /usr. * Sun Aug 3 2003 Axel Thimm - updated to 2.8.0. - synced with rawhide (utf8 fix). - removed csb5 patch (applied upstream). * Sun Nov 24 2002 Axel Thimm - created subpackage lm_sensors-sensord * Mon Aug 19 2002 Axel Thimm - activated sensord * Sun Aug 18 2002 Axel Thimm - adapted to lm_sensors 2.6.4 * Fri Jun 21 2002 Tim Powers 2.6.3-2 - automated rebuild * Tue Jun 18 2002 Phil Knirsch 2.6.3-1 - Updated of userland package to 2.6.3 - Fixed file packaging bug (#66126). * Thu May 23 2002 Tim Powers 2.6.2-2 - automated rebuild * Mon Jan 28 2002 Phil Knirsch 2.6.2-1 - Update to version 2.6.2 * Wed Aug 22 2001 Philipp Knirsch 2.5.5-6 - Added the SMBus CSB5 detection (#50468) * Mon Jul 9 2001 Philipp Knirsch - Fixed duplicate Summary: entry for devel package (#47714) * Sun Jun 24 2001 Elliot Lee - Bump release + rebuild. * Thu Feb 15 2001 Philipp Knirsch - Removed the i2c block patch as our newest kernel doesn't need it anymore. * Mon Feb 5 2001 Matt Wilson - added patch to not include sys/perm.h, as it's gone now. - added alpha to ExclusiveArch - use make "LINUX_HEADERS=/usr/include" to get kernel headers * Tue Jan 16 2001 Philipp Knirsch - Updated to 2.5.5 which includes the Serverworks drivers. Kernel modules are not included though es they have to go into the kernel package - Had to remove all references to I2C_SMBUS_I2C_BLOCK_DATA from kernel/busses/i2c-i801.c and prog/dump/i2cdump.c as this is not defined in our current kernel package * Tue Dec 19 2000 Philipp Knirsch - update to 2.5.4 - updated URL and Source entries to point to new home of lm-sensors - rebuild * Wed Aug 16 2000 Nalin Dahyabhai - fix summary * Fri Jul 28 2000 Harald Hoyer - added static library to devel package * Thu Jul 20 2000 Nalin Dahyabhai - update to 2.5.2 - build against a kernel that actually has new i2c code in it * Wed Jul 12 2000 Prospector - automatic rebuild * Mon Jun 12 2000 Nalin Dahyabhai - initial package without kernel support