]> git.pld-linux.org Git - packages/thinkfan.git/blame - thinkfan.spec
up to 1.3.1
[packages/thinkfan.git] / thinkfan.spec
CommitLineData
4c854604 1Summary: ThinkPad fan control program
e3fa13dc 2Summary(pl.UTF-8): Program do sterowania wiatraczkiem w ThinkPadach
4c854604 3Name: thinkfan
9be8a9cf 4Version: 1.3.1
4c854604 5Release: 1
e3fa13dc
JB
6License: GPL v3+
7Group: Applications/System
9be8a9cf
AZ
8#Source0Download: https://github.com/vmatare/thinkfan/releases
9Source0: https://github.com/vmatare/thinkfan/archive/refs/tags/%{version}.tar.gz
10# Source0-md5: 8f7cdec0a524ed99fe6836f95d749da1
4c854604 11Source1: %{name}.init
9be8a9cf 12URL: https://github.com/vmatare/thinkfan
afaf75d5 13BuildRequires: cmake >= 2.6
708da53e 14BuildRequires: libatasmart-devel
09bd32e7 15BuildRequires: rpmbuild(macros) >= 1.605
e3fa13dc 16BuildRequires: sed >= 4.0
4c854604
AM
17BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
18
19%description
5f5f68ff
ER
20A minimalist fan control program. Supports any kind of system via the
21sysfs hwmon interface (/sys/class/hwmon). It is designed to eat as
22little CPU power as possible. The development was inspired by the
23excellent work people have done on thinkwiki.org.
4c854604 24
e3fa13dc
JB
25%description -l pl.UTF-8
26Minimalistyczny program do sterowania wiatraczkiem. Obsługuje dowolny
27system poprzez interfejs sysfs hwmon (/sys/class/hwmon). Został tak
28zaprojektowany, aby obciążać procesor w najmniejszym możliwym stopniu.
29Stworzenie tego narzędzia zostało zainspirowane wspaniałą pracą
30wykonaną przez ludzi na thinkwiki.org.
31
4c854604 32%prep
9be8a9cf 33%setup -q
4c854604
AM
34
35%build
f4d0b43c
AM
36install -d build
37cd build
09bd32e7 38%cmake \
708da53e 39 ..
4c854604 40
4c854604
AM
41%install
42rm -rf $RPM_BUILD_ROOT
9be8a9cf
AZ
43install -d $RPM_BUILD_ROOT/etc/rc.d/init.d \
44 $RPM_BUILD_ROOT{%{systemdunitdir},/etc/systemd/system}
45
f4d0b43c
AM
46
47%{__make} -C build install \
48 DESTDIR=$RPM_BUILD_ROOT
4c854604 49
5f5f68ff 50install -p %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/%{name}
9be8a9cf
AZ
51cp -p examples/thinkfan.yaml $RPM_BUILD_ROOT%{_sysconfdir}/thinkfan.yaml
52cp -p build/rcscripts/systemd/%{name}.service $RPM_BUILD_ROOT%{systemdunitdir}
4c854604
AM
53
54%clean
55rm -rf $RPM_BUILD_ROOT
56
57%post
58/sbin/chkconfig --add thinkfan
5f5f68ff 59%service thinkfan restart
9be8a9cf 60%systemd_post thinkfan.service
4c854604
AM
61
62%preun
63if [ "$1" = "0" ]; then
5f5f68ff
ER
64 /sbin/chkconfig --del thinkfan
65 %service thinkfan stop
4c854604 66fi
9be8a9cf
AZ
67%systemd_preun thinkfan.service
68
69%postun
70%systemd_reload
71
72%triggerpostun -- %{name} < 5.42-5
73%systemd_trigger smartd.service
4c854604
AM
74
75%files
76%defattr(644,root,root,755)
9be8a9cf 77%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}.yaml
5f5f68ff 78%attr(754,root,root) /etc/rc.d/init.d/%{name}
4c854604 79%attr(755,root,root) %{_sbindir}/thinkfan
9be8a9cf 80%doc COPYING README.md examples/thinkfan.yaml
4c854604 81%{_mandir}/man1/thinkfan.1*
9be8a9cf 82%{systemdunitdir}/%{name}.service
This page took 0.575647 seconds and 4 git commands to generate.