Sophie

Sophie

distrib > Mandriva > 8.2 > i586 > media > main-src > by-pkgid > fffa1cabbcaa10246c4725bcf7b6f004 > files > 6

lm_sensors-2.6.2-4mdk.src.rpm

%define lib_name_orig lib%{name}
%define lib_major 1
%define lib_name %{lib_name_orig}%{lib_major}
%define kversion 2.4.13

Summary:	Utilities for lm_sensors
Name:		lm_sensors
Version:	2.6.2
Release:	4mdk

Source0:	http://www.lm-sensors.nu/archive/%{name}-%{version}.tar.bz2
Source1:	lm_sensors-2.5.5-sensors
Patch0:		lm_sensors-2.5.5-fix-install.patch.bz2
Patch1:		lm_sensors-2.5.5-fix-build-sensord.patch.bz2
Patch2:		lm_sensors-2.6.1-isadump.ppc.patch.bz2

URL:		http://www.lm-sensors.nu/
License:	GPL
Group:		System/Kernel and hardware
BuildRoot:	%_tmppath/%name-%version-%release-root
Provides:	lm_utils
Obsoletes:	lm_utils
BuildRequires:	bison flex kernel-source >= %{kversion}
Requires:	perl

%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 %{lib_name}
Summary:	Libraries needed for lm_sensors
Group:		System/Libraries
Url:		http://www.lm-sensors.nu/
Provides:	%{name} = %{version}-%{release}

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


%package -n %{lib_name}-devel
Summary:	Development libraries and header files for lm_sensors
Group:		Development/C
PreReq:		%{lib_name} = %version-%release
Provides:	%{lib_name_orig}-devel = %{version}-%{release}
Provides:	%{name}-devel = %{version}-%{release}

%description -n %{lib_name}-devel
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.


%package -n %{lib_name}-static-devel
Summary:	Static libraries for lm_sensors
Group:		Development/C
PreReq:		%{lib_name}-devel = %version-%release

%description -n %{lib_name}-static-devel
This package contains static libraries for lm_sensors.



%prep



%setup -q
%patch0 -p1
%patch1 -p1
%ifarch ppc
%patch2 -p1
%endif



%build
%define MAKE_DEFS COMPILE_KERNEL=0 WARN=1 PREFIX=%{_prefix} LINUX=/usr/src/linux-%{kversion} I2C_HEADERS=/usr/src/linux-%{kversion}/include ETCDIR=%{_sysconfdir} MANDIR=%{_mandir} DESTDIR=$RPM_BUILD_ROOT

%make %MAKE_DEFS dep
%make %MAKE_DEFS all



%install
rm -fr %buildroot

%make %MAKE_DEFS install
install -D -m 755 %{SOURCE1} %{buildroot}%{_initrddir}/sensors


%clean
rm -rf $RPM_BUILD_ROOT


%post
%_post_service sensors

%preun
%_preun_service sensors


%post -n %{lib_name} -p /sbin/ldconfig
%postun -n %{lib_name} -p /sbin/ldconfig

%files
%defattr(-,root,root)
%doc BACKGROUND
%doc BUGS
%doc CHANGES
%doc CONTRIBUTORS
%doc INSTALL
%doc README
%doc TODO
%doc doc
%config(noreplace) %{_sysconfdir}/sensors.conf
%config(noreplace) %{_initrddir}/sensors
%{_bindir}/sensors
%{_sbindir}/sensors-detect
%{_sbindir}/sensord
%{_mandir}/man1/*
%{_mandir}/man5/*
%{_mandir}/man8/*

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

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

%files -n %{lib_name}-static-devel
%defattr(-,root,root)
%{_libdir}/libsensors.a


%changelog
* Sat Jan 26 2002 Juan Quintela <quintela@mandrakesoft.com> 2.6.2-4mdk
- add Requires: perl, it is needed for sensors-detect.

* Sat Jan 19 2002 David BAUDENS <baudens@mandrakesoft.com> 2.6.2-3mdk
- Re-upload to replace broken SRPM

* Sat Jan 19 2002 David BAUDENS <baudens@mandrakesoft.com> 2.6.2-2mdk
- Fix Group: for devel package
- Move static library in static-devel package
- Fix Description for devel package
- Requires: %%name = %version-%%release and not only %%versoin

* Fri Nov 23 2001 Juan Quintela <quintela@mandrakesoft.com> 2.6.2-1mdk
- 2.6.3

* Sat Oct 27 2001 Stew Benedict <sbenedict@mandrakesoft.com> 2.6.1-3mdk
- quiet %setup, patches to build isadump on PPC

* Fri Oct 19 2001 Stefan van der Eijk <stefan@eijk.nu> 2.6.1-2mdk
- BuildRequires: bsion, flex, kernel-source 2.4.10 --> 2.4.12

* Mon Oct  8 2001 Juan Quintela <quintela@mandrakesoft.com> 2.6.1-1mdk
- Splitup from the kernel spec file.