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