]> git.pld-linux.org Git - packages/lm_sensors.git/blobdiff - lm_sensors.spec
- do not use macro for /etc/sysconfig
[packages/lm_sensors.git] / lm_sensors.spec
index 4f5231bc437af1cbf49f9bc811f5fb6f963a1dd5..12bc1e2e02aa00a2c5149505d12583a843114e49 100644 (file)
@@ -1,9 +1,9 @@
-#
-# Conditional build:
-%bcond_without dist_kernel     # without kernel for distributions
-%bcond_without smp             # don't build SMP modules
-%bcond_without kernel          # don't build kernel modules
-%bcond_without userspace       # don't build userspace utilities
+# TODO
+# - unpackaged:
+#   /usr/sbin/fancontrol.pl (isn't that the same as sh fancontrol script?)
+# - add fancontrol(d) subpackage
+# - update and use fancontrol.init
+# - a big trigger warning how to use fancontrol and to init it first
 #
 %include       /usr/lib/rpm/macros.perl
 Summary:       Hardware health monitoring
@@ -12,33 +12,31 @@ Summary(pt_BR):     Ferramentas para monitora
 Summary(ru):   õÔÉÌÉÔÙ ÄÌÑ ÍÏÎÉÔÏÒÉÎÇÁ ÁÐÐÁÒÁÔÕÒÙ
 Summary(uk):   õÔÉ̦ÔÉ ÄÌÑ ÍÏΦÔÏÒÉÎÇÕ ÁÐÁÒÁÔÕÒÉ
 Name:          lm_sensors
-Version:       2.8.6
-%define _rel   1
-Release:       %{_rel}
+Version:       2.10.1
+Release:       1
 License:       GPL
 Group:         Applications/System
-Source0:       http://secure.netroedge.com/~lm78/archive/%{name}-%{version}.tar.gz
-# Source0-md5: baa836e7b31eeb991b105008ab7458a4
+Source0:       http://dl.lm-sensors.org/lm-sensors/releases/%{name}-%{version}.tar.gz
+# Source0-md5: cdc857b78e813b88cbf8be92441aa299
 Source1:       sensors.init
 Source2:       sensors.sysconfig
+Source3:       fancontrol.init
 Patch0:                %{name}-make.patch
 Patch1:                %{name}-ppc.patch
 Patch2:                %{name}-iconv-in-libc.patch
+Patch3:                %{name}-sensors-detect-PATH.patch
 URL:           http://www.lm-sensors.nu/
 BuildRequires: bison
 BuildRequires: flex >= 2.5.1
 BuildRequires: perl-modules >= 5.6
 BuildRequires: rpm-perlprov >= 3.0.3-16
-BuildRequires: rpmbuild(macros) >= 1.118
-BuildRequires: rrdtool-devel
-%if %{with kernel} && %{with dist_kernel}
-BuildRequires: kernel-i2c-devel >= 2.8.3
-BuildRequires: kernel-headers >= 2.4.0
-BuildRequires: kernel-headers < 2.5.0
-%endif
+BuildRequires: rpmbuild(macros) >= 1.268
+BuildRequires: rrdtool-devel >= 1.2.10
+BuildRequires: sysfsutils-devel
+Requires:      dev >= 2.9.0-13
 Requires:      dmidecode
-BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 Obsoletes:     liblm_sensors1
+BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
 %description
 Tools for monitoring the hardware health of Linux systems containing
@@ -63,19 +61,16 @@ SMBus 
 SMBus ÔÁ ÍÏΦÔÏÒÉÎÇÕ. õ÷áçá: ÄÌÑ ÃØÏÇÏ ÐÏÔÒ¦ÂÎÁ ÓÐÅæÁÌØÎÁ Ð¦ÄÔÒÉÍËÁ,
 ÑËÁ ×¦ÄÓÕÔÎÑ Õ ÓÔÁÎÄÁÒÔÎÉÈ ÓÔÁÒÉÈ ÑÄÒÁÈ 2.2.XX!
 
-%package sensord
-Summary:       Sensord daemon
-Summary(pl):   Demon sensord
-Group:         Daemons
-PreReq:                rc-scripts
-Requires(post,preun):  /sbin/chkconfig
-Requires:      %{name} = %{version}-%{release}
+%package libs
+Summary:       lm_sensors library
+Summary(pl):   Biblioteka lm_sensors
+Group:         Libraries
 
-%description sensord
-Sensord daemon.
+%description libs
+lm_sensors library.
 
-%description sensord -l pl
-Demon sensord.
+%description libs -l pl
+Biblioteka lm_sensors.
 
 %package devel
 Summary:       Header files for lm_sensors
@@ -84,7 +79,7 @@ Summary(pt_BR):       Arquivos necess
 Summary(ru):   æÁÊÌÙ ÒÁÚÒÁÂÏÔÞÉËÁ ÄÌÑ ÐÒÏÇÒÁÍÍ, ÉÓÐÏÌØÚÕÀÝÉÈ lm_sensors
 Summary(uk):   æÁÊÌÉ ÐÒÏÇÒÁͦÓÔÁ ÄÌÑ ÐÒÏÇÒÁÍ, Ñ˦ ×ÉËÏÒÉÓÔÏ×ÕÀÔØ lm_sensors
 Group:         Development/Libraries
-Requires:      %{name} = %{version}-%{release}
+Requires:      %{name}-libs = %{version}-%{release}
 Obsoletes:     liblm_sensors1-devel
 
 %description devel
@@ -131,86 +126,28 @@ Bibliotecas est
 ðÁËÅÔ lm_sensors-static Í¦ÓÔÉÔØ ÓÔÁÔÉÞΦ Â¦Â̦ÏÔÅËÉ, ÎÅÏÂȦÄΦ ÄÌÑ
 ÐÏÂÕÄÏ×É ÐÒÏÇÒÁÍ, Ñ˦ ×ÉËÏÒÉÓÔÏ×ÕÀÔØ ÄÁΦ ÓÅÎÓÏÒ¦×.
 
-%package -n kernel-i2c-%{name}
-Summary:       Kernel modules for various buses and monitor chips
-Summary(pl):   Modu³y j±dra dla ró¿nego rodzaju sensorów
-Group:         Applications/System
-Release:       %{_rel}@%{_kernel_ver_str}
-Requires(post,postun): /sbin/depmod
-%{?with_dist_kernel:%requires_releq_kernel_up}
-%{?with_dist_kernel:Requires:  kernel-i2c >= 2.8.2}
-Provides:      %{name}-modules = %{version}-%{release}
-Obsoletes:     %{name}-modules
-Obsoletes:     kernel-misc-lm_sensors
-
-%description -n kernel-i2c-%{name}
-Kernel modules for various buses and monitor chips.
-
-%description -n kernel-i2c-%{name} -l pl
-Modu³y j±dra dla ró¿nego rodzaju sensorów monitoruj±cych.
-
-%package -n kernel-smp-i2c-%{name}
-Summary:       Kernel modules for various buses and monitor chips
-Summary(pl):   Modu³y j±dra dla ró¿nego rodzaju sensorów
-Group:         Applications/System
-Release:       %{_rel}@%{_kernel_ver_str}
-Requires(post,postun): /sbin/depmod
-%{?with_dist_kernel:%requires_releq_kernel_smp}
-%{?with_dist_kernel:Requires:  kernel-smp-i2c >= 2.8.2}
-Provides:      %{name}-modules = %{version}-%{release}
-Obsoletes:     %{name}-modules
-Obsoletes:     kernel-smp-misc-lm_sensors
+%package sensord
+Summary:       Sensord daemon
+Summary(pl):   Demon sensord
+Group:         Daemons
+Requires(post,preun):  /sbin/chkconfig
+Requires:      %{name} = %{version}-%{release}
+Requires:      rc-scripts
 
-%description -n kernel-smp-i2c-%{name}
-Kernel SMP modules for various buses and monitor chips.
+%description sensord
+Sensord daemon.
 
-%description -n kernel-smp-i2c-%{name} -l pl
-Modu³y j±dra SMP dla ró¿nego rodzaju sensorów monitoruj±cych.
+%description sensord -l pl
+Demon sensord.
 
 %prep
 %setup -q
 %patch0 -p1
 %patch1 -p1
 %patch2 -p1
-
-%ifarch ppc sparc sparc64 sparcv9
-# no isadump
-%{__perl} -pi -e 's@ prog/dump @ @' Makefile
-%endif
+%patch3 -p1
 
 %build
-%if %{with kernel} && %{with smp}
-# SMP
-%{__make} all-kernel-busses all-kernel-chips \
-       CC="%{kgcc}" \
-       OPTS="%{rpmcflags} -D__KERNEL_SMP=1" \
-       LINUX=/dev/null \
-       LINUX_HEADERS=%{_kernelsrcdir}/include \
-       I2C_HEADERS=%{_kernelsrcdir}/include \
-       SMP=1
-
-%{__make} install-kernel-busses install-kernel-chips \
-       MODPREF=kernel-smp-modules \
-       LINUX=/dev/null \
-       LINUX_HEADERS=%{_kernelsrcdir}/include \
-       I2C_HEADERS=%{_kernelsrcdir}/include \
-       SMP=1
-
-%{__make} clean
-%endif
-
-%if %{with kernel}
-# UP
-%{__make} all-kernel-busses all-kernel-chips \
-       CC="%{kgcc}" \
-       OPTS="%{rpmcflags}" \
-       LINUX=/dev/null \
-       LINUX_HEADERS=%{_kernelsrcdir}/include \
-       I2C_HEADERS=%{_kernelsrcdir}/include \
-       SMP=0
-%endif
-
-%if %{with userspace}
 %{__make} user \
        CC="%{__cc}" \
        OPTS="%{rpmcflags}" \
@@ -218,27 +155,20 @@ Modu
        LINUX=/dev/null \
        LINUX_HEADERS=%{_kernelsrcdir}/include \
        I2C_HEADERS=/usr/include \
-       PROG_EXTRA:="sensord"
+       PROG_EXTRA:="sensord" \
+       SYSFS_SUPPORT:=1
 
 %{__make} -C prog/eepromer \
        CC="%{__cc}" \
        CFLAGS="%{rpmcflags} -I../../kernel/include"
-%endif
+
+# PLD-ize fancontrol
+%{__sed} -i -e "s@/etc/fancontrol@/etc/sysconfig/fancontrol@g" prog/pwm/fancontrol
+%{__sed} -i -e "s@/etc/fancontrol@/etc/sysconfig/fancontrol@g" prog/pwm/pwmconfig
 
 %install
 rm -rf $RPM_BUILD_ROOT
 
-%if %{with kernel}
-%{__make} install-kernel-busses install-kernel-chips \
-       DESTDIR=$RPM_BUILD_ROOT \
-       MODPREF=/lib/modules/%{_kernel_ver} \
-       LINUX=/dev/null \
-       LINUX_HEADERS=%{_kernelsrcdir}/include \
-       I2C_HEADERS=%{_kernelsrcdir}/include \
-       SMP=0
-%endif
-
-%if %{with userspace}
 install -d $RPM_BUILD_ROOT{%{_sbindir},%{_mandir}/man8} \
        $RPM_BUILD_ROOT/etc/{rc.d/init.d,sysconfig}
 
@@ -260,79 +190,56 @@ install %{SOURCE2} $RPM_BUILD_ROOT/etc/sysconfig/sensors
 
 # i2c API for userspace - included in glibc-kernel-headers
 rm -f $RPM_BUILD_ROOT%{_includedir}/linux/i2c-dev.h
-%endif
-
-%if %{with kernel} && %{with smp}
-install -d $RPM_BUILD_ROOT/lib/modules/%{_kernel_ver}smp/kernel/drivers/i2c/{busses,chips}
-install kernel-smp-modules/kernel/drivers/i2c/busses/*.o \
-       $RPM_BUILD_ROOT/lib/modules/%{_kernel_ver}smp/kernel/drivers/i2c/busses
-install kernel-smp-modules/kernel/drivers/i2c/chips/*.o \
-       $RPM_BUILD_ROOT/lib/modules/%{_kernel_ver}smp/kernel/drivers/i2c/chips
-%endif
 
 %clean
 rm -rf $RPM_BUILD_ROOT
 
-%post  -p /sbin/ldconfig
-%postun        -p /sbin/ldconfig
+%post  libs -p /sbin/ldconfig
+%postun        libs -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
+if [ "$1" = 1 ]; then
        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
+/sbin/chkconfig --add sensors
+%service sensors restart "sensors daemon"
 
 %preun sensord
 if [ "$1" = "0" ]; then
-       if [ -f /var/lock/subsys/sensors ]; then
-               /etc/rc.d/init.d/sensors stop >&2
-       fi
+       %service sensors stop
        /sbin/chkconfig --del sensors
 fi
 
-%post  -n kernel-i2c-%{name}
-%depmod %{_kernel_ver}
-
-%postun -n kernel-i2c-%{name}
-%depmod %{_kernel_ver}
-
-%post  -n kernel-smp-i2c-%{name}
-%depmod %{_kernel_ver}smp
-
-%postun -n kernel-smp-i2c-%{name}
-%depmod %{_kernel_ver}smp
-
-%if %{with userspace}
 %files
 %defattr(644,root,root,755)
 %doc BACKGROUND BUGS CHANGES README README.thinkpad TODO doc/{busses,chips}
 %doc doc/{FAQ,donations,fan-divisors,progs,temperature-sensors,*html,vid}
 %doc prog/{config,daemon,eepromer/README*,matorb,maxilife}
+%attr(755,root,root) %{_bindir}/ddcmon
 %attr(755,root,root) %{_bindir}/decode-*.pl
 %attr(755,root,root) %{_bindir}/sensors
 %attr(755,root,root) %{_sbindir}/sensors-detect
 %attr(755,root,root) %{_sbindir}/eeprom*
 %attr(755,root,root) %{_sbindir}/fancontrol
 %attr(755,root,root) %{_sbindir}/i2c*
-%ifnarch ppc sparc sparc64 sparcv9
+%ifarch %{ix86} %{x8664}
 %attr(755,root,root) %{_sbindir}/isadump
+%attr(755,root,root) %{_sbindir}/isaset
+%{_mandir}/man8/isadump.8*
+%{_mandir}/man8/isaset.8*
 %endif
 %attr(755,root,root) %{_sbindir}/pwmconfig
-%attr(755,root,root) %{_libdir}/lib*.so.*.*
-%config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/sensors.conf
-%{_mandir}/man1/*
-%{_mandir}/man5/*
-
-%files sensord
+%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/sensors.conf
+%{_mandir}/man1/sensors.1*
+%{_mandir}/man5/sensors.conf.5*
+%{_mandir}/man8/fancontrol.8*
+%{_mandir}/man8/i2c*.8*
+%{_mandir}/man8/pwmconfig.8*
+%{_mandir}/man8/sensors-detect.8*
+
+%files libs
 %defattr(644,root,root,755)
-%attr(754,root,root) %{_sbindir}/sensord
-%attr(754,root,root) /etc/rc.d/init.d/sensors
-%config(noreplace) %verify(not size mtime md5) /etc/sysconfig/sensors
-%{_mandir}/man8/*
+%attr(755,root,root) %{_libdir}/lib*.so.*.*
 
 %files devel
 %defattr(644,root,root,755)
@@ -345,22 +252,10 @@ fi
 %files static
 %defattr(644,root,root,755)
 %{_libdir}/libsensors.a
-%endif
 
-%if %{with kernel}
-%files -n kernel-i2c-%{name}
-%defattr(644,root,root,755)
-%dir /lib/modules/%{_kernel_ver}/kernel/drivers/i2c/busses
-/lib/modules/%{_kernel_ver}/kernel/drivers/i2c/busses/*.o*
-%dir /lib/modules/%{_kernel_ver}/kernel/drivers/i2c/chips
-/lib/modules/%{_kernel_ver}/kernel/drivers/i2c/chips/*.o*
-
-%if %{with smp}
-%files -n kernel-smp-i2c-%{name}
+%files sensord
 %defattr(644,root,root,755)
-%dir /lib/modules/%{_kernel_ver}smp/kernel/drivers/i2c/busses
-/lib/modules/%{_kernel_ver}smp/kernel/drivers/i2c/busses/*.o*
-%dir /lib/modules/%{_kernel_ver}smp/kernel/drivers/i2c/chips
-/lib/modules/%{_kernel_ver}smp/kernel/drivers/i2c/chips/*.o*
-%endif
-%endif
+%attr(754,root,root) %{_sbindir}/sensord
+%attr(754,root,root) /etc/rc.d/init.d/sensors
+%config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/sensors
+%{_mandir}/man8/sensord.8*
This page took 0.04466 seconds and 4 git commands to generate.