commit 06f76f0fff090a94009aed178695cd8b3fa15ae9 Author: Sergey Zhemoytel Date: Sun Nov 13 00:59:16 2022 +0300 Imported from SRPM diff --git a/.abf.yml b/.abf.yml new file mode 100644 index 0000000..15a9123 --- /dev/null +++ b/.abf.yml @@ -0,0 +1,2 @@ +sources: + mbpfan-2.3.0.tar.gz: e0201217d2afc2235b6f519727a81f1157b28dda diff --git a/mbpfan.spec b/mbpfan.spec new file mode 100644 index 0000000..fc37ba8 --- /dev/null +++ b/mbpfan.spec @@ -0,0 +1,59 @@ +Name: mbpfan +Version: 2.3.0 +Release: 1 +Summary: Control fan speed on all MacBook/MacBook Pros +URL: https://ineed.coffee/projects/mbpfan +Source0: https://github.com/linux-on-mac/mbpfan/archive/v%{version}/%{name}-%{version}.tar.gz +License: GPLv3 +Group: Development/Other +BuildRequires: systemd + +Requires(post): systemd +Requires(preun): systemd +Requires(postun): systemd + +%description +mbpfan is a daemon that uses input from coretemp module and +sets the fan speed using the applesmc module. This enhanced +version assumes any number of processors and fans (max. 10). + +It only uses the temperatures from the processors as input. +It requires coretemp and applesmc kernel modules to be loaded. +It requires root use +It daemonizes or stays in foreground +Verbose mode for both syslog and stdout +Users can configure it using the file /etc/mbpfan.conf + + +%prep +%setup -q + +%build +%make + +%install +%makeinstall_std + +# install unit +install -Dm0644 %{name}.service %{buildroot}%{_unitdir}/%{name}.service + + +%post +%systemd_post %{name}.service + +%preun +%systemd_preun %{name}.servie + +%postun +%systemd_postun_with_restart %{name}.service + + +%files +%doc README.md COPYING +%{_sbindir}/%{name} +%{_sysconfdir}/mbpfan.conf +%{_mandir}/man8/%{name}.* +%{_unitdir}/%{name}.service + + +