apmd-vl.spec 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320
  1. Summary: Advanced Power Management (APM) BIOS utilities for laptops.
  2. Name: apmd
  3. Version: 3.2.2
  4. Release: 1%{?_dist_release}
  5. Source: ftp://ftp.debian.org/debian/pool/main/a/apmd/%{name}_%{version}.orig.tar.gz
  6. Source1: apmd.init
  7. Source2: apmscript
  8. Source3: apmd.conf
  9. Source4: laptopmode
  10. Patch: apmd-3.2-build.patch
  11. Patch1: apmd-3.2-umask.patch
  12. Patch2: apmd-3.2-error.patch
  13. Patch4: apmd-3.2-x.patch
  14. License: GPLv2+
  15. Group: System Environment/Daemons
  16. URL: ftp://ftp.debian.org/debian/pool/main/a/apmd
  17. Prereq: chkconfig
  18. BuildRoot: %{_tmppath}/%{name}-%{version}-root
  19. ExclusiveArch:%{ix86}
  20. %description
  21. APMD is a set of programs for controlling the Advanced Power
  22. Management daemon and utilities found in most modern laptop
  23. computers. APMD can watch your notebook's battery and warn
  24. users when the battery is low. APMD is also capable of shutting
  25. down the PCMCIA sockets before a suspend.
  26. Install the apmd package if you need to control the APM system
  27. on your laptop.
  28. %prep
  29. %setup -q -n apmd-%{version}.orig
  30. %patch -p1 -b .build
  31. %patch1 -p1 -b .umask
  32. %patch2 -p1 -b .error
  33. %patch4 -p1 -b .x
  34. %build
  35. make CFLAGS="$RPM_OPT_FLAGS"
  36. %install
  37. rm -rf $RPM_BUILD_ROOT
  38. mkdir -p $RPM_BUILD_ROOT/etc/{sysconfig/apm-scripts,rc.d/init.d}
  39. %makeinstall APMD_PROXY_DIR=$RPM_BUILD_ROOT/etc
  40. mkdir -p $RPM_BUILD_ROOT/%{_mandir}/man{1,8}
  41. for manpage in apm apmsleep ; do
  42. install -m 644 $manpage.1 $RPM_BUILD_ROOT/%{_mandir}/man1/
  43. done
  44. install -m 644 apmd.8 $RPM_BUILD_ROOT/%{_mandir}/man8/
  45. install -m 755 %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/rc.d/init.d/apmd
  46. install -m 755 %{SOURCE2} $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig/apm-scripts/
  47. install -m 644 %{SOURCE3} $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig/apmd
  48. install -m 755 %{SOURCE4} $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig/apm-scripts/
  49. rm -rf $RPM_BUILD_ROOT%{_sysconfdir}/apmd_proxy
  50. rm -rf $RPM_BUILD_ROOT%{_bindir}/on_ac_power
  51. rm -f $RPM_BUILD_ROOT%{_libdir}/*.la
  52. %clean
  53. rm -rf $RPM_BUILD_ROOT
  54. %post
  55. /sbin/chkconfig --add apmd
  56. %preun
  57. if [ $1 = 0 ]; then
  58. service apmd stop > /dev/null 2>&1
  59. /sbin/chkconfig --del apmd
  60. fi
  61. %postun
  62. if [ "$1" -ge "1" ]; then
  63. service apmd condrestart > /dev/null 2>&1
  64. fi
  65. %triggerpostun -- apmd <= 3.0final-6
  66. /sbin/chkconfig --add apmd
  67. %files
  68. %defattr(-,root,root)
  69. %doc ChangeLog README LSM
  70. %{_mandir}/man?/*
  71. %{_bindir}/*
  72. %{_sbindir}/*
  73. %{_libdir}/libapm.a
  74. %{_includedir}/*.h
  75. %config /etc/rc.d/init.d/apmd
  76. %config(noreplace) /etc/sysconfig/apmd
  77. %dir /etc/sysconfig/apm-scripts
  78. %config /etc/sysconfig/apm-scripts/*
  79. %changelog
  80. * Sat Oct 11 2008 Daisuke SUZUKI <daisuke@linux.or.jp> 3.2.2-1
  81. - new upstream (debian)
  82. - update to 3.2.2
  83. - refresh patches
  84. - remove on_ac_power, which is now provided by pm-utils
  85. * Mon Oct 20 2003 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 3.0.2-19vl1
  86. - based on Redhat Rawhide
  87. - Mon May 19 2003 Bill Nottingham <notting@redhat.com> 1:3.0.2-19
  88. - add support for laptop_mode in apmscript
  89. - make LOWPOWER_SERVICES not depend on POWER_SERVICES (#74935)
  90. - remove xapm manpage (#77900)
  91. - fix soundmodules bogosity (#90592)
  92. - fix ordering of network & services (#90512, #85436, <dberger@oubliette.org>)
  93. - own /etc/sysconfig/apm-scripts (#74026)
  94. - run anacron with -s (#65689)
  95. - Thu Feb 20 2003 Bill Nottingham <notting@redhat.com> 1:3.0.2-17
  96. - don't remove network modules (#83996)
  97. - Tue Feb 18 2003 Bill Nottingham <notting@redhat.com> 1:3.0.2-16
  98. - pass arguments to apmcontinue-pre (#83398, <aleksey@nogin.org>)
  99. - fix NETDEVICES line (#81153)
  100. - Thu Jan 2 2003 Jeremy Katz <katzj@redhat.com> 1:3.0.2-14
  101. - add CPUFREQ= to /etc/sysconfig/apmd
  102. - if CPUFREQ="yes" and /proc/cpufreq exists, use cpufreq to change between
  103. performance and power-save when switching between ac and battery
  104. - Wed Apr 3 2002 Bernhard Rosenkraenzer <bero@redhat.com> 3.0.2-8
  105. - Fix interoperability with hotplug (#62045)
  106. - Fix build with current kernel headers
  107. - Tue Feb 26 2002 Bernhard Rosenkraenzer <bero@redhat.com> 3.0.2-6
  108. - Fix up network device detection (#59447)
  109. - Adapt hwclock calls to current hwclock behavior (#59994)
  110. - Fix net device resume (#59009, #49918)
  111. - Re-add pre-{suspend,resume} hooks (#44603)
  112. - Move LOW_POWER notification file to /var/run/apmd (#56389)
  113. - Determine if X is running before anything else (#20892)
  114. - Run hwclock earlier on resume (#28234)
  115. - Change permissions on /etc/sysconfig/apmd, 0644 is sufficient (#54222)
  116. - Fix stab location (#56718)
  117. - Don't mess up terminal beep on resume (#57955)
  118. - Mon Nov 26 2001 Bernhard Rosenkraenzer <bero@redhat.com> 3.0.2-1
  119. - 3.0.2
  120. - rebuild with new toolchains
  121. * Wed Dec 19 2001 Toru Sagami <sagami@vinelinux.org> 3.0finel-24vl2
  122. - added a patch to build on glibc22 system
  123. * Sun May 27 2001 <sagami@vinelinux.org>
  124. - apmd-3.0finel-24vl1
  125. - use tar with --bzip2 and erased BuildPreReq tar >= 1.13.18
  126. * Thu Nov 2 2000 Bernhard Rosenkraenzer <bero@redhat.com>
  127. - Remove the obsolete -i and -n options from the man page (Bug #19610)
  128. - Fix build with tar >= 1.13.18
  129. * Tue Oct 24 2000 Bernhard Rosenkraenzer <bero@redhat.com>
  130. - Work around yet another BIOS bug ("Bug" #19674)
  131. - Fix up the check for running anacron
  132. * Mon Oct 2 2000 Bernhard Rosenkraenzer <bero@redhat.com>
  133. - It's /sbin/cardctl, not /usr/sbin/cardctl (Bug #18021)
  134. * Thu Aug 31 2000 Bernhard Rosenkraenzer <bero@redhat.com>
  135. - change startup order - apmd should be started after netfs to cope with
  136. an NFS /usr (Not that anyone uses NFS mounted filesystems on notebooks,
  137. but...) (Bug #16251)
  138. * Wed Aug 30 2000 Bernhard Rosenkraenzer <bero@redhat.com>
  139. - Add NETFS_RESTART feature, fix up LOCK_X to use yes/no like the
  140. other settings (Bug #17068 and some other stuff)
  141. * Fri Aug 25 2000 Bernhard Rosenkraenzer <bero@redhat.com>
  142. - Fix typo in suspend script, bug #16957
  143. * Thu Aug 17 2000 Bernhard Rosenkraenzer <bero@redhat.com>
  144. - Fix up "status" in init script, bug #16275
  145. * Tue Aug 8 2000 Bernhard Rosenkraenzer <bero@redhat.com>
  146. - ignore "start" and "stop" events in apmscript instead of claiming
  147. they're unknown events (Bug #15598)
  148. * Sat Aug 05 2000 Bill Nottingham <notting@redhat.com>
  149. - condrestart fixes
  150. * Thu Aug 3 2000 Bernhard Rosenkraenzer <bero@redhat.com>
  151. - Handle "power" events in apmscript (Bug #15283)
  152. * Tue Aug 1 2000 Bernhard Rosenkraenzer <bero@redhat.com>
  153. - Fix typo in man page (Bug #14778)
  154. * Mon Jul 17 2000 Bernhard Rosenkraenzer <bero@redhat.com>
  155. - Use cardctl to suspend/resume pcmcia cards instead of restarting
  156. the entire subsystem (Bug #13836)
  157. * Mon Jul 17 2000 Bernhard Rosenkraenzer <bero@redhat.com>
  158. - Don't use obsolete parameters (Bug #13710)
  159. - Add the possibility to lock X displays on suspend, based on patch from
  160. Hannu Martikka <Hannu.Martikka@nokia.com>
  161. - some other fixes to the apmd scripts
  162. * Sat Jul 15 2000 Bill Nottingham <notting@redhat.com>
  163. - move initscript back
  164. * Wed Jul 12 2000 Prospector <bugzilla@redhat.com>
  165. - automatic rebuild
  166. * Tue Jun 27 2000 Preston Brown <pbrown@redhat.com>
  167. - don't prereq, just require initscripts
  168. * Mon Jun 26 2000 Bernhard Rosenkraenzer <bero@redhat.com>
  169. - Fix init script, move to /etc/init.d
  170. * Sun Jun 25 2000 Bernhard Rosenkraenzer <bero@redhat.com>
  171. - Fix resume for users of non-bash shells (Bug #11580)
  172. - Support restoring sound with the commercial OSS drivers (Bug #11580)
  173. * Mon Jun 19 2000 Bernhard Rosenkraenzer <bero@redhat.com>
  174. - FHSify
  175. * Sat May 27 2000 Bernhard RosenkrçÏzer <bero@redhat.com>
  176. - Some more changes to apm-scripts:
  177. - Fix up HDPARM_AT_RESUME
  178. - Add ANACRON_ON_BATTERY, and default to turning it off
  179. * Mon May 8 2000 Bernhard RosenkrçÏzer <bero@redhat.com>
  180. - Various fixes to the apm-scripts:
  181. - use modprobe instead of insmod for restoring sound
  182. - don't try to restore the X display if X isn't running
  183. - /usr/sbin/anacron, not /usr/bin/anacron
  184. - misc. cleanups
  185. * Fri Feb 4 2000 Bernhard RosenkrçÏzer <bero@redhat.com>
  186. - rebuild to compress man pages
  187. * Mon Jan 17 2000 Bernhard RosenkrçÏzer <bero@redhat.com>
  188. - Update to 3.0final
  189. * Mon Jan 17 2000 Bernhard RosenkrçÏzer <bero@redhat.com>
  190. - Fixes for UTC clocks (Bug #7939)
  191. * Thu Jan 6 2000 Bernhard RosenkrçÏzer <bero@redhat.com>
  192. - If anacron is installed, run it at resume time.
  193. * Sun Nov 21 1999 Bernhard RosenkrçÏzer <bero@redhat.com>
  194. - Fix up the broken harddisk fix (needs to be done earlier during suspend,
  195. also we need to manually wake the drive at resume.)
  196. * Sun Nov 21 1999 Bernhard RosenkrçÏzer <bero@redhat.com>
  197. - Updates to the apm-scripts and sysconfig/apmd:
  198. - Make hwclock --hctosys call optional (CLOCK_SYNC variable)
  199. - Add possibility to modify hdparm settings on suspend/resume.
  200. Some broken harddisks (Gericom 3xC) require this for suspend
  201. to disk to work.
  202. * Wed Nov 10 1999 Bernhard RosenkrçÏzer <bero@redhat.com>
  203. - Put in new apm scripts to handle PCMCIA suspend/resume, and give the
  204. possibility to refresh displays and reload sound modules for some
  205. broken chipsets
  206. - permit builds on i486, i586 and i686 archs
  207. * Mon Sep 20 1999 Michael K. Johnson <johnsonm@redhat.com>
  208. - accept both "UTC=yes" and "UTC=true"
  209. * Mon Aug 16 1999 Bill Nottingham <notting@redhat.com>
  210. - uh-oh, do I own this now?
  211. - update to 3.0beta9
  212. * Thu Jul 1 1999 Bill Nottingham <notting@redhat.com>
  213. - start after, die before network fs...
  214. * Sat Jun 12 1999 Jeff Johnson <jbj@redhat.com>
  215. - add check for /proc/apm (not on SMP) (#3403)
  216. * Mon May 31 1999 Jeff Johnson <jbj@redhat.com>
  217. - shell script tweak (#3176).
  218. * Fri May 7 1999 Bill Nottingham <notting@redhat.com>
  219. - set -u flag for utc
  220. * Sat Apr 17 1999 Matt Wilson <msw@redhat.com>
  221. - prereqs chkconfig
  222. * Fri Apr 16 1999 Cristian Gafton <gafton@redhat.com>
  223. - exlusive arch i3786, as sparcs and alphas have no apm support...
  224. * Wed Apr 14 1999 <ewt@redhat.com>
  225. - removed X bits; gnome has a much better X interface for apm anyway
  226. * Sun Mar 21 1999 Cristian Gafton <gafton@redhat.com>
  227. - auto rebuild in the new build environment (release 4)
  228. * Fri Mar 19 1999 Preston Brown <pbrown@redhat.com>
  229. - quoted APMD_OPTIONS variable in the init script
  230. * Tue Mar 09 1999 Preston Brown <pbrown@redhat.com>
  231. - whoops, making /etc/rc.d/init.d/apmd a directory was a bad idea. fixed.
  232. * Mon Mar 08 1999 Preston Brown <pbrown@redhat.com>
  233. - now owned by Avery Pennarun <apenwarr@debian.org>, upgraded to his latest.
  234. * Wed Feb 24 1999 Preston Brown <pbrown@redhat.com>
  235. - Injected new description and group.
  236. * Fri Nov 06 1998 Preston Brown <pbrown@redhat.com>
  237. - updated to latest patchlevel from web page.
  238. * Wed Apr 22 1998 Michael K. Johnson <johnsonm@redhat.com>
  239. - enhanced init script
  240. * Thu Apr 1 1998 Erik Troan <ewt@redhat.com>
  241. - moved init script into a separate source file
  242. - added restart and status options to initscript
  243. - made it use a build root
  244. - don't start apm when the package is installed
  245. - don't stop apm when the package is removed
  246. * Mon Dec 8 1997 Jan "Yenya" Kasprzak <kas@fi.muni.cz>
  247. - Compiled on RH5.0 against libc6.
  248. - Renamed /etc/rc.d/init.d/apmd.init to /etc/rc.d/init.d/apmd
  249. - Make /etc/rc.d/init.d/apmd to be chkconfig-compliant.
  250. * Thu Oct 2 1997 Jan "Yenya" Kasprzak <kas@fi.muni.cz>
  251. - Fixed buggy /etc/sysconfig/apmd file generation in the spec file.
  252. - Added a patch for apm.c's option handling.
  253. - Both fixes were submitted by Richard D. McRobers <rdm@csn.net>