]> git.pld-linux.org Git - packages/thinkfan.git/blobdiff - thinkfan.spec
up to 1.3.1
[packages/thinkfan.git] / thinkfan.spec
index 216e623070c0d82f545f879c8e104c0646fbd872..022ee195c8bedb39b8c41abdacc1ff2688451850 100644 (file)
@@ -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
This page took 0.252519 seconds and 4 git commands to generate.