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