File zcfan.spec of Package zcfan

#
# spec file for package zcfan
#
# Copyright (c) 2023 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.

# Please submit bugfixes or comments via https://bugs.opensuse.org/
#


Name:           zcfan
Version:        1.2.1
Release:        0
Summary:        Zero-configuration fan control daemon for ThinkPads
License:        MIT
URL:            https://github.com/cdown/zcfan
Source:         https://github.com/cdown/zcfan/archive/refs/tags/%{version}.tar.gz#/%{name}_%{version}.tar.gz
BuildRequires:  gcc-c++
BuildRequires:  make

%description

Zero-configuration fan control daemon for ThinkPads

Features:
 - Extremely small (~250 lines), simple, and easy to understand code
 - Sensible out of the box, configuration is optional (see "usage" in the documentation)
 - Strong focus on stopping the fan as soon as safe to do so, without inducing throttling
 - Automatic temperature- and time-based hysteresis: no bouncing between fan levels
 - Watchdog support
 - Minimal resource usage
 - No dependencies

%prep
%autosetup

%build
%make_build

%install
%make_install  DESTDIR=%{buildroot} prefix=%{_prefix}

%post
%service_add_post %{name}.service

%preun
%service_del_preun %{name}.service

%postun
%service_del_postun %{name}.service

%files
%license LICENSE
%doc README.md
%{_bindir}/%{name}
%{_mandir}/man1/%{name}.1*
%{_unitdir}/%{name}.service

%changelog

openSUSE Build Service is sponsored by