%define _modulesloaddir /lib/modules-load.d Name: mbpfan Version: 2.4.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 Source1000: %{name}.rpmlintrc 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 %{_modulesloaddir}/mbpfan.depend.conf