-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathg810-led.spec
89 lines (64 loc) · 2.01 KB
/
g810-led.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
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
Name: g810-led
Summary: Linux led controller for Logitech Keyboards
Version: 0.4.2
Release: 1%{?dist}
License: GPLv3
URL: https://github.com/MatMoul/g810-led
Source0: https://github.com/MatMoul/%{name}/archive/v%{version}.tar.gz
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
%{?systemd_requires}
BuildRequires: systemd
BuildRequires: make
BuildRequires: gcc-c++
BuildRequires: hidapi-devel
%description
Linux led controller for Logitech G213, G410, G413, G512, G513, G610, G810, G910
and GPRO Keyboards.
%prep
%setup -q
%build
make debug
%install
rm -rf $RPM_BUILD_ROOT
install -m 755 -d \
%{buildroot}%{_bindir} \
%{buildroot}%{_sysconfdir}/%{name}/samples \
%{buildroot}%{_udevrulesdir} \
%{buildroot}%{_unitdir}
install -p -m 755 bin/%{name} %{buildroot}%{_bindir}
for alias in 213 410 413 512 513 610 910 pro; do
ln -s %{name} "%{buildroot}%{_bindir}/g${alias}-led"
done
install -p -m 644 sample_profiles/* %{buildroot}%{_sysconfdir}/%{name}/samples
install -p -m 644 udev/%{name}.rules %{buildroot}%{_udevrulesdir}
install -p -D -m 0644 systemd/%{name}-reboot.service %{buildroot}%{_unitdir}
%post
%systemd_post %{name}-reboot.service
%preun
%systemd_preun %{name}-reboot.service
%postun
%systemd_postun %{name}-reboot.service
%clean
rm -rf $RPM_BUILD_ROOT
%files
%defattr(-,root,root,-)
%doc README.md LICENSE INSTALL.md
%{_bindir}/g???-led
%{_udevrulesdir}/%{name}.rules
%{_unitdir}/%{name}-reboot.service
%config(noreplace) %{_sysconfdir}/%{name}
%changelog
* Thu May 21 2020 Lars Kiesow <[email protected]> - 0.4.2-1
- Update to 0.4.2
* Thu May 07 2020 Lars Kiesow <[email protected]> - 0.4.1-1
- Update to 0.4.1
* Wed Apr 29 2020 Lars Kiesow <[email protected]> - 0.4.0-1
- Update to 0.4.0
* Sun Sep 22 2019 Lars Kiesow <[email protected]> - 0.3.9-1
- Update to 0.3.9
* Thu Aug 29 2019 Lars Kiesow <[email protected]> - 0.3.8-1
- Update to 0.3.8
* Wed Aug 21 2019 Lars Kiesow <[email protected]> - 0.3.7-1
- Update to 0.3.7
* Wed Oct 31 2018 Lars Kiesow <[email protected]> - 0.2.8-1
- Initial packaging