Sophie

Sophie

distrib > Mandriva > 2011.0 > i586 > media > main-updates-src > by-pkgid > 5cb1d497c3325229c0a31b99e1935d2d > files > 3

lm_sensors-3.3.1-9.1.src.rpm

%define lib_name_orig   lib%{name}
%define major 4
%define libname %mklibname %{name} %major
%define develname %mklibname %{name} -d
%define staticname %mklibname %{name} -d -s

Summary:	Utilities for lm_sensors
Name:		lm_sensors
Version:	3.3.1
%define subrel 1
Release:	%mkrel 9
Epoch:		1
License:	LGPLv2+
Group:		System/Kernel and hardware
URL:		http://www.lm-sensors.org
Source0:	http://dl.lm-sensors.org/lm-sensors/releases/%{name}-%{version}.tar.bz2
Source1: lm_sensors.sysconfig
# these 2 were taken from PLD-linux, Thanks!
Source2: sensord.sysconfig
Patch01:	lm_sensors-cpuid.patch
Requires:	%{libname} = %{epoch}:%{version}-%{release}
BuildRequires:	bison
BuildRequires:	chrpath
BuildRequires:	flex
BuildRequires:	librrdtool-devel
BuildRequires:	libsysfs-devel
Requires(pre):	rpm-helper
Requires(postun):	rpm-helper
Requires(post): systemd-units
%ifarch %{ix86} x86_64
Requires: dmidecode
%endif
BuildRoot:      %{_tmppath}/%{name}-%{version}

%description
This package contains a collection of user space tools for general SMBus
access and hardware monitoring. SMBus, also known as System Management Bus,
is a protocol for communicating through a I2C ('I squared C') bus. Many modern
mainboards have a System Management Bus. There are a lot of devices which can
be connected to a SMBus; the most notable are modern memory chips with EEPROM
memories and chips for hardware monitoring.

Most modern mainboards incorporate some form of hardware monitoring chips.
These chips read things like chip temperatures, fan rotation speeds and
voltage levels. There are quite a few different chips which can be used
by mainboard builders for approximately the same results.

%package -n %{libname}
Summary:	Libraries needed for lm_sensors
Group:		System/Libraries
Provides:	%{libname} = %{epoch}:%{version}-%{release}

%description -n %{libname}
Libraries to access lm_sensors internal data.

%package -n %{develname}
Summary:	Development libraries and header files for lm_sensors
Group:		Development/C
Requires(pre):	%{libname} = %{epoch}:%{version}-%{release}
Requires(postun):	%{libname} = %{epoch}:%{version}-%{release}
Requires:	%{libname} = %{epoch}:%{version}-%{release}
Provides:	lib%{name}-devel = %{epoch}:%{version}-%{release}
Provides:	%{name}-devel = %{epoch}:%{version}-%{release}
Obsoletes:	%{name}-devel < %{epoch}:%{version}-%{release}

%description -n %{develname}
Development libraries and header files for lm_sensors.

You might want to use this package while building applications that might
take advantage of lm_sensors if found.

%prep
%setup -q
%apply_patches


%build
export CFLAGS="%{optflags}"
export CPPFLAGS="$CFLAGS"

make PREFIX=%{_prefix} LIBDIR=%{_libdir} MANDIR=%{_mandir} EXLDFLAGS=%{ldflags} \
  PROG_EXTRA=sensord user


%install
make PREFIX=%{_prefix} LIBDIR=%{_libdir} MANDIR=%{_mandir} PROG_EXTRA=sensord \
  DESTDIR=%{buildroot} user_install
rm %{buildroot}%{_libdir}/libsensors.a

ln -s sensors.conf.5.gz %{buildroot}%{_mandir}/man5/sensors3.conf.5.gz

mkdir -p %{buildroot}%{_sysconfdir}/sysconfig
mkdir -p %{buildroot}%{_sysconfdir}/sensors.d
mkdir -p %{buildroot}%{_initrddir}
mkdir -p %{buildroot}/lib/systemd/system
install -p -m 644 %{SOURCE1} %{buildroot}%{_sysconfdir}/sysconfig/lm_sensors
install -p -m 644 %{SOURCE2} %{buildroot}%{_sysconfdir}/sysconfig/sensord
install -p -m 755 prog/init/lm_sensors.init %{buildroot}%{_initrddir}/lm_sensors
install -p -m 755 prog/init/fancontrol.init %{buildroot}%{_initrddir}/fancontrol
install -p -m 644 prog/init/lm_sensors.service \
    %{buildroot}/lib/systemd/system

%{__cat} > README.urpmi << EOF
* To use this package, you'll have to launch "sensors-detect" as root, and ask few questions.
  No need to modify startup files as shown at the end, all will be done.

* Special note for via686a and i2c-viapro : if you don t see the values, you probably have a PCI conflict.
  It will be corrected in next kernel. Change the /etc/sysconfig/lm_sensors to use i2c-isa + via686a
  (or i2c-viapro + another sensor)
EOF


# Note non standard systemd scriptlets, since reload / stop makes no sense
# for lm_sensors
%triggerun -- lm_sensors < 3.3.0-2
if [ -L /etc/rc3.d/S26lm_sensors ]; then
    /bin/systemctl enable lm_sensors.service >/dev/null 2>&1 || :
fi
/sbin/chkconfig --del lm_sensors

#fix mistake with sensord instead lm_sensors in /etc/init.d
%triggerrun -- lm_sensors = 3.3.1-5
/sbin/chkconfig --del sensord

%preun
if [ $1 -eq 0 ] ; then
    # Package removal, not upgrade
    /bin/systemctl --no-reload disable lm_sensors.service > /dev/null 2>&1 || :
fi

/bin/systemctl disable --quiet lm_sensors.service

%post
/bin/systemctl enable --quiet lm_sensors.service

%clean
%{__rm} -rf %{buildroot}

%files
%defattr(-,root,root)
%doc CHANGES CONTRIBUTORS README doc README.urpmi
%config(noreplace) %{_sysconfdir}/sensors3.conf
%{_initrddir}/lm_sensors
%{_initrddir}/fancontrol
%config(noreplace) %{_sysconfdir}/sysconfig/sensord
%config(noreplace) %{_sysconfdir}/sysconfig/lm_sensors
%{_bindir}/sensors
%{_bindir}/sensors-conf-convert
%ifnarch ppc %arm %mips
%{_sbindir}/isadump
%{_sbindir}/isaset
%endif
%{_sbindir}/sensors-detect
%{_sbindir}/sensord
%{_mandir}/man1/*
%{_mandir}/man5/*
%{_mandir}/man8/*
%{_sbindir}/fancontrol
%{_sbindir}/pwmconfig
/lib/systemd/system/lm_sensors.service

%files -n %{libname}
%defattr(-,root,root)
%{_libdir}/libsensors.so.%{major}*

%files -n %{develname}
%defattr(-,root,root)
%{_libdir}/libsensors.so
%dir %{_includedir}/sensors
%{_includedir}/sensors/*
%{_mandir}/man3/*


%changelog
* Sat Sep 17 2011 Oden Eriksson <oeriksson@mandriva.com> 1:3.3.1-9.1
- built for updates

* Thu Sep 15 2011 Александр Казанцев <kazancas@mandriva.org> 1:3.3.1-9mdv2011.0
+ Revision: 699904
- switch to use mainstream init file instead Mandriva implimentation
- fix install as systemd service
- add fancontrol service
- revert changes in daemon for use lm_sensors naming instead sensord
- update version via new hardware support. Move to sensord naming in /etc/init.d and fix it
- fix service name
- add symlink for old lm_sensors service
- fix bug for i2c and adapt for new systemd purposes

  + Alexander Barakin <abarakin@mandriva.org>
    - fix loading of the cpuid module
      see #64060 and
      http://lm-sensors.org/changeset/5993

  + Eugeni Dodonov <eugeni@mandriva.com>
    - Require dmidecode by package name

* Wed May 04 2011 Oden Eriksson <oeriksson@mandriva.com> 1:3.3.0-2
+ Revision: 666085
- mass rebuild

* Sat Apr 02 2011 Tomasz Pawel Gajc <tpg@mandriva.org> 1:3.3.0-1
+ Revision: 649798
- update to new version 3.3.0

* Tue Oct 12 2010 Guillaume Rousse <guillomovitch@mandriva.org> 1:3.2.0-1mdv2011.0
+ Revision: 585211
- new version

* Thu Feb 25 2010 Tomasz Pawel Gajc <tpg@mandriva.org> 1:3.1.2-3mdv2010.1
+ Revision: 510828
- correct requires for static subpackage

* Wed Feb 24 2010 Tomasz Pawel Gajc <tpg@mandriva.org> 1:3.1.2-2mdv2010.1
+ Revision: 510762
- use new devel library policy

* Thu Feb 04 2010 Guillaume Rousse <guillomovitch@mandriva.org> 1:3.1.2-1mdv2010.1
+ Revision: 500980
- new version

* Sun Sep 27 2009 Olivier Blin <blino@mandriva.org> 1:3.1.1-2mdv2010.0
+ Revision: 450119
- do not use kernel-source includes (from Arnaud Patard)
- do not list isa tools on mips & arm, they don't have it
  (from Arnaud Patard)
- drop kernel_source dep: used only if building modules, which is not
  our case (from Arnaud Patard)

* Sat Aug 29 2009 Guillaume Rousse <guillomovitch@mandriva.org> 1:3.1.1-1mdv2010.0
+ Revision: 422155
- new version
- spec cleanup

* Tue Dec 30 2008 Tomasz Pawel Gajc <tpg@mandriva.org> 1:2.10.8-1mdv2009.1
+ Revision: 321505
- fix url
- new license policy
- protect major in file list
- compile with %%optflags and %%ldflags
- spec file clean
- update to new version 2.10.8

* Thu Sep 18 2008 Frederic Crozat <fcrozat@mandriva.com> 1:2.10.7-1mdv2009.0
+ Revision: 285719
- Release 2.10.7, fix sensors detection with kernel >= 2.6.26 (Mdv bug #43986)

* Tue Jun 17 2008 Oden Eriksson <oeriksson@mandriva.com> 1:2.10.5-4mdv2009.0
+ Revision: 222465
- rebuilt against new rrdtool-devel

  + Pixel <pixel@mandriva.com>
    - do not call ldconfig in %%post/%%postun, it is now handled by filetriggers

  + Olivier Blin <blino@mandriva.org>
    - restore BuildRoot

  + Thierry Vignaud <tv@mandriva.org>
    - kill re-definition of %%buildroot on Pixel's request

* Fri Dec 07 2007 Oden Eriksson <oeriksson@mandriva.com> 1:2.10.5-3mdv2008.1
+ Revision: 116227
- fix deps

* Thu Dec 06 2007 David Walluck <walluck@mandriva.org> 1:2.10.5-2mdv2008.1
+ Revision: 116014
- readd old sources
- reintroduce version 2 as main package and bump epoch

* Mon Nov 26 2007 David Walluck <walluck@mandriva.org> 3.0.0-2mdv2008.1
+ Revision: 111999
- rename initscript to something more sensible

* Sun Nov 25 2007 David Walluck <walluck@mandriva.org> 3.0.0-1mdv2008.1
+ Revision: 111968
- add new sources
- 3.0.0
- new lib policy

* Fri Oct 26 2007 Jérôme Soyer <saispo@mandriva.org> 2.10.5-1mdv2008.1
+ Revision: 102337
- New release

* Tue Sep 11 2007 Anssi Hannula <anssi@mandriva.org> 2.10.4-2mdv2008.0
+ Revision: 84564
- enable initscript by default, it detects whether the modules are
  configured or not

* Fri Jul 20 2007 David Walluck <walluck@mandriva.org> 2.10.4-1mdv2008.0
+ Revision: 54003
- 2.10.4
- version Obsoletes and Provides
- only define DESTDIR during %%install
- reorder %%clean before post scripts
- no default runlevel in init script (needs configuring first)

* Fri Jun 01 2007 Christiaan Welvaart <spturtle@mandriva.org> 2.10.3-2mdv2008.0
+ Revision: 33655
- drop version from kernel-source build dependency since provides are not versioned


* Tue Mar 27 2007 David Walluck <walluck@mandriva.org> 2.10.3-1mdv2007.1
+ Revision: 149026
- 2.10.3

* Tue Jan 16 2007 David Walluck <walluck@mandriva.org> 2.10.2-1mdv2007.1
+ Revision: 109617
- 2.10.2

  + Emmanuel Andry <eandry@mandriva.org>
    - rebuild

* Thu Dec 14 2006 Emmanuel Andry <eandry@mandriva.org> 2.10.1-1mdv2007.1
+ Revision: 96582
- New version 2.10.1
  now relies on 2.6 kernel
  bunzip patches
  drop patches 0,2,3,4
- Import lm_sensors

* Tue May 23 2006 David Walluck <walluck@mandriva.org> 2.10.0-5mdk
- update patch for abituguru-1.1.7

* Wed Mar 15 2006 David Walluck <walluck@mandriva.org> 2.10.0-4mdk
- apply patch from CVS needed by uguru

* Wed Mar 15 2006 David Walluck <walluck@mandriva.org> 2.10.0-3mdk
- reapply uguru patch directly from author

* Mon Feb 20 2006 Christiaan Welvaart <cjw@daneel.dyndns.org> 2.10.0-2mdk
- add BuildRequires: libsysfs-devel

* Sun Feb 19 2006 David Walluck <walluck@mandriva.org> 2.10.0-1mdk
- 2.10.0
- rediff uguru patch

* Sun Jan 15 2006 David Walluck <walluck@mandriva.org> 2.9.2-1mdk
- 2.9.2
- rediff can-2005-2672 patch (mostly merged upstream)

* Mon Jan 09 2006 Olivier Blin <oblin@mandriva.com> 2.9.1-9mdk
- convert parallel init to LSB

* Tue Jan 03 2006 Couriousous <couriousous@mandriva.org> 2.9.1-8mdk
- Move lm_sensors startup after syslog ( take fedora startup number )

* Mon Jan 02 2006 David Walluck <walluck@mandriva.org> 2.9.1-7mdk
- add Abit uguru patch (1.1.1)
- bzip2 patches
- add provides %%{_lib}%%{name}-devel

* Sun Jan 01 2006 Couriousous <couriousous@mandriva.org> 2.9.1-6mdk
- Add parallel init stuff

* Fri Dec 23 2005 Oden Eriksson <oeriksson@mandriva.com> 2.9.1-5mdk
- added P1 to remove a faulty error message
- rpmlint fixes

* Sun Aug 28 2005 Emmanuel Blindauer <blindauer@mandriva.org> 2.9.1-4mdk
- P2: security fix for CAN-2005-2672 (Vincent Danen)

* Sat May 21 2005 sebastien Savarin <plouf@mandriva.org> 2.9.1-3mdk
- Add sensors-detect.patch.tar.bz2

* Sat May 21 2005 Stefan van der Eijk <stefan@eijk.nu> 2.9.1-2mdk
- %%mkrel
- rebuild for new rrd

* Sun May 01 2005 Emmanuel Blindauer <blindauer@mandriva.org> 2.9.1-1mdk
- New release 2.9.1
- ddcmon added
- Removed patch1 for udev (fixed upstream)

* Fri Feb 11 2005 Emmanuel Blindauer <mdk@agat.net> 2.9.0-4mdk
- Really fix the udev problem ( #10535, #13517)
- Add README.urpmi

* Thu Feb 10 2005 Emmanuel Blindauer <mdk@agat.net> 2.9.0-3mdk
- switch to sensors-detect provided by the lm_sensors team.

* Thu Jan 06 2005 Christiaan Welvaart <cjw@daneel.dyndns.org> 2.9.0-2mdk
- fix build on ppc (no isa tools)

* Fri Dec 31 2004 Emmanuel Blindauer <mdk@agat.net> 2.9.0-1mdk
- 2.9.0 
- happy new year

* Fri Oct 08 2004 Gwenole Beauchesne <gbeauchesne@mandrakesoft.com> 2.8.7-7mdk
- fix deps

* Tue Sep 28 2004 Emmanuel Blindauer <mdk@agat.net> 2.8.7-6mdk
- My fault, don't put bz2 in /usr/sbin (and don't build rpm when tired)

* Mon Sep 27 2004 Emmanuel Blindauer <mooby@agat.net> 2.8.7-5mdk
- Removed patch4 and added new source for sensors-detect udev-compatible

* Sat Jun 19 2004 Christiaan Welvaart <cjw@daneel.dyndns.org> 2.8.7-4mdk
- fix ppc build

* Fri Jun 18 2004 Blindauer Emmanuel <mooby@agat.net> 2.8.7-3mdk
- requires the correct name

* Thu Jun 17 2004 Blindauer Emmanuel <mooby@agat.net> 2.8.7-2mdk
- added requires against liblm_sensors

* Wed Jun 16 2004 Blindauer Emmanuel <mooby@agat.net> 2.8.7-1mdk
- 2.8.7
- Removed patch5 (kernel and lm_sensors in sync)

* Wed Apr 21 2004 Luca Berra <bluca@vodka.it> 2.8.6-2mdk 
- added *ugly* patch for compatibility with previous 2.6 kernels

* Wed Apr 21 2004 Luca Berra <bluca@vodka.it> 2.8.6-1mdk 
- 2.8.6 needed for 2.6.5 kernel
- removed p3 (merged upstream)
- rediffed p4