X-Git-Url: http://git.pld-linux.org/gitweb.cgi?a=blobdiff_plain;f=lm_sensors.spec;h=12bc1e2e02aa00a2c5149505d12583a843114e49;hb=a64ba14ad16d5d96148888f043bdd9a18e2a7f08;hp=d280b0f5e241d23410f9dadca7624b3fbf1231d3;hpb=dba9e284a1ee1b5febb6d0a3037ad02618848f2f;p=packages%2Flm_sensors.git diff --git a/lm_sensors.spec b/lm_sensors.spec index d280b0f..12bc1e2 100644 --- a/lm_sensors.spec +++ b/lm_sensors.spec @@ -1,38 +1,49 @@ - -# conditional build -# _without_dist_kernel without kernel for distributions -%include /usr/lib/rpm/macros.perl -%define _rel 2 - +# 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 Summary(pl): Monitor stanu sprzêtu Summary(pt_BR): Ferramentas para monitoração do hardware +Summary(ru): õÔÉÌÉÔÙ ÄÌÑ ÍÏÎÉÔÏÒÉÎÇÁ ÁÐÐÁÒÁÔÕÒÙ +Summary(uk): õÔÉ̦ÔÉ ÄÌÑ ÍÏΦÔÏÒÉÎÇÕ ÁÐÁÒÁÔÕÒÉ Name: lm_sensors -Version: 2.6.3 -Release: %{_rel} +Version: 2.10.1 +Release: 1 License: GPL Group: Applications/System -Source0: http://www.lm-sensors.nu/archive/%{name}-%{version}.tar.gz +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 -URL: http://www.netroedge.com/~lm78/ +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 -%{!?_without_dist_kernel:BuildRequires: i2c-devel >= 2.6.0} -PreReq: /sbin/chkconfig -PreReq: /sbin/ldconfig -BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) +BuildRequires: rpmbuild(macros) >= 1.268 +BuildRequires: rrdtool-devel >= 1.2.10 +BuildRequires: sysfsutils-devel +Requires: dev >= 2.9.0-13 +Requires: dmidecode Obsoletes: liblm_sensors1 +BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) %description Tools for monitoring the hardware health of Linux systems containing hardware health monitoring hardware such as the LM78 and LM75. %description -l pl -Narzêdzie do monitorowania sprzêtu w systemach Linuksowych +Narzêdzie do monitorowania sprzêtu w systemach linuksowych wyposa¿onych w sprzêt monitoruj±cy, taki jak LM78 lub LM75. %description -l pt_BR @@ -40,12 +51,35 @@ Ferramentas para monitora módulos para acesso genérico ao barramento SMBus e monitoração de hardware. +%description -l ru +ðÁËÅÔ lm_sensors ÓÏÄÅÒÖÉÔ ÎÁÂÏÒ ÍÏÄÕÌÅÊ ÄÌÑ ÓÔÁÎÄÁÒÔÎÏÇÏ ÄÏÓÔÕÐÁ Ë +SMBus É ÍÏÎÉÔÏÒÉÎÇÁ. ÷îéíáîéå: ÄÌÑ ÜÔÏÇÏ ÎÅÏÂÈÏÄÉÍÁ ÓÐÅÃÉÁÌØÎÁÑ +ÐÏÄÄÅÒÖËÁ, ÏÔÓÕÔÓÔ×ÕÀÝÁÑ × ÓÔÁÎÄÁÒÔÎÙÈ ÓÔÁÒÙÈ ÑÄÒÁÈ 2.2.XX! + +%description -l uk +ðÁËÅÔ lm_sensors ͦÓÔÉÔØ ÎÁÂ¦Ò ÍÏÄÕÌ¦× ÄÌÑ ÓÔÁÎÄÁÒÔÎÏÇÏ ÄÏÓÔÕÐÕ ÄÏ +SMBus ÔÁ ÍÏΦÔÏÒÉÎÇÕ. õ÷áçá: ÄÌÑ ÃØÏÇÏ ÐÏÔÒ¦ÂÎÁ ÓÐÅæÁÌØÎÁ ЦÄÔÒÉÍËÁ, +ÑËÁ צÄÓÕÔÎÑ Õ ÓÔÁÎÄÁÒÔÎÉÈ ÓÔÁÒÉÈ ÑÄÒÁÈ 2.2.XX! + +%package libs +Summary: lm_sensors library +Summary(pl): Biblioteka lm_sensors +Group: Libraries + +%description libs +lm_sensors library. + +%description libs -l pl +Biblioteka lm_sensors. + %package devel Summary: Header files for lm_sensors Summary(pl): Pliki nag³ówkowe dla lm_sensors Summary(pt_BR): Arquivos necessários ao desenvolvimento de programas que usem o lm_sensors +Summary(ru): æÁÊÌÙ ÒÁÚÒÁÂÏÔÞÉËÁ ÄÌÑ ÐÒÏÇÒÁÍÍ, ÉÓÐÏÌØÚÕÀÝÉÈ lm_sensors +Summary(uk): æÁÊÌÉ ÐÒÏÇÒÁͦÓÔÁ ÄÌÑ ÐÒÏÇÒÁÍ, Ñ˦ ×ÉËÏÒÉÓÔÏ×ÕÀÔØ lm_sensors Group: Development/Libraries -Requires: %{name} = %{version} +Requires: %{name}-libs = %{version}-%{release} Obsoletes: liblm_sensors1-devel %description devel @@ -58,12 +92,22 @@ Pliki nag Arquivos necessários ao desenvolvimento de programas que usem o lm_sensors. +%description devel -l ru +ðÁËÅÔ lm_sensors-devel ×ËÌÀÞÁÅÔ ÈÅÄÅÒÙ É ÂÉÂÌÉÏÔÅËÉ, ÎÅÏÂÈÏÄÉÍÙÅ ÄÌÑ +ÐÏÓÔÒÏÅÎÉÑ ÐÒÏÇÒÁÍÍ, ÉÓÐÏÌØÚÕÀÝÉÈ ÄÁÎÎÙÅ ÓÅÎÓÏÒÏ×. + +%description devel -l uk +ðÁËÅÔ lm_sensors-devel ͦÓÔÉÔØ ÈÅÄÅÒÉ ÔÁ ¦Â̦ÏÔÅËÉ, ÎÅÏÂȦÄΦ ÄÌÑ +ÐÏÂÕÄÏ×É ÐÒÏÇÒÁÍ, Ñ˦ ×ÉËÏÒÉÓÔÏ×ÕÀÔØ ÄÁΦ ÓÅÎÓÏÒ¦×. + %package static Summary: Static libraries for lm_sensors Summary(pl): Biblioteki statyczne dla lm_sensors Summary(pt_BR): Bibliotecas estáticas para desenvolvimento com lm_sensors +Summary(ru): óÔÁÔÉÞÅÓËÁÑ ÂÉÂÌÉÏÔÅËÁ ÄÌÑ ÐÒÏÇÒÁÍÍ, ÉÓÐÏÌØÚÕÀÝÉÈ lm_sensors +Summary(uk): óÔÁÔÉÞÎÁ ¦Â̦ÏÔÅËÁ ÄÌÑ ÐÒÏÇÒÁÍ, Ñ˦ ×ÉËÏÒÉÓÔÏ×ÕÀÔØ lm_sensors Group: Development/Libraries -Requires: %{name}-devel = %{version} +Requires: %{name}-devel = %{version}-%{release} %description static Static libraries for lm_sensors. @@ -74,159 +118,144 @@ Biblioteki statyczne dla lm_sensors. %description static -l pt_BR Bibliotecas estáticas para desenvolvimento com lm_sensors -%package -n kernel-misc-%{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} -Prereq: /sbin/depmod -%{!?_without_dist_kernel:%requires_releq_kernel_up} -%{!?_without_dist_kernel:Requires: i2c >= 2.6.0} -Provides: %{name}-modules = %{version} -Obsoletes: %{name}-modules - -%description -n kernel-misc-%{name} -Kernel modules for various buses and monitor chips. - -%description -n kernel-misc-%{name} -l pl -Modu³y j±dra dla ró¿nego rodzaju sensorów monitoruj±cych. - -%package -n kernel-smp-misc-%{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} -Prereq: /sbin/depmod -%{!?_without_dist_kernel:%requires_releq_kernel_smp} -%{!?_without_dist_kernel:Requires: i2c >= 2.6.0} -Provides: %{name}-modules = %{version} -Obsoletes: %{name}-modules +%description static -l ru +ðÁËÅÔ lm_sensors-static ×ËÌÀÞÁÅÔ ÓÔÁÔÉÞÅÓËÉÅ ÂÉÂÌÉÏÔÅËÉ, ÎÅÏÂÈÏÄÉÍÙÅ +ÄÌÑ ÐÏÓÔÒÏÅÎÉÑ ÐÒÏÇÒÁÍÍ, ÉÓÐÏÌØÚÕÀÝÉÈ ÄÁÎÎÙÅ ÓÅÎÓÏÒÏ×. + +%description static -l uk +ðÁËÅÔ lm_sensors-static ͦÓÔÉÔØ ÓÔÁÔÉÞΦ ¦Â̦ÏÔÅËÉ, ÎÅÏÂȦÄΦ ÄÌÑ +ÐÏÂÕÄÏ×É ÐÒÏÇÒÁÍ, Ñ˦ ×ÉËÏÒÉÓÔÏ×ÕÀÔØ ÄÁΦ ÓÅÎÓÏÒ¦×. -%description -n kernel-smp-misc-%{name} -Kernel SMP modules for various buses and monitor chips. +%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-misc-%{name} -l pl -Modu³y j±dra SMP dla ró¿nego rodzaju sensorów monitoruj±cych. +%description sensord +Sensord daemon. + +%description sensord -l pl +Demon sensord. %prep %setup -q %patch0 -p1 +%patch1 -p1 +%patch2 -p1 +%patch3 -p1 %build -#up -%{__make} \ +%{__make} user \ + CC="%{__cc}" \ OPTS="%{rpmcflags}" \ + LIBDIR=%{_libdir} \ LINUX=/dev/null \ LINUX_HEADERS=%{_kernelsrcdir}/include \ - I2C_HEADERS=%{_kernelsrcdir}/include \ - SMP=0 - -%{__make} install-kernel \ - MODDIR=kernel-up-modules -%{__make} install-kernel-busses \ - MODDIR=kernel-up-modules -%{__make} install-kernel-chips \ - MODDIR=kernel-up-modules - -%{__make} clean - -#smp -%{__make} \ - OPTS="%{rpmcflags} -D__KERNEL_SMP=1" \ - LINUX=/dev/null \ - LINUX_HEADERS=%{_kernelsrcdir}/include \ - I2C_HEADERS=%{_kernelsrcdir}/include \ - SMP=1 + I2C_HEADERS=/usr/include \ + PROG_EXTRA:="sensord" \ + SYSFS_SUPPORT:=1 + +%{__make} -C prog/eepromer \ + CC="%{__cc}" \ + CFLAGS="%{rpmcflags} -I../../kernel/include" + +# 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 + install -d $RPM_BUILD_ROOT{%{_sbindir},%{_mandir}/man8} \ - $RPM_BUILD_ROOT{/etc/{rc.d/init.d,sysconfig},/lib/modules/%{_kernel_ver}/misc} + $RPM_BUILD_ROOT/etc/{rc.d/init.d,sysconfig} -%{__make} install \ +%{__make} user_install \ DESTDIR=$RPM_BUILD_ROOT \ PREFIX=%{_prefix} \ ETCDIR=%{_sysconfdir} \ + LIBDIR=%{_libdir} \ MANDIR=%{_mandir} \ - MODDIR=/lib/modules/%{_kernel_ver}smp/misc + PROG_EXTRA:="sensord" \ + LINUX=/dev/null \ + LINUX_HEADERS=%{_kernelsrcdir}/include \ + I2C_HEADERS=/usr/include -install prog/sensord/sensord $RPM_BUILD_ROOT%{_sbindir} -install prog/sensord/sensord.8 $RPM_BUILD_ROOT%{_mandir}/man8 +install prog/eepromer/{eeprom,eepromer} $RPM_BUILD_ROOT%{_sbindir} install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/sensors install %{SOURCE2} $RPM_BUILD_ROOT/etc/sysconfig/sensors -install kernel-up-modules/* $RPM_BUILD_ROOT/lib/modules/%{_kernel_ver}/misc - -find doc -type f ! -name \*.\* -a ! -name \*ticket | xargs gzip -9nf +# i2c API for userspace - included in glibc-kernel-headers +rm -f $RPM_BUILD_ROOT%{_includedir}/linux/i2c-dev.h %clean rm -rf $RPM_BUILD_ROOT -%post -/sbin/ldconfig -/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 - echo "Run \"/etc/rc.d/init.d/sensors start\" to start sensors daemon." >&2 +%post libs -p /sbin/ldconfig +%postun libs -p /sbin/ldconfig + +%post sensord +if [ "$1" = 1 ]; then + echo "You have to configure sensors modules in /etc/sysconfig/sensors" fi +/sbin/chkconfig --add sensors +%service sensors restart "sensors daemon" -%preun +%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 -%postun -p /sbin/ldconfig - -%post -n kernel-misc-%{name} -/sbin/depmod -a - -%post -n kernel-smp-misc-%{name} -/sbin/depmod -a - -%postun -n kernel-misc-%{name} -/sbin/depmod -a - -%postun -n kernel-smp-misc-%{name} -/sbin/depmod -a - %files %defattr(644,root,root,755) -%doc BACKGROUND BUGS CHANGES README README.thinkpad TODO doc/[^k]* +%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(754,root,root) %{_sbindir}/sensord -%attr(754,root,root) /etc/rc.d/init.d/sensors +%attr(755,root,root) %{_sbindir}/eeprom* +%attr(755,root,root) %{_sbindir}/fancontrol +%attr(755,root,root) %{_sbindir}/i2c* +%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 +%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(755,root,root) %{_libdir}/lib*.so.*.* -%config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/sensors.conf -%config(noreplace) %verify(not size mtime md5) /etc/sysconfig/sensors -%{_mandir}/man1/* -%{_mandir}/man5/* -%{_mandir}/man8/* %files devel %defattr(644,root,root,755) -%doc doc/developers doc/kernel +%doc doc/{developers,kernel} %attr(755,root,root) %{_libdir}/lib*.so %{_includedir}/sensors -%{_includedir}/linux/* +%{_includedir}/linux/sensors.h %{_mandir}/man3/* %files static %defattr(644,root,root,755) %{_libdir}/libsensors.a -%files -n kernel-misc-%{name} +%files sensord %defattr(644,root,root,755) -/lib/modules/%{_kernel_ver}/misc/* - -%files -n kernel-smp-misc-%{name} -%defattr(644,root,root,755) -/lib/modules/%{_kernel_ver}smp/misc/* +%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*