Browse Source

Move systemd service enabling to spec file

pull/1/head 0.2.0-alpha
Titouan Rigoudy 10 years ago
parent
commit
6d929443da
2 changed files with 13 additions and 3 deletions
  1. +0
    -1
      Makefile
  2. +13
    -2
      init-headphone.spec

+ 0
- 1
Makefile View File

@ -8,5 +8,4 @@ install:
install -Dm 755 init-headphone ${DESTDIR}/${SBINDIR}/init-headphone install -Dm 755 init-headphone ${DESTDIR}/${SBINDIR}/init-headphone
install -Dm 755 init-headphone.modules ${DESTDIR}/${SYSCONFIGDIR}/sysconfig/modules/init-headphone.modules install -Dm 755 init-headphone.modules ${DESTDIR}/${SYSCONFIGDIR}/sysconfig/modules/init-headphone.modules
install -Dm 755 init-headphone.service ${DESTDIR}/${UNITDIR}/init-headphone.service install -Dm 755 init-headphone.service ${DESTDIR}/${UNITDIR}/init-headphone.service
systemctl enable init-headphone

+ 13
- 2
init-headphone.spec View File

@ -11,14 +11,16 @@ BuildArch: noarch
BuildRequires: systemd BuildRequires: systemd
Requires: i2c-tools-python Requires: i2c-tools-python
Requires: systemd
Requires(post): systemd
Requires(preun): systemd
Requires(postun): systemd
%description %description
This script fixes a bug in Clevo W230SS-based laptops where the headphone jack This script fixes a bug in Clevo W230SS-based laptops where the headphone jack
would not work anymore after a resume from suspend. would not work anymore after a resume from suspend.
%prep %prep
%setup -qn %{name}-master
%setup -qn %{name}
%build %build
@ -28,6 +30,15 @@ would not work anymore after a resume from suspend.
%install %install
make install DESTDIR=%{buildroot} make install DESTDIR=%{buildroot}
%post
%systemd_post init-headphone.service
%preun
%systemd_preun init-headphone.service
%postun
%systemd_postun
%files %files
%{_sbindir}/init-headphone %{_sbindir}/init-headphone
%{_sysconfdir}/sysconfig/modules/init-headphone.modules %{_sysconfdir}/sysconfig/modules/init-headphone.modules


Loading…
Cancel
Save