]> git.pld-linux.org Git - packages/apmd.git/blob - apmd.spec
- xapm: Requires: XFree86
[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 Name:           apmd
4 Version:        3.0
5 Release:        4
6 License:        GPL
7 Group:          Utilities/System
8 Group(pl):      Narzêdzia/System
9 Source0:        http://www.worldvisions.ca/~apenwarr/apmd/%{name}-%{version}.tar.gz
10 Source1:        apmd.init
11 URL:            http://www.worldvisions.ca/~apenwarr/apmd/
12 Requires:       procps
13 Prereq:         chkconfig
14 BuildRequires:  XFree86-devel
15 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
16 ExclusiveArch:  %{ix86}
17
18 %description
19 Advanced Power Management daemon and utilities allows you to watch
20 your notebook's power state and warn all users when the battery is
21 low. It can also handle some power state events automatically.
22
23 %description -l pl
24 Demon zadz±dzania energi± APM (Advanced Power Management) wraz z
25 programami pomocniczymi. Dziêki nim mo¿liwe jest monitorowanie stanu
26 zasilania Twojego notebooka i ostrzeganie wszystkich u¿ytkowników o
27 koñcz±cej siê baterii, jak równie¿ automatyczne reagowanie na zmiany.
28
29 %package devel
30 Summary:        Header files for developing APM applications
31 Summary(pl):    Pliki nag³ówkowe do tworzenia aplikacji korzystaj±cych z APM
32 Group:          Development/Libraries
33 Group(pl):      Programowanie/Biblioteki
34 Group(fr):      Development/Librairies
35 Requires:       %{name} = %{version}
36
37 %description devel
38 Header files necessary for developing APM applications
39
40 %description devel -l pl
41 Pliki nag³ówkowe niezbêdne do tworzenia aplikacji korzystaj±cych z APM
42
43 %package -n xapm
44 Summary:        XFree86 APM monitoring and management tool
45 Summary(pl):    Narzêdzie do monitorowania i zarz±dzania APMem pod XFree86
46 Group:          X11/Utilities/System
47 Group(pl):      X11/Narzêdzia/System
48 Requires:       XFree86
49
50 %description -n xapm
51 xapm is an XFree86 version of console APM client - "apm".
52
53 %description -n xapm -l pl
54 xapm jest wersj± konsolowego klienta APM - "apm", przenaczon± dla
55 XFree86
56
57 %prep
58 %setup -q -n apmd
59
60 %build
61 make CFLAGS="$RPM_OPT_FLAGS" LDFLAGS=-s APMD_PROXY_DIR=%{_sbindir}
62 make -C xbattery clean
63 make CCOPTIONS="$RPM_OPT_FLAGS" LOCAL_LDFLAGS="-s" -C xbattery
64
65 %install
66 rm -rf $RPM_BUILD_ROOT
67 install -d $RPM_BUILD_ROOT{%{_bindir},%{_includedir},%{_libdir},%{_sbindir}} \
68         $RPM_BUILD_ROOT%{_prefix}/X11R6/{bin,man/man1} \
69         $RPM_BUILD_ROOT{%{_mandir}/man{1,8},/etc/{rc.d/init.d,sysconfig}}
70
71 install apm apmsleep tailf on_ac_power $RPM_BUILD_ROOT%{_bindir}
72 install apmd apmd_proxy $RPM_BUILD_ROOT%{_sbindir}
73
74 install xapm $RPM_BUILD_ROOT%{_prefix}/X11R6/bin
75
76 install apm.1 apmsleep.1 tailf.1 $RPM_BUILD_ROOT%{_mandir}/man1/
77 install apmd.8 $RPM_BUILD_ROOT%{_mandir}/man8/
78 install xapm.1 $RPM_BUILD_ROOT%{_prefix}/X11R6/man/man1/xapm.1x
79 install xbattery/xbattery.man $RPM_BUILD_ROOT%{_prefix}/X11R6/man/man1/xbattery.1x
80
81 install libapm.a $RPM_BUILD_ROOT%{_libdir}
82 install apm.h $RPM_BUILD_ROOT%{_includedir}
83
84 install %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/rc.d/init.d/apmd
85 install xbattery/xbattery $RPM_BUILD_ROOT%{_prefix}/X11R6/bin
86
87 cat << EOF > $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig/apmd
88 APMD_OPTIONS="-p 10 -w 5 -W -P %{_sbindir}/apmd_proxy"
89 EOF
90
91 gzip -9nf $RPM_BUILD_ROOT%{_mandir}/man*/* \
92         $RPM_BUILD_ROOT%{_prefix}/X11R6/man/man*/* \
93         README README.transfer ChangeLog ANNOUNCE
94  
95 %clean
96 rm -rf $RPM_BUILD_ROOT
97
98 %post
99 /sbin/chkconfig --add apmd
100 if [ -f /var/lock/subsys/apmd ]; then
101         /etc/rc.d/init.d/apmd restart 1>&2
102 else
103         echo "Run \"/etc/rc.d/init.d/apmd start\" to start apmd daemon."
104 fi
105
106 %preun
107 if [ "$1" = "0" ]; then
108         if [ -f /var/lock/subsys/apmd ]; then
109                 /etc/rc.d/init.d/apmd stop 1>&2
110         fi
111         /sbin/chkconfig --del apmd
112 fi
113
114 %files
115 %defattr(644,root,root,755)
116 %doc ANNOUNCE.gz ChangeLog.gz README.gz README.transfer.gz
117 %{_mandir}/man*/*
118 %attr(755,root,root) %{_bindir}/*
119 %attr(755,root,root) %{_sbindir}/*
120 %attr(754,root,root) /etc/rc.d/init.d/apmd
121 %config(noreplace) /etc/sysconfig/apmd
122
123 %files devel
124 %defattr(644,root,root,755)
125 %{_includedir}/*
126 %{_libdir}/*.a
127
128 %files -n xapm
129 %defattr(644,root,root,755)
130 %{_prefix}/X11R6/man/man*/*
131 %attr(755,root,root) %{_prefix}/X11R6/bin/*
This page took 0.06336 seconds and 3 git commands to generate.