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