acpid/acpid.spec
OBS User autobuild 93a622d996 Accepting request 20798 from Base:System
Copy from Base:System/acpid based on submit request 20798 from user dirkmueller

OBS-URL: https://build.opensuse.org/request/show/20798
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/acpid?expand=0&rev=24
2009-09-22 19:50:40 +00:00

129 lines
3.7 KiB
RPMSpec

#
# spec file for package acpid (Version 1.0.10)
#
# Copyright (c) 2009 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# 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.
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
# norootforbuild
Name: acpid
Url: http://acpid.sourceforge.net/
Version: 1.0.10
Release: 3
%define acpi_version 0.09
License: GPL v2 or later
Group: System/Daemons
AutoReqProv: on
PreReq: %insserv_prereq %fillup_prereq
Summary: Executes Actions at ACPI Events
Source: %{name}-%{version}.tar.gz
Source1: acpi-%{acpi_version}.tar.bz2
Source2: rcacpid
Source3: README.SuSE
Source4: thinkpad_acpi.modprobe
Source5: events.power_button
Source9: events.thinkpad
Source6: thinkpad_handler
Source7: power_button
Patch1: acpi_%{acpi_version}.dif
BuildRoot: %{_tmppath}/%{name}-%{version}-build
ExclusiveArch: %ix86 x86_64 ia64
%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.
Configure it in /etc/sysconfig/powermanagement.
Authors:
--------
Andrew Grover <andrew.grover@intel.com>
Tim Hockin <thockin@sun.com>
Cajus Pollmeier <pollmeier@gonicus.de>
%prep
%setup -b 0 -a 1
%patch1
pushd acpi-%{acpi_version}
popd
cp %{S:2} %{S:3} %{S:4} %{S:5} %{S:6} %{S:7} %{S:9} .
%build
pushd acpi-%{acpi_version}
ln -sf /usr/share/automake*/install-sh install-sh
./configure
make CFLAGS="$RPM_OPT_FLAGS"
popd
%install
make install INSTPREFIX=%{buildroot} SBINDIR=%{buildroot}/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
pushd acpi-%{acpi_version}
ln -sf /usr/share/automake*/mkinstalldirs mkinstalldirs
make prefix=%{buildroot}/usr install
install -Dm 644 acpi.1 %{buildroot}/%{_mandir}/man1/acpi.1
popd
# for the rpmlint fascists
mv samples examples
# keep the logfile
install -dm 755 %buildroot%_var/log
touch %buildroot%_var/log/acpid
%clean
rm -rf %{buildroot}
%post
%{fillup_and_insserv -y -f acpid}
%postun
%restart_on_update acpid
%{insserv_cleanup}
%preun
%stop_on_removal 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
/usr/sbin/rcacpid
/sbin/acpid
/usr/bin/acpi_listen
%doc README.SuSE README Changelog examples
/usr/share/man/man8/acpid.8.gz
/usr/share/man/man8/acpi_listen.8.gz
/usr/bin/acpi
/usr/share/man/man1/acpi.1.gz
%ghost %config(noreplace,missingok) %_var/log/acpid
%changelog