]> git.pld-linux.org Git - packages/apmd.git/blob - apmd.spec
- added obsoletes acpid
[packages/apmd.git] / apmd.spec
1 Summary:        Advanced Power Management (APM) utilities for notebooks
2 Summary(pl):    Obs³uga zarz±dzania enerig± (APM) dla notebooków
3 Summary(pt_BR): Utilitários para APM (Gerenciamento Avancado de Energia)
4 Summary(es):    Utilitarios para APM (Gestión Avanzado de Energía)
5 Name:           apmd
6 Version:        3.0.2
7 Release:        2
8 License:        GPL
9 Group:          Applications/System
10 Group(de):      Applikationen/System
11 Group(pl):      Aplikacje/System
12 Source0:        http://www.worldvisions.ca/~apenwarr/apmd/%{name}-%{version}.tar.gz
13 Source1:        %{name}.init
14 Patch0:         %{name}-security.patch
15 URL:            http://www.worldvisions.ca/~apenwarr/apmd/
16 BuildRequires:  XFree86-devel
17 Prereq:         /sbin/chkconfig
18 Obsoletes:      acpid
19 Requires:       procps
20 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
21 ExclusiveArch:  %{ix86}
22
23 %description
24 Advanced Power Management daemon and utilities allows you to watch
25 your notebook's power state and warn all users when the battery is
26 low. It can also handle some power state events automatically.
27
28 %description -l pl
29 Demon zadz±dzania energi± APM (Advanced Power Management) wraz z
30 programami pomocniczymi. Dziêki nim mo¿liwe jest monitorowanie stanu
31 zasilania Twojego notebooka i ostrzeganie wszystkich u¿ytkowników o
32 koñcz±cej siê baterii, jak równie¿ automatyczne reagowanie na zmiany.
33
34 %description -l pt_BR
35 Utilitários e servidor para gerenciamento avançado de energia (APM). Ele
36 verifica a bateria de seu notebook e avisa aos usuários que ele está com pouca
37 carga.
38
39 Foi adicionado um patch nao oficial para parar os soquetes PCMCIA antes de uma
40 suspensao de energia.
41
42 %description -l es
43 Utilitarios y servidor para gestión avanzada de energía (APM). Verifica la
44 batería de tu notebook y avisa a los usuarios cuando la carga es poca.  Fue
45 adicionado un patch no oficial para parar los enchufes PCMCIA antes de una
46 suspensión de energía.
47
48 %package devel
49 Summary:        Header files for developing APM applications
50 Summary(pl):    Pliki nag³ówkowe do tworzenia aplikacji korzystaj±cych z APM
51 Summary(pt_BR): Arquivos de inclusão e bibliotecas para o apmd em versão estática
52 Summary(es):    Archivos de inclusión y bibliotecas para apmd en versión estática
53 Group:          Development/Libraries
54 Group(de):      Entwicklung/Libraries
55 Group(fr):      Development/Librairies
56 Group(pl):      Programowanie/Biblioteki
57 Requires:       %{name} = %{version}
58
59 %description devel
60 Header files necessary for developing APM applications.
61
62 %description devel -l pl
63 Pliki nag³ówkowe niezbêdne do tworzenia aplikacji korzystaj±cych z
64 APM.
65
66 %description -l pt_BR devel
67 Arquivos de inclusão e bibliotecas para o apmd em versão estática
68
69 %description -l es devel
70 Archivos de inclusión y bibliotecas para apmd en versión estática
71
72 %package -n xapm
73 Summary:        XFree86 APM monitoring and management tool
74 Summary(pl):    Narzêdzie do monitorowania i zarz±dzania APMem pod XFree86
75 Group:          X11/Applications
76 Group(de):      X11/Applikationen
77 Group(pl):      X11/Aplikacje
78 Requires:       XFree86
79
80 %description -n xapm
81 xapm is an XFree86 version of console APM client - "apm".
82
83 %description -n xapm -l pl
84 xapm jest wersj± konsolowego klienta APM - "apm", przenaczon± dla
85 XFree86.
86
87 %prep
88 %setup -q -n apmd
89 %patch0 -p1
90
91 %build
92 %{__make} CFLAGS="%{rpmcflags}" LDFLAGS="%{rpmldflags}" APMD_PROXY_DIR=%{_sbindir}
93 %{__make} -C xbattery clean
94 %{__make} CCOPTIONS="%{rpmcflags}" LOCAL_LDFLAGS="%{rpmldflags}" -C xbattery
95
96 %install
97 rm -rf $RPM_BUILD_ROOT
98 install -d $RPM_BUILD_ROOT{%{_bindir},%{_includedir},%{_libdir},%{_sbindir}} \
99         $RPM_BUILD_ROOT%{_prefix}/X11R6/{bin,man/man1} \
100         $RPM_BUILD_ROOT{%{_mandir}/man{1,8},%{_sysconfdir}/{rc.d/init.d,sysconfig}}
101
102 install apm apmsleep on_ac_power $RPM_BUILD_ROOT%{_bindir}
103 install apmd apmd_proxy $RPM_BUILD_ROOT%{_sbindir}
104
105 install xapm $RPM_BUILD_ROOT%{_prefix}/X11R6/bin
106
107 install apm.1 apmsleep.1 $RPM_BUILD_ROOT%{_mandir}/man1/
108 install apmd.8 $RPM_BUILD_ROOT%{_mandir}/man8/
109 install xapm.1 $RPM_BUILD_ROOT%{_prefix}/X11R6/man/man1/xapm.1x
110 install xbattery/xbattery.man $RPM_BUILD_ROOT%{_prefix}/X11R6/man/man1/xbattery.1x
111
112 install libapm.a $RPM_BUILD_ROOT%{_libdir}
113 install apm.h $RPM_BUILD_ROOT%{_includedir}
114
115 install %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/rc.d/init.d/apmd
116 install xbattery/xbattery $RPM_BUILD_ROOT%{_prefix}/X11R6/bin
117
118 cat << EOF > $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig/apmd
119 APMD_OPTIONS="-p 10 -w 5 -W -P %{_sbindir}/apmd_proxy"
120 EOF
121
122 gzip -9nf README README.transfer ChangeLog ANNOUNCE
123  
124 %clean
125 rm -rf $RPM_BUILD_ROOT
126
127 %post
128 /sbin/chkconfig --add apmd
129 if [ -f /var/lock/subsys/apmd ]; then
130         /etc/rc.d/init.d/apmd restart 1>&2
131 else
132         echo "Run \"/etc/rc.d/init.d/apmd start\" to start apmd daemon."
133 fi
134
135 %preun
136 if [ "$1" = "0" ]; then
137         if [ -f /var/lock/subsys/apmd ]; then
138                 /etc/rc.d/init.d/apmd stop 1>&2
139         fi
140         /sbin/chkconfig --del apmd
141 fi
142
143 %files
144 %defattr(644,root,root,755)
145 %doc *.gz
146 %{_mandir}/man*/*
147 %attr(755,root,root) %{_bindir}/*
148 %attr(755,root,root) %{_sbindir}/*
149 %attr(754,root,root) /etc/rc.d/init.d/apmd
150 %config(noreplace) /etc/sysconfig/apmd
151
152 %files devel
153 %defattr(644,root,root,755)
154 %{_includedir}/*
155 %{_libdir}/*.a
156
157 %files -n xapm
158 %defattr(644,root,root,755)
159 %{_prefix}/X11R6/man/man*/*
160 %attr(755,root,root) %{_prefix}/X11R6/bin/*
This page took 0.19165 seconds and 4 git commands to generate.