-
Notifications
You must be signed in to change notification settings - Fork 15
/
smfc.spec
70 lines (53 loc) · 1.55 KB
/
smfc.spec
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
%global forgeurl https://github.com/petersulyok/smfc
Version: 3.5.0
%forgemeta
Name: smfc
Release: 1%{?dist}
Summary: Super Micro Fan Control
License: GPL-3.0-or-later
URL: %{forgeurl}
Source: %{forgesource}
Requires: systemd
Requires: python3 >= 3.7
Requires: bash
Requires: ipmitool
Recommends: smartmontools
Recommends: hddtemp
BuildRequires: systemd
BuildRequires: systemd-rpm-macros
BuildArch: noarch
%description
systemd service to control fans in CPU and HD zones with the help of IPMI on Super Micro X10-X13 (and some X9) motherboards.
%prep
%forgesetup
%build
# not needed, just copying files
%install
mkdir -p %{buildroot}/opt/smfc
install -m 755 src/smfc.py %{buildroot}/opt/smfc/smfc.py
install -m 644 src/smfc.conf %{buildroot}/opt/smfc/smfc.conf
mkdir -p %{buildroot}/%{_sysconfdir}/default
install -m 644 src/smfc %{buildroot}/%{_sysconfdir}/default/smfc
mkdir -p %{buildroot}/%{_unitdir}
install -m 644 src/smfc.service %{buildroot}/%{_unitdir}/smfc.service
mkdir -p %{buildroot}/%{_presetdir}
install -m 644 src/smfc.preset %{buildroot}/%{_presetdir}/90-smfc.preset
%check
# not needed, just copying files
%files
/opt/smfc/smfc.py
%config(noreplace) /opt/smfc/smfc.conf
%config(noreplace) /etc/default/smfc
/usr/lib/systemd/system/smfc.service
/usr/lib/systemd/system-preset/90-smfc.preset
%doc README.md
%license LICENSE
%post
%systemd_post smfc.service
%preun
%systemd_preun smfc.service
%postun
%systemd_postun_with_restart smfc.service
%changelog
* Wed Apr 03 2024 Ewout van Mansom <ewout@vanmansom.name> 3.5.0-1
- new package built with tito