[packages/thinkfan] up to 1.3.1
zawadaa
zawadaa at pld-linux.org
Fri Oct 28 15:09:11 CEST 2022
commit 9be8a9cf567bf532e5bb87299dce68918ef44575
Author: Andrzej Zawadzki <azawadzki at asist.pl>
Date: Fri Oct 28 15:09:04 2022 +0200
up to 1.3.1
thinkfan.spec | 32 ++++++++++++++++++++++----------
1 file changed, 22 insertions(+), 10 deletions(-)
---
diff --git a/thinkfan.spec b/thinkfan.spec
index 216e623..022ee19 100644
--- a/thinkfan.spec
+++ b/thinkfan.spec
@@ -1,14 +1,15 @@
Summary: ThinkPad fan control program
Summary(pl.UTF-8): Program do sterowania wiatraczkiem w ThinkPadach
Name: thinkfan
-Version: 0.9.2
+Version: 1.3.1
Release: 1
License: GPL v3+
Group: Applications/System
-Source0: http://downloads.sourceforge.net/thinkfan/%{name}-%{version}.tar.gz
-# Source0-md5: 4292633aebd61b91f04cd332c4d3e181
+#Source0Download: https://github.com/vmatare/thinkfan/releases
+Source0: https://github.com/vmatare/thinkfan/archive/refs/tags/%{version}.tar.gz
+# Source0-md5: 8f7cdec0a524ed99fe6836f95d749da1
Source1: %{name}.init
-URL: http://thinkfan.sourceforge.net/
+URL: https://github.com/vmatare/thinkfan
BuildRequires: cmake >= 2.6
BuildRequires: libatasmart-devel
BuildRequires: rpmbuild(macros) >= 1.605
@@ -29,24 +30,26 @@ Stworzenie tego narzędzia zostało zainspirowane wspaniałą pracą
wykonaną przez ludzi na thinkwiki.org.
%prep
-%setup -q -c
+%setup -q
%build
install -d build
cd build
%cmake \
- -DUSE_ATASMART=1 \
..
%install
rm -rf $RPM_BUILD_ROOT
-install -d $RPM_BUILD_ROOT/etc/rc.d/init.d
+install -d $RPM_BUILD_ROOT/etc/rc.d/init.d \
+ $RPM_BUILD_ROOT{%{systemdunitdir},/etc/systemd/system}
+
%{__make} -C build install \
DESTDIR=$RPM_BUILD_ROOT
install -p %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/%{name}
-cp -p examples/thinkfan.conf.simple $RPM_BUILD_ROOT%{_sysconfdir}/thinkfan.conf
+cp -p examples/thinkfan.yaml $RPM_BUILD_ROOT%{_sysconfdir}/thinkfan.yaml
+cp -p build/rcscripts/systemd/%{name}.service $RPM_BUILD_ROOT%{systemdunitdir}
%clean
rm -rf $RPM_BUILD_ROOT
@@ -54,17 +57,26 @@ rm -rf $RPM_BUILD_ROOT
%post
/sbin/chkconfig --add thinkfan
%service thinkfan restart
+%systemd_post thinkfan.service
%preun
if [ "$1" = "0" ]; then
/sbin/chkconfig --del thinkfan
%service thinkfan stop
fi
+%systemd_preun thinkfan.service
+
+%postun
+%systemd_reload
+
+%triggerpostun -- %{name} < 5.42-5
+%systemd_trigger smartd.service
%files
%defattr(644,root,root,755)
-%doc NEWS README examples/thinkfan.conf.*
-%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}.conf
+%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}.yaml
%attr(754,root,root) /etc/rc.d/init.d/%{name}
%attr(755,root,root) %{_sbindir}/thinkfan
+%doc COPYING README.md examples/thinkfan.yaml
%{_mandir}/man1/thinkfan.1*
+%{systemdunitdir}/%{name}.service
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/thinkfan.git/commitdiff/9be8a9cf567bf532e5bb87299dce68918ef44575
More information about the pld-cvs-commit
mailing list