-
Notifications
You must be signed in to change notification settings - Fork 2
/
y50-subwoofer.spec
64 lines (44 loc) · 1.64 KB
/
y50-subwoofer.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: y50-subwoofer
Version: 0.1.7
Release: 2%{?dist}
Summary: Daemon for adjusting Lenovo Y50 subwoofer
License: GPLv2+
URL: https://github.com/polter-rnd/y50-subwoofer
Source0: https://github.com/polter-rnd/y50-subwoofer/archive/v%{version}.zip
BuildRequires: gcc
BuildRequires: alsa-lib-devel
BuildRequires: systemd-units
%description
Small daemon that automatically turns Lenovo Y50 subwoofer on/off
and sets it volume according to the master channel.
%prep
%autosetup
%build
make CFLAGS="%{optflags}"
%install
rm -rf $RPM_BUILD_ROOT
%{__install} -Dm 755 %{_builddir}/%{name}-%{version}/%{name} $RPM_BUILD_ROOT/%{_bindir}/%{name}
%{__install} -Dm 644 %{_builddir}/%{name}-%{version}/%{name}.service $RPM_BUILD_ROOT/%{_unitdir}/%{name}.service
%{__install} -Dm 644 %{_builddir}/%{name}-%{version}/%{name}-resume.service $RPM_BUILD_ROOT/%{_unitdir}/%{name}-resume.service
%post
/bin/systemctl enable %{name}.service
/bin/systemctl enable %{name}-resume.service
/bin/systemctl start %{name}.service
%preun
/bin/systemctl stop %{name}.service
/bin/systemctl disable %{name}-resume.service
/bin/systemctl disable %{name}.service
%files
%license LICENSE
%doc README.md
%{_bindir}/%{name}
%{_unitdir}/%{name}.service
%{_unitdir}/%{name}-resume.service
%changelog
* Thu Dec 5 2018 Paul Artsishevsky <[email protected]> 0.1.5-2
- Updated to Fedora 29
* Mon Jan 2 2017 Paul Artsishevsky <[email protected]> 0.1.5-1
- Updated to Fedora 25
- Added resume service to restart y50-subwoofer on wake up
* Sun Jul 17 2016 Paul Artsishevsky <[email protected]> 0.1.3-1
- Initial version of the package