|
@@ -1,17 +1,35 @@
|
|
|
|
+%bcond_with systemd
|
|
|
|
+
|
|
Summary: Hardware monitoring tools
|
|
Summary: Hardware monitoring tools
|
|
Summary(ja): ハードウェア監視ツール集
|
|
Summary(ja): ハードウェア監視ツール集
|
|
Name: lm-sensors
|
|
Name: lm-sensors
|
|
-Version: 3.5.0
|
|
+Version: 3.6.0
|
|
-Release: 1%{?_dist_release}
|
|
+Release: 1%{?_dist_release}%{?with_systemd:.systemd}
|
|
|
|
+Group: system
|
|
|
|
+Vendor: Project Vine
|
|
|
|
+Distribution: Vine Linux
|
|
|
|
+Packager: shaolin, owa
|
|
|
|
|
|
%global ver_str %(echo -n "%{version}" | sed -e 's/\\./-/g')
|
|
%global ver_str %(echo -n "%{version}" | sed -e 's/\\./-/g')
|
|
|
|
|
|
-Group: Applications/System
|
|
|
|
License: LGPLv2+ and GPLv3+ and GPLv2+ and Verbatim and Public Domain
|
|
License: LGPLv2+ and GPLv3+ and GPLv2+ and Verbatim and Public Domain
|
|
URL: https://github.com/lm-sensors/lm-sensors
|
|
URL: https://github.com/lm-sensors/lm-sensors
|
|
-
|
|
+Source0: https://github.com/lm-sensors/lm-sensors/archive/V%{ver_str}/lm-sensors-%{ver_str}.tar.gz
|
|
-Source0: https://github.com/lm-sensors/lm-sensors/archive/lm_sensors-%{version}.tar.gz#/lm-sensors-%{ver_str}.tar.gz
|
|
|
|
Source1: lm_sensors.sysconfig
|
|
Source1: lm_sensors.sysconfig
|
|
|
|
+# This one was taken from PLD-linux, Thanks!
|
|
|
|
+Source2: sensord.sysconfig
|
|
|
|
+Source3: lm_sensors-modprobe-wrapper
|
|
|
|
+Source4: lm_sensors-modprobe-r-wrapper
|
|
|
|
+Source5: sensord.service
|
|
|
|
+Source6: sensord-service-wrapper
|
|
|
|
+Source7: lm_sensors.service
|
|
|
|
+Source8: lm_sensors-wrapper
|
|
|
|
+
|
|
|
|
+# Upstream patch:
|
|
|
|
+Patch1: 0001-Change-PIDFile-path-from-var-run-to-run.patch
|
|
|
|
+Patch2: lm_sensors-3.6.0-allow_no_sensors.patch
|
|
|
|
+# Upstream commit 5deee7d0c301df779:
|
|
|
|
+Patch3: lm_sensors-3.6.0-sensors-detect-Add-support-for-AMD-CPU-Family-19h.patch
|
|
|
|
|
|
BuildRoot: %{_tmppath}/%{name}-%{version}-root
|
|
BuildRoot: %{_tmppath}/%{name}-%{version}-root
|
|
BuildRequires: bison
|
|
BuildRequires: bison
|
|
@@ -26,22 +44,22 @@ BuildRequires: sysfsutils-devel
|
|
BuildRequires: rrdtool-devel
|
|
BuildRequires: rrdtool-devel
|
|
|
|
|
|
Requires: perl
|
|
Requires: perl
|
|
|
|
+%if %{with systemd}
|
|
|
|
+%else
|
|
Requires: initscripts
|
|
Requires: initscripts
|
|
Requires(post): /sbin/chkconfig
|
|
Requires(post): /sbin/chkconfig
|
|
Requires(preun): /sbin/chkconfig
|
|
Requires(preun): /sbin/chkconfig
|
|
-
|
|
+%endif
|
|
-Vendor: Project Vine
|
|
|
|
-Distribution: Vine Linux
|
|
|
|
-Packager: shaolin, owa
|
|
|
|
|
|
|
|
%description
|
|
%description
|
|
The lm-sensors package includes a collection of modules for general SMBus
|
|
The lm-sensors package includes a collection of modules for general SMBus
|
|
access and hardware monitoring.
|
|
access and hardware monitoring.
|
|
|
|
|
|
|
|
+
|
|
%package libs
|
|
%package libs
|
|
Summary: Lm_sensors core libraries
|
|
Summary: Lm_sensors core libraries
|
|
Summary(ja): Lm_sensors コアライブラリ
|
|
Summary(ja): Lm_sensors コアライブラリ
|
|
-Group: System Environment/Libraries
|
|
+Group: system
|
|
|
|
|
|
%description libs
|
|
%description libs
|
|
Core libraries for lm_sensors applications
|
|
Core libraries for lm_sensors applications
|
|
@@ -50,7 +68,7 @@ Core libraries for lm_sensors applications
|
|
%package devel
|
|
%package devel
|
|
Summary: Development files for programs which will use lm_sensors
|
|
Summary: Development files for programs which will use lm_sensors
|
|
Summary(ja): lm_sensors を使用するプログラムのための開発用ファイル
|
|
Summary(ja): lm_sensors を使用するプログラムのための開発用ファイル
|
|
-Group: Development/Libraries
|
|
+Group: programming
|
|
Requires: %{name}-libs = %{version}-%{release}
|
|
Requires: %{name}-libs = %{version}-%{release}
|
|
|
|
|
|
%description devel
|
|
%description devel
|
|
@@ -61,59 +79,125 @@ when building applications that make use of sensor data.
|
|
%package sensord
|
|
%package sensord
|
|
Summary: Daemon that periodically logs sensor readings
|
|
Summary: Daemon that periodically logs sensor readings
|
|
Summary(ja): センサーの読み取り値を定期的に記録するデーモン
|
|
Summary(ja): センサーの読み取り値を定期的に記録するデーモン
|
|
-Group: System Environment/Daemons
|
|
+Group: system
|
|
Requires: %{name} = %{version}-%{release}
|
|
Requires: %{name} = %{version}-%{release}
|
|
|
|
|
|
%description sensord
|
|
%description sensord
|
|
Daemon that periodically logs sensor readings to syslog or a round-robin
|
|
Daemon that periodically logs sensor readings to syslog or a round-robin
|
|
database, and warns of sensor alarms.
|
|
database, and warns of sensor alarms.
|
|
|
|
|
|
|
|
+
|
|
|
|
+%debug_package
|
|
|
|
+
|
|
|
|
+
|
|
%prep
|
|
%prep
|
|
%setup -q -n lm-sensors-%{ver_str}
|
|
%setup -q -n lm-sensors-%{ver_str}
|
|
|
|
+%patch1 -p1
|
|
|
|
+%patch2 -p1
|
|
|
|
+%patch3 -p1
|
|
|
|
+
|
|
|
|
+# Remove currently unused files to make sure we've got the license right
|
|
|
|
+rm -f prog/init/sysconfig-lm_sensors-convert prog/hotplug/unhide_ICH_SMBus
|
|
|
|
+
|
|
|
|
+mv prog/init/README prog/init/README.initscripts
|
|
|
|
+chmod -x prog/init/fancontrol.init
|
|
|
|
+
|
|
|
|
+# fixing the sensord-service-wrapper path
|
|
|
|
+cp -p %{SOURCE5} sensord.service
|
|
|
|
+cp -p %{SOURCE7} lm_sensors.service
|
|
|
|
+sed -i "s|\@WRAPPER_DIR\@|%{_libexecdir}/%{name}|" sensord.service
|
|
|
|
+sed -i "s|\@WRAPPER_DIR\@|%{_libexecdir}/%{name}|" lm_sensors.service
|
|
|
|
+
|
|
|
|
+
|
|
|
|
|
|
%build
|
|
%build
|
|
-export CFLAGS="%{optflags}"
|
|
+%set_build_flags
|
|
-make PREFIX=%{_prefix} LIBDIR=%{_libdir} MANDIR=%{_mandir} EXLDFLAGS= user
|
|
+make PREFIX=%{_prefix} LIBDIR=%{_libdir} MANDIR=%{_mandir} \
|
|
|
|
+ EXLDFLAGS="$LDFLAGS" PROG_EXTRA=sensord BUILD_STATIC_LIB=0 user
|
|
|
|
+
|
|
|
|
|
|
%install
|
|
%install
|
|
-rm -rf $RPM_BUILD_ROOT
|
|
+rm -rf %{buildroot}
|
|
make user_install \
|
|
make user_install \
|
|
- DESTDIR=$RPM_BUILD_ROOT \
|
|
+ DESTDIR=%{buildroot} \
|
|
PREFIX=%{_prefix} \
|
|
PREFIX=%{_prefix} \
|
|
LIBDIR=%{_libdir} \
|
|
LIBDIR=%{_libdir} \
|
|
ETCDIR=%{_sysconfdir} \
|
|
ETCDIR=%{_sysconfdir} \
|
|
- MANDIR=%{_mandir}
|
|
+ MANDIR=%{_mandir} \
|
|
|
|
+ PROG_EXTRA=sensord \
|
|
|
|
+ BUILD_STATIC_LIB=0 \
|
|
|
|
+ user_install
|
|
|
|
|
|
-ln -s sensors.conf.5.gz $RPM_BUILD_ROOT%{_mandir}/man5/sensors3.conf.5.gz
|
|
+ln -s sensors.conf.5.gz %{buildroot}%{_mandir}/man5/sensors3.conf.5.gz
|
|
|
|
|
|
# add initscript from proc/init
|
|
# add initscript from proc/init
|
|
-mkdir -p $RPM_BUILD_ROOT%{_initdir}
|
|
+mkdir -p %{buildroot}%{_sysconfdir}/sensors.d
|
|
-mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/sensors.d
|
|
+mkdir -p %{buildroot}%{_sysconfdir}/sysconfig
|
|
-mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig
|
|
+install -pm 644 %{SOURCE1} %{buildroot}%{_sysconfdir}/sysconfig/lm_sensors
|
|
-install -m755 prog/init/lm_sensors.init $RPM_BUILD_ROOT%{_initdir}/lm_sensors
|
|
+
|
|
-install -pm 644 %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig/lm_sensors
|
|
+%if %{with systemd}
|
|
|
|
+install -pm 644 %{SOURCE2} %{buildroot}%{_sysconfdir}/sysconfig/sensord
|
|
|
|
+
|
|
|
|
+# service files
|
|
|
|
+mkdir -p %{buildroot}%{_unitdir}
|
|
|
|
+install -pm 644 prog/init/fancontrol.service %{buildroot}%{_unitdir}
|
|
|
|
+install -pm 644 lm_sensors.service %{buildroot}%{_unitdir}
|
|
|
|
+install -pm 644 sensord.service %{buildroot}%{_unitdir}
|
|
|
|
+
|
|
|
|
+# customized modprobe calls
|
|
|
|
+mkdir -p %{buildroot}%{_libexecdir}/%{name}
|
|
|
|
+install -pm 755 %{SOURCE3} %{buildroot}%{_libexecdir}/%{name}/lm_sensors-modprobe-wrapper
|
|
|
|
+install -pm 755 %{SOURCE4} %{buildroot}%{_libexecdir}/%{name}/lm_sensors-modprobe-r-wrapper
|
|
|
|
+install -pm 755 %{SOURCE8} %{buildroot}%{_libexecdir}/%{name}/lm_sensors-wrapper
|
|
|
|
+
|
|
|
|
+# sensord service wrapper
|
|
|
|
+install -pm 755 %{SOURCE6} %{buildroot}%{_libexecdir}/%{name}/sensord-service-wrapper
|
|
|
|
+%else
|
|
|
|
+mkdir -p %{buildroot}%{_initdir}
|
|
|
|
+install -m755 prog/init/lm_sensors.init %{buildroot}%{_initdir}/lm_sensors
|
|
|
|
+%endif
|
|
|
|
|
|
# remove unuse files
|
|
# remove unuse files
|
|
-rm -f $RPM_BUILD_ROOT/%{_libdir}/*.a
|
|
+rm -f %{buildroot}/%{_libdir}/*.a
|
|
|
|
+
|
|
|
|
|
|
%clean
|
|
%clean
|
|
-rm -rf $RPM_BUILD_ROOT
|
|
+rm -rf %{buildroot}
|
|
|
|
+
|
|
|
|
|
|
%post
|
|
%post
|
|
|
|
+%if %{with systemd}
|
|
|
|
+%systemd_post lm_sensors.service
|
|
|
|
+%else
|
|
if [ "$1" = 1 ] ; then
|
|
if [ "$1" = 1 ] ; then
|
|
/sbin/chkconfig --add lm_sensors
|
|
/sbin/chkconfig --add lm_sensors
|
|
fi
|
|
fi
|
|
%{_initdir}/lm_sensors condrestart
|
|
%{_initdir}/lm_sensors condrestart
|
|
|
|
+%endif
|
|
|
|
|
|
%preun
|
|
%preun
|
|
|
|
+%if %{with systemd}
|
|
|
|
+%systemd_preun lm_sensors.service
|
|
|
|
+%else
|
|
if [ "$1" = 0 ] ; then
|
|
if [ "$1" = 0 ] ; then
|
|
%{_initdir}/lm_sensors stop > /dev/null 2>&1
|
|
%{_initdir}/lm_sensors stop > /dev/null 2>&1
|
|
/sbin/chkconfig --del lm_sensors
|
|
/sbin/chkconfig --del lm_sensors
|
|
fi
|
|
fi
|
|
|
|
+%endif
|
|
|
|
+
|
|
|
|
+%if %{with systemd}
|
|
|
|
+%postun
|
|
|
|
+%systemd_postun_with_restart lm_sensors.service
|
|
|
|
|
|
-%post libs -p /sbin/ldconfig
|
|
+%post sensord
|
|
|
|
+%systemd_post sensord.service
|
|
|
|
|
|
-%postun libs -p /sbin/ldconfig
|
|
+%preun sensord
|
|
|
|
+%systemd_preun sensord.service
|
|
|
|
+
|
|
|
|
+%postun sensord
|
|
|
|
+%systemd_postun_with_restart sensord.service
|
|
|
|
+%endif
|
|
|
|
|
|
|
|
|
|
%files
|
|
%files
|
|
@@ -123,19 +207,22 @@ fi
|
|
%dir %{_sysconfdir}/sensors.d
|
|
%dir %{_sysconfdir}/sensors.d
|
|
%config(noreplace) %{_sysconfdir}/sensors3.conf
|
|
%config(noreplace) %{_sysconfdir}/sensors3.conf
|
|
%config(noreplace) %{_sysconfdir}/sysconfig/lm_sensors
|
|
%config(noreplace) %{_sysconfdir}/sysconfig/lm_sensors
|
|
|
|
+%{_bindir}/*
|
|
|
|
+%{_sbindir}/*
|
|
|
|
+%if %{with systemd}
|
|
|
|
+%dir %{_libexecdir}/%{name}
|
|
|
|
+%{_libexecdir}/%{name}/lm_sensors-modprobe*wrapper
|
|
|
|
+%{_libexecdir}/%{name}/lm_sensors-wrapper
|
|
|
|
+%{_unitdir}/lm_sensors.service
|
|
|
|
+%{_unitdir}/fancontrol.service
|
|
|
|
+%else
|
|
%config %{_initdir}/lm_sensors
|
|
%config %{_initdir}/lm_sensors
|
|
-%{_bindir}/sensors
|
|
|
|
-%{_bindir}/sensors-conf-convert
|
|
|
|
-%{_sbindir}/fancontrol
|
|
|
|
-%ifarch %{ix86} x86_64
|
|
|
|
-%{_sbindir}/isadump
|
|
|
|
-%{_sbindir}/isaset
|
|
|
|
%endif
|
|
%endif
|
|
-%{_sbindir}/pwmconfig
|
|
|
|
-%{_sbindir}/sensors-detect
|
|
|
|
%{_mandir}/man1/*
|
|
%{_mandir}/man1/*
|
|
%{_mandir}/man5/*
|
|
%{_mandir}/man5/*
|
|
%{_mandir}/man8/*
|
|
%{_mandir}/man8/*
|
|
|
|
+%exclude %{_sbindir}/sensord
|
|
|
|
+%exclude %{_mandir}/man8/sensord.8.gz
|
|
|
|
|
|
%files libs
|
|
%files libs
|
|
%{_libdir}/lib*.so.*
|
|
%{_libdir}/lib*.so.*
|
|
@@ -145,8 +232,22 @@ fi
|
|
%{_libdir}/lib*.so
|
|
%{_libdir}/lib*.so
|
|
%{_mandir}/man3/*
|
|
%{_mandir}/man3/*
|
|
|
|
|
|
|
|
+%if %{with systemd}
|
|
|
|
+%files sensord
|
|
|
|
+
|
|
|
|
+%doc prog/sensord/README
|
|
|
|
+%{_sbindir}/sensord
|
|
|
|
+%{_mandir}/man8/sensord.8.gz
|
|
|
|
+%config(noreplace) %{_sysconfdir}/sysconfig/sensord
|
|
|
|
+%{_unitdir}/sensord.service
|
|
|
|
+%{_libexecdir}/%{name}/sensord-service-wrapper
|
|
|
|
+%endif
|
|
|
|
+
|
|
|
|
|
|
%changelog
|
|
%changelog
|
|
|
|
+* Mon May 29 2023 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 3.6.0-1
|
|
|
|
+- updated to 3.6.0.
|
|
|
|
+
|
|
* Fri May 10 2019 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 3.5.0-1
|
|
* Fri May 10 2019 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 3.5.0-1
|
|
- updated to 3.5.0.
|
|
- updated to 3.5.0.
|
|
|
|
|