]> git.pld-linux.org Git - packages/acpid.git/blobdiff - acpid.spec
- update upstart deps
[packages/acpid.git] / acpid.spec
index 53055a2c1b3910f551752e171bc959589f32bffa..ab478c044582448561bdd4e2b4512e96daf09cc0 100644 (file)
-Summary: ACPI Event Daemon
-Name: acpid
-Version: 1.0.0
-Release: 1
-Copyright: GPL
-Group: Daemons
-Source: acpid-1.0.0.tar.gz
-BuildRoot: /var/tmp/acpid
-URL: http://acpid.sourceforge.net
-
+# TODO:
+# - better event handling in power.sh
+# - better default configuration of events in /etc/acpi
+# - processor and fan module support (?)
+# - run-parts(8)-like [A-Z...] regexp from Debian for config scan is evil as it
+#   is locale dependant (http://www.gentoo.org/news/en/gwn/20060522-newsletter.xml#doc_chap2)
+#   also it does not allow *.conf files (missing "."), which is not backward
+#   compatible (custom files can be left unprocessed)
+#   but if patch is made to allow ".", must consider to ignore .rpm{new,old,save} files
+# - build and package kacpimon
+Summary:       ACPI Event Daemon
+Summary(pl.UTF-8):     Demon zdarzeń ACPI
+Name:          acpid
+Version:       2.0.10
+Release:       4
+License:       GPL v2+
+Group:         Daemons
+Source0:       http://tedfelix.com/linux/%{name}-%{version}.tar.gz
+# Source0-md5: d5dd88bcfaa4a0bf51905e95115da6df
+Source1:       %{name}.init
+Source2:       %{name}.sysconfig
+Source3:       %{name}.logrotate
+Source4:       %{name}.button.conf
+Source5:       %{name}.battery.conf
+Source6:       %{name}.button.sh
+Source7:       %{name}.battery.sh
+Source8:       %{name}.upstart
+URL:           http://tedfelix.com/linux/acpid-netlink.html
+BuildRequires: rpmbuild(macros) >= 1.268
+Requires(post,preun):  /sbin/chkconfig
+Requires:      rc-scripts >= 0.4.3.0
+Provides:      acpi-daemon
+Obsoletes:     acpi-daemon
+Obsoletes:     apm-daemon
+ExclusiveArch: %{ix86} %{x8664} ia64
+BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
 %description
 acpid is a daemon that dispatches ACPI events to user-space programs.
 
-
-%changelog
-* Thu Aug 16 2001  Tim Hockin <thockin@sun.com>
-  - Added commandline options to actions
-
-* Wed Aug 15 2001  Tim Hockin <thockin@sun.com>
-  - Added UNIX domain socket support
-  - Changed /etc/acpid.d to /etc/acpid/events
-
-* Mon Aug 13 2001  Tim Hockin <thockin@sun.com>
-  - added changelog
-  - 0.99.1-1
+%description -l pl.UTF-8
+acpid to demon przekazujący zdarzenia ACPI do programów w przestrzeni
+użytkownika.
+
+%package policy
+Summary:       ACPID policy files
+Summary(pl.UTF-8):     Pliki z polityką dla ACPID
+Group:         Daemons
+Requires:      %{name} = %{version}-%{release}
+
+%description policy
+This package contains scripts and configuration files which allow
+ACPID to take action on incoming ACPI events (eg. to run a script that
+suspends the system when the power button is pressed).
+
+Notice: on most current systems you DO NOT want this package
+installed, since there are other software packages responsible for
+handling ACPI events (one example being gnome-power-manager) and
+having ACPID also respond will lead to problems. In such cases ACPID
+should only act as a message broker.
+
+%description policy -l pl.UTF-8
+Ten pakiet zawiera skrypty i pliki konfiguracyjne, które umożliwiają
+demonowi ACPI wykonywanie operacji na podstawie przychodzących zdarzeń
+ACPI (np. uruchomienie skryptu usypiającego system, gdy użytkownik
+naciśnie przycisk zasilania).
+
+Uwaga: na większości obecnych systemów NIE NALEŻY instalować tego
+pakietu, gdyż za reagowanie na zdarzenia ACPI są w nich odpowiedzialne
+inne programy (np. gnome-power-manager), więc ACPID by tylko
+przeszkadzał. W takich przypadkach demon ACPI powinien działać
+wyłącznie jako dyspozytor wiadomości.
 
 %prep
-%setup
-
+%setup -q
 
 %build
-make
-
+%{__make} \
+       CC="%{__cc}" \
+       LDFLAGS="%{rpmcflags} %{rpmldflags}" \
+       OPT="%{rpmcppflags} %{rpmcflags} -Wno-error"
 
 %install
 rm -rf $RPM_BUILD_ROOT
-mkdir -p $RPM_BUILD_ROOT
-make install INSTPREFIX=$RPM_BUILD_ROOT
-
-mkdir -p $RPM_BUILD_ROOT/etc/acpi/events
-mkdir -p $RPM_BUILD_ROOT/etc/acpi/actions
-chmod 755 $RPM_BUILD_ROOT/etc/acpi/events
-install -o root -g root -m 644 samples/sample.conf \
-       $RPM_BUILD_ROOT/etc/acpi/events
-
-mkdir -p $RPM_BUILD_ROOT/var/log
-touch $RPM_BUILD_ROOT/var/log/acpid
-chmod 640 $RPM_BUILD_ROOT/var/log/acpid
-
-mkdir -p $RPM_BUILD_ROOT/etc/rc.d/init.d
-install -o root -g root redhat/acpid.init $RPM_BUILD_ROOT/etc/rc.d/init.d/acpid
-chmod 755 $RPM_BUILD_ROOT/etc/rc.d/init.d/acpid
-
-
-%files
-%defattr(-,root,root)
-%dir /etc/acpi
-%dir /etc/acpi/events
-%dir /etc/acpi/actions
-/etc/acpi/events/sample.conf
-/var/log/acpid
-/usr/sbin/acpid
-/etc/rc.d/init.d/acpid
-/usr/share/man/man8/acpid.8.gz
-
+install -d $RPM_BUILD_ROOT{/etc/{logrotate.d,rc.d/init.d,sysconfig,init},/var/log} \
+       $RPM_BUILD_ROOT%{_sysconfdir}/acpi/{events,actions}
+
+%{__make} install \
+       DESTDIR=$RPM_BUILD_ROOT
+
+install -p %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/acpid
+cp -p %{SOURCE2} $RPM_BUILD_ROOT/etc/sysconfig/acpid
+cp -p %{SOURCE3} $RPM_BUILD_ROOT/etc/logrotate.d/acpid
+cp -p %{SOURCE8} $RPM_BUILD_ROOT/etc/init/acpid.conf
+cp -p %{SOURCE4} $RPM_BUILD_ROOT%{_sysconfdir}/acpi/events/button
+cp -p %{SOURCE5} $RPM_BUILD_ROOT%{_sysconfdir}/acpi/events/battery
+install -p %{SOURCE6} $RPM_BUILD_ROOT%{_sysconfdir}/acpi/actions/button.sh
+install -p %{SOURCE7} $RPM_BUILD_ROOT%{_sysconfdir}/acpi/actions/battery.sh
+> $RPM_BUILD_ROOT/var/log/acpid
+rm -rf $RPM_BUILD_ROOT%{_docdir}/%{name}
+
+%clean
+rm -rf $RPM_BUILD_ROOT
 
 %post
-# only run on install, not upgrade 
-if [ "$1" = "1" ]; then
-       /sbin/chkconfig --add acpid
-fi
-
+/sbin/chkconfig --add acpid
+%service acpid restart "ACPI daemon"
 
 %preun
-# only run if this is the last instance to be removed
 if [ "$1" = "0" ]; then
+       %service acpid stop
        /sbin/chkconfig --del acpid
 fi
+
+%triggerpostun -- %{name} < 1.0.4-4
+%banner -e %{name} << 'EOF'
+Default configuration files have changed.
+You might want to review your configuration in /etc/acpi
+EOF
+
+%files
+%defattr(644,root,root,755)
+%doc Changelog README TODO TESTPLAN
+%attr(755,root,root) %{_sbindir}/acpid
+%attr(755,root,root) %{_bindir}/acpi_listen
+%dir %{_sysconfdir}/acpi
+%dir %{_sysconfdir}/acpi/events
+%dir %{_sysconfdir}/acpi/actions
+%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/logrotate.d/acpid
+%attr(754,root,root) /etc/rc.d/init.d/acpid
+%config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/acpid
+%config(noreplace) %verify(not md5 mtime size) /etc/init/acpid.conf
+%attr(640,root,root) %ghost /var/log/acpid
+%{_mandir}/man8/acpid.8*
+%{_mandir}/man8/acpi_listen.8*
+
+%files policy
+%defattr(644,root,root,755)
+%config(noreplace,missingok) %verify(not md5 mtime size) %{_sysconfdir}/acpi/events/button
+%config(noreplace,missingok) %verify(not md5 mtime size) %{_sysconfdir}/acpi/events/battery
+%attr(754,root,root) %config(noreplace,missingok) %verify(not md5 mtime size) %{_sysconfdir}/acpi/actions/*.sh
This page took 0.075872 seconds and 4 git commands to generate.