2007-01-15 23:50:50 +01:00
|
|
|
#
|
2011-03-10 12:50:24 +01:00
|
|
|
# spec file for package acpid
|
2007-01-15 23:50:50 +01:00
|
|
|
#
|
2014-02-15 12:42:38 +01:00
|
|
|
# Copyright (c) 2014 SUSE LINUX Products GmbH, Nuernberg, Germany.
|
2007-01-15 23:50:50 +01:00
|
|
|
#
|
2008-08-18 18:16:56 +02:00
|
|
|
# All modifications and additions to the file contributed by third parties
|
|
|
|
# remain the property of their copyright owners, unless otherwise agreed
|
|
|
|
# upon. The license for this file, and modifications and additions to the
|
|
|
|
# file, is the same license as for the pristine package itself (unless the
|
|
|
|
# license for the pristine package is not an Open Source License, in which
|
|
|
|
# case the license is the MIT License). An "Open Source License" is a
|
|
|
|
# license that conforms to the Open Source Definition (Version 1.9)
|
|
|
|
# published by the Open Source Initiative.
|
|
|
|
|
2007-01-15 23:50:50 +01:00
|
|
|
# Please submit bugfixes or comments via http://bugs.opensuse.org/
|
|
|
|
#
|
|
|
|
|
|
|
|
|
|
|
|
Name: acpid
|
2014-12-18 15:00:16 +01:00
|
|
|
Version: 2.0.23
|
2011-12-27 14:04:31 +01:00
|
|
|
Release: 0
|
2012-01-05 04:59:48 +01:00
|
|
|
Summary: Executes Actions at ACPI Events
|
2012-08-22 16:35:29 +02:00
|
|
|
License: GPL-2.0+
|
2011-12-27 14:04:31 +01:00
|
|
|
Group: System/Daemons
|
2012-08-22 16:35:29 +02:00
|
|
|
Url: http://tedfelix.com/linux/acpid-netlink.html
|
2013-08-02 13:57:36 +02:00
|
|
|
Source: http://downloads.sourceforge.net/project/acpid2/%{name}-%{version}.tar.xz
|
2013-12-13 10:41:27 +01:00
|
|
|
Source3: README.SUSE
|
2008-09-01 18:57:51 +02:00
|
|
|
Source5: events.power_button
|
2008-06-23 02:06:29 +02:00
|
|
|
Source6: thinkpad_handler
|
2008-08-18 18:16:56 +02:00
|
|
|
Source7: power_button
|
2010-10-03 22:43:20 +02:00
|
|
|
Source8: acpid.service
|
2013-01-15 16:29:52 +01:00
|
|
|
Source9: events.thinkpad
|
|
|
|
Source10: events.sleep_button
|
|
|
|
Source11: sleep_button
|
|
|
|
|
2012-01-05 04:59:48 +01:00
|
|
|
# PATCH-MISSING-TAG -- See http://wiki.opensuse.org/openSUSE:Packaging_Patches_guidelines
|
2010-10-03 22:43:20 +02:00
|
|
|
Patch1: acpid-makefile.patch
|
2013-12-13 10:41:27 +01:00
|
|
|
BuildRequires: systemd-rpm-macros
|
2012-09-24 16:40:47 +02:00
|
|
|
BuildRequires: xz
|
2012-01-05 04:59:48 +01:00
|
|
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
2008-02-28 01:48:08 +01:00
|
|
|
ExclusiveArch: %ix86 x86_64 ia64
|
2011-08-25 07:22:02 +02:00
|
|
|
%systemd_requires
|
2007-01-15 23:50:50 +01:00
|
|
|
|
|
|
|
%description
|
|
|
|
ACPID is a completely flexible, totally extensible daemon for
|
|
|
|
delivering ACPI events. It listens to a file (/proc/acpi/event) and,
|
|
|
|
when an event occurs, executes programs to handle the event. The start
|
|
|
|
script loads all needed modules.
|
|
|
|
|
|
|
|
%prep
|
2010-10-03 22:43:20 +02:00
|
|
|
%setup -q
|
2011-12-27 14:04:31 +01:00
|
|
|
%patch1
|
|
|
|
|
2013-11-21 10:46:50 +01:00
|
|
|
cp %{SOURCE3} %{SOURCE5} %{SOURCE6} %{SOURCE7} %{SOURCE9} %{SOURCE10} %{SOURCE11} .
|
2007-01-15 23:50:50 +01:00
|
|
|
|
|
|
|
%build
|
2010-11-09 20:11:38 +01:00
|
|
|
export LDFLAGS="-Wl,-z,relro,-z,now"
|
2012-03-19 11:24:53 +01:00
|
|
|
%configure
|
2012-09-24 16:40:47 +02:00
|
|
|
make %{?_smp_mflags}
|
2007-01-15 23:50:50 +01:00
|
|
|
|
|
|
|
%install
|
2012-01-05 04:59:48 +01:00
|
|
|
make install DESTDIR=%{buildroot} SBINDIR=%{_sbindir}
|
|
|
|
install -Dm 744 thinkpad_handler %{buildroot}%{_prefix}/lib/acpid/thinkpad_handler
|
|
|
|
install -Dm 644 events.thinkpad %{buildroot}%{_sysconfdir}/acpi/events/thinkpad
|
|
|
|
mkdir -p %{buildroot}/%{_unitdir}
|
|
|
|
install -m 644 %{SOURCE8} %{buildroot}/%{_unitdir}
|
2014-08-11 10:31:13 +02:00
|
|
|
ln -sf %{_sbindir}/service %{buildroot}%{_sbindir}/rcacpid
|
2010-10-03 22:43:20 +02:00
|
|
|
|
2013-07-04 17:22:11 +02:00
|
|
|
# formerly installed, but no longer useful with systemd. Keep as documentation.
|
|
|
|
cp -p events.power_button events.sleep_button power_button sleep_button samples/
|
2007-07-05 00:32:31 +02:00
|
|
|
# for the rpmlint fascists
|
2012-01-05 04:59:48 +01:00
|
|
|
mv samples examples
|
2007-06-05 00:44:31 +02:00
|
|
|
# keep the logfile
|
2012-01-05 04:59:48 +01:00
|
|
|
install -dm 755 %{buildroot}%{_localstatedir}/log
|
|
|
|
touch %{buildroot}%{_localstatedir}/log/acpid
|
2007-06-05 00:44:31 +02:00
|
|
|
|
2011-08-24 22:35:10 +02:00
|
|
|
%pre
|
2011-09-27 20:36:59 +02:00
|
|
|
%service_add_pre acpid.service
|
2011-08-24 22:35:10 +02:00
|
|
|
|
2007-01-15 23:50:50 +01:00
|
|
|
%post
|
2011-09-27 20:36:59 +02:00
|
|
|
%service_add_post acpid.service
|
2007-01-15 23:50:50 +01:00
|
|
|
|
|
|
|
%postun
|
2011-08-24 22:35:10 +02:00
|
|
|
%service_del_postun acpid.service
|
2007-01-15 23:50:50 +01:00
|
|
|
|
2011-08-24 22:35:10 +02:00
|
|
|
%preun
|
|
|
|
%service_del_preun acpid.service
|
2007-01-15 23:50:50 +01:00
|
|
|
|
|
|
|
%files
|
|
|
|
%defattr(-,root,root)
|
2012-01-05 04:59:48 +01:00
|
|
|
%dir %{_sysconfdir}/acpi
|
|
|
|
%dir %{_sysconfdir}/acpi/events
|
|
|
|
%{_sysconfdir}/acpi/events/thinkpad
|
|
|
|
%{_prefix}/lib/acpid
|
2011-08-24 22:35:10 +02:00
|
|
|
%_unitdir/%{name}.service
|
2012-01-05 04:59:48 +01:00
|
|
|
%{_sbindir}/rcacpid
|
|
|
|
%{_sbindir}/acpid
|
2012-03-19 11:24:53 +01:00
|
|
|
%{_sbindir}/kacpimon
|
2012-01-05 04:59:48 +01:00
|
|
|
%{_bindir}/acpi_listen
|
2013-12-13 10:41:27 +01:00
|
|
|
%doc README.SUSE README Changelog examples
|
2012-01-05 04:59:48 +01:00
|
|
|
%{_mandir}/man8/acpid.8.gz
|
|
|
|
%{_mandir}/man8/acpi_listen.8.gz
|
2012-03-19 11:24:53 +01:00
|
|
|
%{_mandir}/man8/kacpimon.8.gz
|
2012-01-05 04:59:48 +01:00
|
|
|
%ghost %config(noreplace,missingok) %{_localstatedir}/log/acpid
|
2007-01-15 23:50:50 +01:00
|
|
|
|
2007-03-29 15:28:12 +02:00
|
|
|
%changelog
|