X-Git-Url: http://git.pld-linux.org/?a=blobdiff_plain;f=lm_sensors.spec;h=b5919d0b75641acf28587f33867e5142b5405cae;hb=3c47d66fb2d8f410c464a25c8dc0df6c147f847f;hp=870af30ec7d1700289c441c03aa63b2b0a482b45;hpb=15ecba1dcf87209d4a803a82b00aed88acc9d194;p=packages%2Flm_sensors.git diff --git a/lm_sensors.spec b/lm_sensors.spec index 870af30..b5919d0 100644 --- a/lm_sensors.spec +++ b/lm_sensors.spec @@ -3,6 +3,9 @@ # %include /usr/lib/rpm/macros.perl +%define _kernel_ver %(grep UTS_RELEASE %{_kernelsrcdir}/include/linux/version.h 2>/dev/null | cut -d'"' -f2) +%define _kernel_ver_str %(echo %{_kernel_ver} | sed s/-/_/g) + Summary: Hardware health monitoring Summary(pl): Monitor stanu sprzêtu Summary(pt_BR): Ferramentas para monitoração do hardware @@ -31,6 +34,8 @@ PreReq: /sbin/ldconfig BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) Obsoletes: liblm_sensors1 +%define _kernel24 %(echo %{_kernel_ver} | grep -q '2\.[012]\.' ; echo $?) + %description Tools for monitoring the hardware health of Linux systems containing hardware health monitoring hardware such as the LM78 and LM75. @@ -163,7 +168,7 @@ Modu #up %{__make} \ OPTS="%{rpmcflags}" \ - LINUX=/usr/src/linux \ + LINUX=/dev/null \ LINUX_HEADERS=%{_kernelsrcdir}/include \ I2C_HEADERS=%{_kernelsrcdir}/include \ SMP=0 @@ -180,7 +185,7 @@ Modu #smp %{__make} \ OPTS="%{rpmcflags} -D__KERNEL_SMP=1" \ - LINUX=/usr/src/linux \ + LINUX=/dev/null \ LINUX_HEADERS=%{_kernelsrcdir}/include \ I2C_HEADERS=%{_kernelsrcdir}/include \ PROG_EXTRA:="sensord dump" \ @@ -256,7 +261,9 @@ fi %doc prog/{config,daemon,eeprom,eepromer/README*,matorb,maxilife,xeon} %attr(755,root,root) %{_bindir}/sensors %attr(755,root,root) %{_sbindir}/sensors-detect +%if %{_kernel24} %attr(755,root,root) %{_sbindir}/dmidecode +%endif %attr(755,root,root) %{_sbindir}/eeprom* %attr(755,root,root) %{_sbindir}/i2c* %attr(755,root,root) %{_sbindir}/isadump