]> git.pld-linux.org Git - packages/acpid.git/blobdiff - acpid.spec
- removed all Group fields translations (oure rpm now can handle translating
[packages/acpid.git] / acpid.spec
index 53055a2c1b3910f551752e171bc959589f32bffa..f91b3c232be55f1d529d16dc9222ccc195968fc2 100644 (file)
@@ -1,79 +1,72 @@
-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
-
+Summary:       ACPI Event Daemon
+Summary(pl):   Demon zdarzeñ ACPI
+Name:          acpid
+Version:       1.0.0
+Release:       4
+License:       GPL
+Group:         Daemons
+Source0:       ftp://ftp.sourceforge.net/pub/sourceforge/acpid/%{name}-%{version}.tar.gz
+Source1:       %{name}.init
+Source2:       %{name}.sysconfig
+Source3:       %{name}.logrotate
+URL:           http://acpid.sourceforge.net/
+Obsoletes:     apmd
+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
+acpid to demon przekazuj±cy zdarzenia ACPI do programów w user-space.
 
 %prep
-%setup
-
+%setup -q
 
 %build
-make
-
+%{__make}
 
 %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
+install -d $RPM_BUILD_ROOT{/etc/{logrotate.d,rc.d/init.d,sysconfig},/var/log} \
+       $RPM_BUILD_ROOT{%{_sysconfdir}/acpi/{events,actions},%{_sbindir},%{_mandir}/man8}
 
-mkdir -p $RPM_BUILD_ROOT/var/log
-touch $RPM_BUILD_ROOT/var/log/acpid
-chmod 640 $RPM_BUILD_ROOT/var/log/acpid
+install acpid $RPM_BUILD_ROOT/%{_sbindir}
+install acpid.8 $RPM_BUILD_ROOT/%{_mandir}/man8
+install samples/sample.conf $RPM_BUILD_ROOT%{_sysconfdir}/acpi/events
+install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/acpid
+install %{SOURCE2} $RPM_BUILD_ROOT/etc/sysconfig/acpid
+install %{SOURCE3} $RPM_BUILD_ROOT/etc/logrotate.d/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
+> $RPM_BUILD_ROOT/var/log/acpid
 
+%clean
+rm -rf $RPM_BUILD_ROOT
 
 %post
-# only run on install, not upgrade 
-if [ "$1" = "1" ]; then
-       /sbin/chkconfig --add acpid
+/sbin/chkconfig --add acpid
+if [ -f /var/lock/subsys/acpid ]; then
+       /etc/rc.d/init.d/acpid restart >&2
+else
+       echo "Run \"/etc/rc.d/init.d/acpid start\" to start ACPI daemon."
 fi
 
-
 %preun
-# only run if this is the last instance to be removed
 if [ "$1" = "0" ]; then
+       if [ -f /var/lock/subsys/acpid ]; then
+               /etc/rc.d/init.d/acpid stop>&2
+       fi
        /sbin/chkconfig --del acpid
 fi
+
+%files
+%defattr(644,root,root,755)
+%dir %{_sysconfdir}/acpi
+%dir %{_sysconfdir}/acpi/events
+%dir %{_sysconfdir}/acpi/actions
+%attr(640,root,root) /etc/logrotate.d/acpid
+%attr(754,root,root) /etc/rc.d/init.d/acpid
+%config(noreplace) %verify(not size mtime md5) /etc/sysconfig/acpid
+%config(noreplace,missingok) %verify(not size mtime md5) %{_sysconfdir}/acpi/events/sample.conf
+%attr(755,root,root) %{_sbindir}/acpid
+%attr(640,root,root) %ghost /var/log/acpid
+%{_mandir}/man8/acpid.8.gz
This page took 0.101582 seconds and 4 git commands to generate.