forked from notaz/corsairmi
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcorsairmi.spec
64 lines (47 loc) · 1.6 KB
/
corsairmi.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
Name: corsairmi
Version: {{{ git_dir_version }}}
Release: 1%{?dist}
Summary: Minimal program for Linux to read monitoring information out of Corsair RMi and HXi series of PSUs
License: BSD-3-Clause
URL: https://github.com/KyleGospo/corsairmi
VCS: {{{ git_dir_vcs }}}
Source: {{{ git_dir_pack }}}
BuildRequires: make
BuildRequires: gcc
BuildRequires: systemd
Requires: corsairmi-udev
%description
Minimal program for Linux to read monitoring information out of Corsair RMi and HXi series of PSUs. Uses Linux HIDRAW interface. Tested on Corsair RM650i, RM750i and HX1000i.
%define debug_package %{nil}
%package udev
Summary: Udev rules for Logitech receivers
BuildArch: noarch
%description udev
This package contains udev rules which grant users permission to access corsair power supplies.
%prep
{{{ git_dir_setup_macro }}}
%build
%set_build_flags
%make_build
%install
mkdir -p %{buildroot}/%{_bindir}
mkdir -p %{buildroot}/%{_udevrulesdir}
install -m 0755 ./%{name} %{buildroot}/%{_bindir}/
install -m 644 -p 70-corsairmi.rules %{buildroot}/%{_udevrulesdir}/
%posttrans udev
# This is needed to apply permissions to existing devices when the package is
# installed.
# Skip triggering udevd when it is note accessible, e.g. containers or
# rpm-ostree-based systems.
if [ -S /run/udev/control ]; then
/usr/bin/udevadm trigger --subsystem-match=hidraw --action=add
fi
%files
%license LICENSE
%doc README.md
%{_bindir}/%{name}
%files udev
%license LICENSE
%_udevrulesdir/70-corsairmi.rules
%changelog
{{{ git_dir_changelog }}}