]> git.pld-linux.org Git - packages/lm_sensors.git/blobdiff - lm_sensors.spec
- updated to 3.4.0
[packages/lm_sensors.git] / lm_sensors.spec
index a8c1605c0dcbbecc61365d3f3cbbe97dea508e2d..5bc5e93123e043789e090682a05090908893dc3b 100644 (file)
-#
-# Conditional build:
-%bcond_without dist_kernel     # without kernel for distributions
-%bcond_without smp             # don't build SMP modules
-%bcond_without kernel          # build kernel 2.4 modules
-%bcond_without userspace       # don't build userspace utilities
+# TODO
+# - 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):   õÔÉ̦ÔÉ ÄÌÑ ÍÏΦÔÏÒÉÎÇÕ ÁÐÁÒÁÔÕÒÉ
+Summary(pl.UTF-8):     Monitor stanu sprzętu
+Summary(pt_BR.UTF-8):  Ferramentas para monitoração do hardware
+Summary(ru.UTF-8):     Утилиты для мониторинга аппаратуры
+Summary(uk.UTF-8):     Утиліти для моніторингу апаратури
 Name:          lm_sensors
-Version:       2.8.7
-%define _rel   1
-Release:       %{_rel}
-License:       GPL
+Version:       3.4.0
+Release:       1
+License:       GPL v2+
 Group:         Applications/System
-Source0:       http://secure.netroedge.com/~lm78/archive/%{name}-%{version}.tar.gz
-# Source0-md5: 64b4a4f547b2e1eab8a574d871867ca5
-Source1:       sensors.init
-Source2:       sensors.sysconfig
-Patch0:                %{name}-make.patch
-Patch1:                %{name}-ppc.patch
-Patch2:                %{name}-iconv-in-libc.patch
-Patch3:                %{name}-gcc34.patch
-URL:           http://www.lm-sensors.nu/
+Source0:       http://dl.lm-sensors.org/lm-sensors/releases/%{name}-%{version}.tar.bz2
+# Source0-md5: c03675ae9d43d60322110c679416901a
+Source1:       sensord.init
+Source2:       sensord.sysconfig
+Source3:       fancontrol.init
+Source4:       fancontrol.sysconfig
+Source5:       sensors.sh
+Source6:       lm_sensors.init
+Source7:       lm_sensors.sysconfig
+Source8:       sensord.service
+Patch0:                %{name}-ppc.patch
+Patch1:                %{name}-iconv-in-libc.patch
+Patch2:                %{name}-sensors-detect-PATH.patch
+Patch3:                %{name}-make.patch
+URL:           http://www.lm-sensors.org/
 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
-Requires:      dmidecode
+BuildRequires: rpmbuild(macros) >= 1.647
+BuildRequires: rrdtool-devel >= 1.2.10
+Requires(post,preun):  /sbin/chkconfig
+Requires(post,preun,postun):   systemd-units >= 38
+Requires:      %{name}-libs = %{version}-%{release}
+Requires:      dev >= 2.9.0-13
+Requires:      rc-scripts
+Requires:      systemd-units >= 38
+Requires:      uname(release) >= 2.6.5
+Obsoletes:     lm_sensors-config-default
 BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
-Obsoletes:     liblm_sensors1
-
-%define                _kernelsrcdir           /usr/src/linux-2.4
 
 %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
-wyposa¿onych w sprzêt monitoruj±cy, taki jak LM78 lub LM75.
+%description -l pl.UTF-8
+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
-Ferramentas para monitoração do hardware. Contém uma coleção de
-módulos para acesso genérico ao barramento SMBus e monitoração de
+%description -l pt_BR.UTF-8
+Ferramentas para monitoração do hardware. Contém uma coleção de
+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 ru.UTF-8
+Пакет lm_sensors содержит набор модулей для стандартного доступа к
+SMBus и мониторинга. ВНИМАНИЕ: для этого необходима специальная
¿Ð¾Ð´Ð´ÐµÑ\80жка, Ð¾Ñ\82Ñ\81Ñ\83Ñ\82Ñ\81Ñ\82вÑ\83Ñ\8eÑ\89аÑ\8f Ð² Ñ\81Ñ\82андаÑ\80Ñ\82нÑ\8bÑ\85 Ñ\81Ñ\82аÑ\80Ñ\8bÑ\85 Ñ\8fдÑ\80аÑ\85 2.2.XX!
 
-%description -l uk
-ðÁËÅÔ lm_sensors Í¦ÓÔÉÔØ ÎÁ¦ҠÍÏÄÕ̦נÄÌÑ ÓÔÁÎÄÁÒÔÎÏÇÏ ÄÏÓÔÕÐÕ ÄÏ
-SMBus ÔÁ ÍÏΦÔÏÒÉÎÇÕ. õ÷áçá: ÄÌÑ ÃØÏÇÏ ÐÏÔÒ¦ÂÎÁ ÓÐÅæÁÌØÎÁ Ð¦ÄÔÒÉÍËÁ,
ËÁ ×¦ÄÓÕÔÎÑ Õ ÓÔÁÎÄÁÒÔÎÉÈ ÓÔÁÒÉÈ ÑÄÒÁÈ 2.2.XX!
+%description -l uk.UTF-8
+Пакет lm_sensors містить набір модулів для стандартного доступу до
+SMBus та моніторингу. УВАГА: для цього потрібна спеціальна підтримка,
\8fка Ð²Ñ\96дÑ\81Ñ\83Ñ\82нÑ\8f Ñ\83 Ñ\81Ñ\82андаÑ\80Ñ\82ниÑ\85 Ñ\81Ñ\82аÑ\80иÑ\85 Ñ\8fдÑ\80аÑ\85 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.UTF-8):     Biblioteka lm_sensors
+Group:         Libraries
+Obsoletes:     liblm_sensors1
+Conflicts:     lm_sensors <= 2.9.2-2
 
-%description sensord
-Sensord daemon.
+%description libs
+lm_sensors library.
 
-%description sensord -l pl
-Demon sensord.
+%description libs -l pl.UTF-8
+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
+Summary(pl.UTF-8):     Pliki nagłówkowe dla lm_sensors
+Summary(pt_BR.UTF-8):  Arquivos necessários ao desenvolvimento de programas que usem o lm_sensors
+Summary(ru.UTF-8):     Файлы разработчика для программ, использующих lm_sensors
+Summary(uk.UTF-8):     Файли програміста для програм, які використовують lm_sensors
 Group:         Development/Libraries
-Requires:      %{name} = %{version}-%{release}
+Requires:      %{name}-libs = %{version}-%{release}
 Obsoletes:     liblm_sensors1-devel
 
 %description devel
 Header files for lm_sensors.
 
-%description devel -l pl
-Pliki nag³ówkowe dla lm_sensors.
+%description devel -l pl.UTF-8
+Pliki nagłówkowe dla lm_sensors.
 
-%description devel -l pt_BR
-Arquivos necessários ao desenvolvimento de programas que usem o
+%description devel -l pt_BR.UTF-8
+Arquivos necessários ao desenvolvimento de programas que usem o
 lm_sensors.
 
-%description devel -l ru
-ðÁËÅÔ lm_sensors-devel ×ËÌÀÞÁÅÔ ÈÅÄÅÒÙ É ÂÉÂÌÉÏÔÅËÉ, ÎÅÏÂÈÏÄÉÍÙÅ ÄÌÑ
ÏÓÔÒÏÅÎÉÑ ÐÒÏÇÒÁÍÍ, ÉÓÐÏÌØÚÕÀÝÉÈ ÄÁÎÎÙÅ ÓÅÎÓÏÒÏ×.
+%description devel -l ru.UTF-8
+Пакет lm_sensors-devel включает хедеры и библиотеки, необходимые для
¿Ð¾Ñ\81Ñ\82Ñ\80оениÑ\8f Ð¿Ñ\80огÑ\80амм, Ð¸Ñ\81полÑ\8cзÑ\83Ñ\8eÑ\89иÑ\85 Ð´Ð°Ð½Ð½Ñ\8bе Ñ\81енÑ\81оÑ\80ов.
 
-%description devel -l uk
-ðÁËÅÔ lm_sensors-devel Í¦ÓÔÉÔØ ÈÅÄÅÒÉ ÔÁ Â¦Â̦ÏÔÅËÉ, ÎÅÏÂȦÄΦ ÄÌÑ
ÏÂÕÄÏ×É ÐÒÏÇÒÁÍ, Ñ˦ ×ÉËÏÒÉÓÔÏ×ÕÀÔØ ÄÁΦ ÓÅÎÓÏÒ¦×.
+%description devel -l uk.UTF-8
+Пакет lm_sensors-devel містить хедери та бібліотеки, необхідні для
¿Ð¾Ð±Ñ\83дови Ð¿Ñ\80огÑ\80ам, Ñ\8fкÑ\96 Ð²Ð¸ÐºÐ¾Ñ\80иÑ\81Ñ\82овÑ\83Ñ\8eÑ\82Ñ\8c Ð´Ð°Ð½Ñ\96 Ñ\81енÑ\81оÑ\80Ñ\96в.
 
 %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
+Summary(pl.UTF-8):     Biblioteki statyczne dla lm_sensors
+Summary(pt_BR.UTF-8):  Bibliotecas estáticas para desenvolvimento com lm_sensors
+Summary(ru.UTF-8):     Статическая библиотека для программ, использующих lm_sensors
+Summary(uk.UTF-8):     Статична бібліотека для програм, які використовують lm_sensors
 Group:         Development/Libraries
 Requires:      %{name}-devel = %{version}-%{release}
 
 %description static
 Static libraries for lm_sensors.
 
-%description static -l pl
+%description static -l pl.UTF-8
 Biblioteki statyczne dla lm_sensors.
 
-%description static -l pt_BR
-Bibliotecas estáticas para desenvolvimento com lm_sensors
+%description static -l pt_BR.UTF-8
+Bibliotecas estáticas para desenvolvimento com lm_sensors
 
-%description static -l ru
-ðÁËÅÔ lm_sensors-static ×ËÌÀÞÁÅÔ ÓÔÁÔÉÞÅÓËÉÅ ÂÉÂÌÉÏÔÅËÉ, ÎÅÏÂÈÏÄÉÍÙÅ
-ÄÌÑ ÐÏÓÔÒÏÅÎÉÑ ÐÒÏÇÒÁÍÍ, ÉÓÐÏÌØÚÕÀÝÉÈ ÄÁÎÎÙÅ ÓÅÎÓÏÒÏ×.
+%description static -l ru.UTF-8
+Пакет lm_sensors-static включает статические библиотеки, необходимые
+для построения программ, использующих данные сенсоров.
 
-%description static -l uk
-ðÁËÅÔ lm_sensors-static Í¦ÓÔÉÔØ ÓÔÁÔÉÞΦ Â¦Â̦ÏÔÅËÉ, ÎÅÏÂȦÄΦ ÄÌÑ
ÏÂÕÄÏ×É ÐÒÏÇÒÁÍ, Ñ˦ ×ÉËÏÒÉÓÔÏ×ÕÀÔØ ÄÁΦ ÓÅÎÓÏÒ¦×.
+%description static -l uk.UTF-8
+Пакет lm_sensors-static містить статичні бібліотеки, необхідні для
¿Ð¾Ð±Ñ\83дови Ð¿Ñ\80огÑ\80ам, Ñ\8fкÑ\96 Ð²Ð¸ÐºÐ¾Ñ\80иÑ\81Ñ\82овÑ\83Ñ\8eÑ\82Ñ\8c Ð´Ð°Ð½Ñ\96 Ñ\81енÑ\81оÑ\80Ñ\96в.
 
-%package -n kernel24-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:  i2c >= 2.8.2}
-Provides:      %{name}-modules = %{version}-%{release}
-Obsoletes:     kernel-misc-lm_sensors
-
-%description -n kernel24-i2c-%{name}
-Kernel modules for various buses and monitor chips.
-
-%description -n kernel24-i2c-%{name} -l pl
-Modu³y j±dra dla ró¿nego rodzaju sensorów monitoruj±cych.
-
-%package -n kernel24-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:  i2c >= 2.8.2}
-Provides:      %{name}-modules = %{version}-%{release}
-Obsoletes:     kernel-smp-misc-lm_sensors
+%package sensord
+Summary:       Sensord daemon
+Summary(pl.UTF-8):     Demon sensord
+Group:         Daemons
+Requires(post,preun):  /sbin/chkconfig
+#Requires(post,preun,postun):  systemd-units >= 38
+Requires:      %{name} = %{version}-%{release}
+Requires:      rc-scripts
+#Requires:     systemd-units >= 38
+
+%description sensord
+Sensord daemon.
+
+%description sensord -l pl.UTF-8
+Demon sensord.
+
+%package fancontrol
+Summary:       Fancontrol daemon
+Summary(pl.UTF-8):     Demon sterowania wiatraczkami
+Group:         Daemons
+Requires(post,preun):  /sbin/chkconfig
+Requires:      %{name} = %{version}-%{release}
+Requires:      %{name}-sensord = %{version}-%{release}
+Requires:      rc-scripts
+
+%description fancontrol
+Fancontrol daemon monitors current temperature of the computer and
+adjusts fans speed acordingly.
 
-%description -n kernel24-smp-i2c-%{name}
-Kernel SMP modules for various buses and monitor chips.
+It is crucial to correctly configure this daemon (via running service
+fancontrol init) and ensuring, that the temperature levels are set not
+to burn the insides of the computer!
 
-%description -n kernel24-smp-i2c-%{name} -l pl
-Modu³y j±dra SMP dla ró¿nego rodzaju sensorów monitoruj±cych.
+%description fancontrol -l pl.UTF-8
+Demon fancontrol monitoruje obecną temperaturę komputera i ustawia
+odpowiednio prędkość wiatraków.
+
+Kluczowym jest, aby poprawnie skonfigurować tego demona (poprzez
+uruchomienie service fancontrol init) oraz upewnić się, że progi
+temperatury są ustawione poprawnie, by nie spalić wnętrza komputera!
 
 %prep
 %setup -q
@@ -176,74 +181,16 @@ Modu
 %patch3 -p1
 
 %build
-%if %{with kernel} && %{with smp}
-# workaround to avoid unresolved dmi* symbols in i2c-piix4.o
-install -d fakelinux
-:> fakelinux/.config
-%ifarch %{ix86}
-echo 'CONFIG_X86=y' >> fakelinux/.config
-%endif
-
-# SMP
-%{__make} all-kernel-busses all-kernel-chips \
-       CC="%{kgcc}" \
-       OPTS="%{rpmcflags} -D__KERNEL_SMP=1" \
-       LINUX=`pwd`/fakelinux \
-       LINUX_HEADERS=%{_kernelsrcdir}/include \
-       I2C_HEADERS=%{_kernelsrcdir}/include \
-       SMP=1
-
-%{__make} install-kernel-busses install-kernel-chips \
-       MODPREF=kernel-smp-modules \
-       LINUX=`pwd`/fakelinux \
-       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=`pwd`/fakelinux \
-       LINUX_HEADERS=%{_kernelsrcdir}/include \
-       I2C_HEADERS=%{_kernelsrcdir}/include \
-       SMP=0
-%endif
-
-%if %{with userspace}
 %{__make} user \
        CC="%{__cc}" \
        OPTS="%{rpmcflags}" \
-       LIBDIR=%{_libdir} \
-       LINUX=/dev/null \
-       LINUX_HEADERS=%{_kernelsrcdir}/include \
-       I2C_HEADERS=/usr/include \
+       SYSFS_SUPPORT:=1 \
        PROG_EXTRA:="sensord"
 
-%{__make} -C prog/eepromer \
-       CC="%{__cc}" \
-       CFLAGS="%{rpmcflags} -I../../kernel/include"
-%endif
-
 %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=`pwd`/fakelinux \
-       LINUX_HEADERS=%{_kernelsrcdir}/include \
-       I2C_HEADERS=%{_kernelsrcdir}/include \
-       SMP=0
-%endif
-
-%if %{with userspace}
-install -d $RPM_BUILD_ROOT{%{_sbindir},%{_mandir}/man8} \
+install -d $RPM_BUILD_ROOT{%{_sbindir},%{_mandir}/man8,%{systemdunitdir}} \
        $RPM_BUILD_ROOT/etc/{rc.d/init.d,sysconfig}
 
 %{__make} user_install \
@@ -253,123 +200,168 @@ install -d $RPM_BUILD_ROOT{%{_sbindir},%{_mandir}/man8} \
        LIBDIR=%{_libdir} \
        MANDIR=%{_mandir} \
        PROG_EXTRA:="sensord" \
-       LINUX=/dev/null \
-       LINUX_HEADERS=%{_kernelsrcdir}/include \
-       I2C_HEADERS=/usr/include
+       SYSFS_SUPPORT:=1
 
-install prog/eepromer/{eeprom,eepromer}        $RPM_BUILD_ROOT%{_sbindir}
+install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/sensord
+install %{SOURCE2} $RPM_BUILD_ROOT/etc/sysconfig/sensord
+install %{SOURCE3} $RPM_BUILD_ROOT/etc/rc.d/init.d/fancontrol
+install %{SOURCE4} $RPM_BUILD_ROOT/etc/sysconfig/fancontrol
+install %{SOURCE5} $RPM_BUILD_ROOT%{_bindir}
+install %{SOURCE6} $RPM_BUILD_ROOT/etc/rc.d/init.d/lm_sensors
+install %{SOURCE7} $RPM_BUILD_ROOT/etc/sysconfig/lm_sensors
+install -d $RPM_BUILD_ROOT/%{_sysconfdir}/sensors.d 
 
-install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/sensors
-install %{SOURCE2} $RPM_BUILD_ROOT/etc/sysconfig/sensors
+install -p prog/init/lm_sensors.service $RPM_BUILD_ROOT%{systemdunitdir}
+install -p %{SOURCE8} $RPM_BUILD_ROOT%{systemdunitdir}/sensord.service
 
-# i2c API for userspace - included in glibc-kernel-headers
-rm -f $RPM_BUILD_ROOT%{_includedir}/linux/i2c-dev.h
-%endif
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+%post  libs -p /sbin/ldconfig
+%postun        libs -p /sbin/ldconfig
 
-%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
+%pre
+if [ -f /var/lock/subsys/sensors_modules ]; then
+       mv -f /var/lock/subsys/sensors_modules /var/lock/subsys/lm_sensors
+       /sbin/chkconfig --del sensors_modules
+fi
+if [ -f /etc/sysconfig/sensors_modules ]; then
+       . /etc/sysconfig/sensors_modules
+       [ -z "$BUS" ] || echo BUS_MODULES=\""$BUS"\" >>/etc/sysconfig/lm_sensors
+       [ -z "$CHIP" ] || echo HWMON_MODULES=\""$CHIP"\" >>/etc/sysconfig/lm_sensors
+fi
+
+%if 0
+#"
 %endif
 
-%clean
-rm -rf $RPM_BUILD_ROOT
+%post
+if [ "$1" = 1 ]; then
+cat << EOF
+ *********************************************************************
+ *                                                                   *
+ *  NOTE:                                                            *
+ *  You have to configure sensors to match your motherboard sensors  *
+ *  in /etc/sensors3.conf and /etc/sysconfig/lm_sensors.             *
+ *  Use sensors-detect script to find proper modules.                *
+ *                                                                   *
+ *********************************************************************
+EOF
+fi
+/sbin/chkconfig --add lm_sensors
+NORESTART=1
+%systemd_post lm_sensors.service
+
+%preun
+if [ "$1" = "0" ]; then
+       %service lm_sensors stop
+       /sbin/chkconfig --del lm_sensors
+fi
+%systemd_preun lm_sensors.service
 
-%post  -p /sbin/ldconfig
-%postun        -p /sbin/ldconfig
+%postun
+%systemd_reload
 
-%post sensord
-/sbin/chkconfig --add sensors
+%triggerpostun -- %{name} < 3.3.2-2
+%systemd_trigger lm_sensors.service
+
+%pre sensord
 if [ -f /var/lock/subsys/sensors ]; then
-       /etc/rc.d/init.d/sensors restart >&2
-else
-       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
+       mv -f /var/lock/subsys/sensors /var/lock/subsys/sensord
+fi
+if [ -f /etc/rc.d/init.d/sensors ]; then
+       /sbin/chkconfig --del sensors
+fi
+if [ -f /etc/sysconfig/sensors ]; then
+       cp -a /etc/sysconfig/sensors /etc/sysconfig/sensord
 fi
 
+%post sensord
+/sbin/chkconfig --add sensord
+%service sensord restart "sensors daemon"
+%systemd_post sensord.service
+
 %preun sensord
 if [ "$1" = "0" ]; then
-       if [ -f /var/lock/subsys/sensors ]; then
-               /etc/rc.d/init.d/sensors stop >&2
-       fi
-       /sbin/chkconfig --del sensors
+       %service sensord stop
+       /sbin/chkconfig --del sensord
 fi
+%systemd_preun sensord.service
 
-%post  -n kernel24-i2c-%{name}
-%depmod %{_kernel_ver}
+%postun sensord
+%systemd_reload
 
-%postun -n kernel24-i2c-%{name}
-%depmod %{_kernel_ver}
+%triggerpostun sensord -- %{name}-sensord < 3.3.2-2
+%systemd_trigger sensord.service
 
-%post  -n kernel24-smp-i2c-%{name}
-%depmod %{_kernel_ver}smp
+%post fancontrol
+if [ "$1" = 1 ]; then
+       echo "You have to configure fancontrol by running service fancontrol init first."
+fi
+/sbin/chkconfig --add fancontrol
+%service fancontrol restart "fancontrol daemon"
 
-%postun -n kernel24-smp-i2c-%{name}
-%depmod %{_kernel_ver}smp
+%preun fancontrol
+if [ "$1" = "0" ]; then
+       %service fancontrol stop
+       /sbin/chkconfig --del fancontrol
+fi
 
-%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}/decode-*.pl
+%doc CHANGES CONTRIBUTORS README
+%doc doc/{donations,fan-divisors,progs,temperature-sensors,vid}
+%doc prog/daemon
+%attr(755,root,root) %{_bindir}/sensors-conf-convert
 %attr(755,root,root) %{_bindir}/sensors
+%attr(755,root,root) %{_bindir}/sensors.sh
 %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*
-%ifarch %{ix86} amd64
+%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/sensors.1*
 %{_mandir}/man5/sensors.conf.5*
-%{_mandir}/man8/i2c*.8*
+%{_mandir}/man5/sensors3.conf.5*
+%{_mandir}/man8/sensors-conf-convert.8*
 %{_mandir}/man8/sensors-detect.8*
+%attr(754,root,root) /etc/rc.d/init.d/lm_sensors
+%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/sensors3.conf
+%dir %{_sysconfdir}/sensors.d
+%config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/lm_sensors
+%{systemdunitdir}/lm_sensors.service
 
-%files sensord
+%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/sensord.8*
+%attr(755,root,root) %{_libdir}/libsensors.so.*.*.*
+%attr(755,root,root) %ghost %{_libdir}/libsensors.so.4
 
 %files devel
 %defattr(644,root,root,755)
-%doc doc/{developers,kernel}
-%attr(755,root,root) %{_libdir}/lib*.so
+%doc doc/developers doc/libsensors-API.txt
+%attr(755,root,root) %{_libdir}/libsensors.so
 %{_includedir}/sensors
-%{_includedir}/linux/sensors.h
-%{_mandir}/man3/*
+%{_mandir}/man3/libsensors.3*
 
 %files static
 %defattr(644,root,root,755)
 %{_libdir}/libsensors.a
-%endif
 
-%if %{with kernel}
-%files -n kernel24-i2c-%{name}
+%files sensord
 %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*
+%attr(754,root,root) %{_sbindir}/sensord
+%attr(754,root,root) /etc/rc.d/init.d/sensord
+%config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/sensord
+%{_mandir}/man8/sensord.8*
+%{systemdunitdir}/sensord.service
 
-%if %{with smp}
-%files -n kernel24-smp-i2c-%{name}
+%files fancontrol
 %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(755,root,root) %{_sbindir}/fancontrol
+%attr(755,root,root) %{_sbindir}/pwmconfig
+%attr(754,root,root) /etc/rc.d/init.d/fancontrol
+%config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/fancontrol
+%{_mandir}/man8/fancontrol.8*
+%{_mandir}/man8/pwmconfig.8*
This page took 0.185955 seconds and 4 git commands to generate.