diff --git a/acpid.changes b/acpid.changes index 2da9764..40c6eec 100644 --- a/acpid.changes +++ b/acpid.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Sat Dec 31 05:49:05 UTC 2011 - crrodriguez@opensuse.org + +- Put acpid back in %{_sbindir} /usr is nowdays mounted by the + initrd + ------------------------------------------------------------------- Tue Dec 27 10:55:50 UTC 2011 - idonmez@suse.com diff --git a/acpid.service b/acpid.service index ede53e8..006c132 100644 --- a/acpid.service +++ b/acpid.service @@ -11,7 +11,7 @@ After=syslog.target [Service] Type=forking -ExecStart=/sbin/acpid +ExecStart=/usr/sbin/acpid [Install] WantedBy=multi-user.target diff --git a/acpid.spec b/acpid.spec index 815749c..db5ea8d 100644 --- a/acpid.spec +++ b/acpid.spec @@ -16,13 +16,13 @@ # + Name: acpid -Url: http://tedfelix.com/linux/acpid-netlink.html Version: 2.0.13 Release: 0 -PreReq: %insserv_prereq %fillup_prereq -Summary: Executes Actions at ACPI Events License: GPL-2.0+ +Summary: Executes Actions at ACPI Events +Url: http://tedfelix.com/linux/acpid-netlink.html Group: System/Daemons Source: http://tedfelix.com//linux/%{name}-%{version}.tar.gz Source2: rcacpid @@ -33,10 +33,14 @@ Source9: events.thinkpad Source6: thinkpad_handler Source7: power_button Source8: acpid.service +# PATCH-MISSING-TAG -- See http://wiki.opensuse.org/openSUSE:Packaging_Patches_guidelines Patch1: acpid-makefile.patch +# PATCH-MISSING-TAG -- See http://wiki.opensuse.org/openSUSE:Packaging_Patches_guidelines Patch2: acpid-wrong-memset.patch -BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildRequires: systemd +Requires(pre): %fillup_prereq +Requires(pre): %insserv_prereq +BuildRoot: %{_tmppath}/%{name}-%{version}-build ExclusiveArch: %ix86 x86_64 ia64 %systemd_requires @@ -53,30 +57,30 @@ Configure it in /etc/sysconfig/powermanagement. %patch1 %patch2 -p1 -cp %{S:2} %{S:3} %{S:4} %{S:5} %{S:6} %{S:7} %{S:9} . +cp %{SOURCE2} %{SOURCE3} %{SOURCE4} %{SOURCE5} %{SOURCE6} %{SOURCE7} %{SOURCE9} . %build export LDFLAGS="-Wl,-z,relro,-z,now" -make OPT="$RPM_OPT_FLAGS" %{?_smp_mflags} +make OPT="%{optflags}" %{?_smp_mflags} %install -make install DESTDIR=$RPM_BUILD_ROOT SBINDIR=/sbin -install -Dm 744 rcacpid %{buildroot}/etc/init.d/acpid -install -Dm 644 thinkpad_acpi.modprobe %{buildroot}/etc/modprobe.d/50-thinkpad_acpi.conf -install -Dm 744 thinkpad_handler %{buildroot}/usr/lib/acpid/thinkpad_handler -install -Dm 744 power_button %{buildroot}/usr/lib/acpid/power_button -mkdir -p %{buildroot}/usr/sbin -ln -sf ../../etc/init.d/acpid %{buildroot}/usr/sbin/rcacpid -install -Dm 644 events.power_button %{buildroot}/etc/acpi/events/power_button -install -Dm 644 events.thinkpad %{buildroot}/etc/acpi/events/thinkpad -mkdir -p $RPM_BUILD_ROOT/%{_unitdir} -install -m 644 %{SOURCE8} $RPM_BUILD_ROOT/%{_unitdir} +make install DESTDIR=%{buildroot} SBINDIR=%{_sbindir} +install -Dm 744 rcacpid %{buildroot}%{_initddir}/acpid +install -Dm 644 thinkpad_acpi.modprobe %{buildroot}%{_sysconfdir}/modprobe.d/50-thinkpad_acpi.conf +install -Dm 744 thinkpad_handler %{buildroot}%{_prefix}/lib/acpid/thinkpad_handler +install -Dm 744 power_button %{buildroot}%{_prefix}/lib/acpid/power_button +mkdir -p %{buildroot}%{_prefix}/sbin +ln -sf ../../etc/init.d/acpid %{buildroot}%{_sbindir}/rcacpid +install -Dm 644 events.power_button %{buildroot}%{_sysconfdir}/acpi/events/power_button +install -Dm 644 events.thinkpad %{buildroot}%{_sysconfdir}/acpi/events/thinkpad +mkdir -p %{buildroot}/%{_unitdir} +install -m 644 %{SOURCE8} %{buildroot}/%{_unitdir} # for the rpmlint fascists -mv samples examples +mv samples examples # keep the logfile -install -dm 755 %buildroot%_var/log -touch %buildroot%_var/log/acpid +install -dm 755 %{buildroot}%{_localstatedir}/log +touch %{buildroot}%{_localstatedir}/log/acpid %pre %service_add_pre acpid.service @@ -96,21 +100,21 @@ touch %buildroot%_var/log/acpid %files %defattr(-,root,root) -%dir /etc/modprobe.d -%dir /etc/acpi -%dir /etc/acpi/events -/etc/acpi/events/thinkpad -/etc/acpi/events/power_button -/usr/lib/acpid -/etc/init.d/acpid -/etc/modprobe.d/50-thinkpad_acpi.conf +%dir %{_sysconfdir}/modprobe.d +%dir %{_sysconfdir}/acpi +%dir %{_sysconfdir}/acpi/events +%{_sysconfdir}/acpi/events/thinkpad +%{_sysconfdir}/acpi/events/power_button +%{_prefix}/lib/acpid +%{_sysconfdir}/init.d/acpid +%{_sysconfdir}/modprobe.d/50-thinkpad_acpi.conf %_unitdir/%{name}.service -/usr/sbin/rcacpid -/sbin/acpid -/usr/bin/acpi_listen +%{_sbindir}/rcacpid +%{_sbindir}/acpid +%{_bindir}/acpi_listen %doc README.SuSE README Changelog examples -/usr/share/man/man8/acpid.8.gz -/usr/share/man/man8/acpi_listen.8.gz -%ghost %config(noreplace,missingok) %_var/log/acpid +%{_mandir}/man8/acpid.8.gz +%{_mandir}/man8/acpi_listen.8.gz +%ghost %config(noreplace,missingok) %{_localstatedir}/log/acpid %changelog diff --git a/rcacpid b/rcacpid index 9e3ac1e..fea4a9e 100644 --- a/rcacpid +++ b/rcacpid @@ -27,7 +27,7 @@ ### END INIT INFO # Check for missing binaries (stale symlinks should not happen) -ACPID_BIN=/sbin/acpid +ACPID_BIN=/usr/sbin/acpid test -x $ACPID_BIN || exit 5 # Shell functions sourced from /etc/rc.status: