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