diff --git a/acpid.changes b/acpid.changes index b2302ba..bce5e7d 100644 --- a/acpid.changes +++ b/acpid.changes @@ -1,3 +1,11 @@ +------------------------------------------------------------------- +Sun Apr 9 10:14:44 UTC 2023 - Stefan Seyfried + +- do not ship thinkpad_handler script or config, it's broken since + libexecdir changed and nobody noticed, most likely it's not doing + anything on recent thinkpads, put it into the examples instead +- fix file timestamps to not change with every rebuild + ------------------------------------------------------------------- Tue Nov 15 14:01:40 UTC 2022 - Dominique Leuenberger diff --git a/acpid.spec b/acpid.spec index b99d9ad..e465045 100644 --- a/acpid.spec +++ b/acpid.spec @@ -1,7 +1,7 @@ # # spec file for package acpid # -# Copyright (c) 2022 SUSE LLC +# Copyright (c) 2023 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -47,7 +47,15 @@ needed modules. %setup -q %patch1 -cp %{SOURCE3} %{SOURCE5} %{SOURCE6} %{SOURCE7} %{SOURCE9} %{SOURCE10} %{SOURCE11} . +cp -p %{SOURCE3} %{SOURCE5} %{SOURCE6} %{SOURCE7} %{SOURCE9} %{SOURCE10} %{SOURCE11} . +# libexecdir is different in factory that in 15.x +for i in events.*; do + if ! grep -q 'action=%{_libexecdir}' $i; then + sed -i.orig -e 's@action=/usr/lib/@action=%{_libexecdir}/@' $i + touch -r $i.orig $i + rm $i.orig + fi +done %build export CFLAGS="%{optflags}" @@ -57,14 +65,14 @@ export LDFLAGS="-Wl,-z,relro,-z,now" %install %make_install BINDIR=%{_sbindir} -install -Dm 744 thinkpad_handler %{buildroot}%{_libexecdir}/acpid/thinkpad_handler -install -Dm 644 events.thinkpad %{buildroot}%{_sysconfdir}/acpi/events/thinkpad +install -dm 755 %{buildroot}%{_libexecdir}/acpid/ +install -dm 755 %{buildroot}%{_sysconfdir}/acpi/events mkdir -p %{buildroot}/%{_unitdir} install -m 644 %{SOURCE8} %{buildroot}/%{_unitdir} ln -sf %{_sbindir}/service %{buildroot}%{_sbindir}/rcacpid # formerly installed, but no longer useful with systemd. Keep as documentation. -cp -p events.power_button events.sleep_button power_button sleep_button samples/ +cp -p events.power_button events.sleep_button events.thinkpad power_button sleep_button thinkpad_handler samples/ # for the rpmlint fascists mv samples examples # keep the logfile @@ -86,8 +94,7 @@ touch %{buildroot}%{_localstatedir}/log/acpid %files %dir %{_sysconfdir}/acpi %dir %{_sysconfdir}/acpi/events -%{_sysconfdir}/acpi/events/thinkpad -%{_libexecdir}/acpid +%dir %{_libexecdir}/acpid %{_unitdir}/%{name}.service %{_sbindir}/rcacpid %{_sbindir}/acpid