2 %define version @VERSION@
4 %define _cgibin /var/www/cgi-bin
5 %define _sysconfdir /etc/apcupsd
8 Summary: Power management software for APC UPS hardware
12 Source0: http://prdownloads.sourceforge.net/apcupsd/%{name}-%{version}.tar.gz
14 URL: http://sourceforge.net/projects/apcupsd/
16 Requires: initscripts >= 6.27-5mdk
17 BuildRoot: %{_tmppath}/%{name}-buildroot
19 BuildRequires: ncurses-devel gpm-devel libgd-devel
22 UPS power management under Linux for APCC Products.
23 It allows your computer/server to run during power problems
24 for a specified length of time or the life of the batteries
25 in your BackUPS, BackUPS Pro, SmartUPS v/s, or SmartUPS, and
26 then properly executes a controlled shutdown during an
27 extended power failure.
36 %configure --enable-usb --enable-net --enable-master-slave --enable-powerflute --enable-pthreads --enable-cgi --with-cgi-bin=%{_cgibin} --enable-nls --with-serial-dev= --with-upstype=usb --with-upscable=usb --with-nisip=127.0.0.1
42 rm -rf $RPM_BUILD_ROOT
43 mkdir -p $RPM_BUILD_ROOT/etc/rc.d/init.d
44 mkdir -p $RPM_BUILD_ROOT%{_cgibin}
46 perl -pi -e 's|/etc|\$\$RPM_BUILD_ROOT/etc|g' platforms/mandrake/Makefile.in
47 perl -pi -e 's|\@/sbin/chkconfig|\#\@/sbin/chkconfig|' platforms/mandrake/Makefile.in
49 %makeinstall cgibin=$RPM_BUILD_ROOT%{_cgibin}
54 [ "$RPM_BUILD_ROOT" != "/" ] && rm -rf $RPM_BUILD_ROOT
58 %_post_service apcupsd
62 %_preun_service apcupsd
64 %files -f %{name}.lang
66 %config(noreplace) /etc/apcupsd/*
67 %config(noreplace) /etc/rc.d/init.d/apcupsd
71 %doc COPYING ChangeLog INSTALL doc/ examples/
74 * Mon Jan 19 2004 David Walser <luigiwalser@yahoo.com> 3.10.10-1mdk
78 * Thu Jan 01 2004 David Walser <luigiwalser@yahoo.com> 3.10.9-1mdk
81 * Fri Nov 21 2003 Erwan Velu <erwan@mandrakesoft.com> 3.10.7-1mdk
84 * Tue Feb 04 2003 David Walser <luigiwalser@yahoo.com> 3.10.5-1mdk
86 - only listen on localhost by default (Network Information Server)
87 - use gz instead of bz2 for apcupsd project version of spec file
89 * Sun Feb 01 2003 David Walser <luigiwalser@yahoo.com> 3.10.4-1mdk
92 - remove explicit libgd1 dependency, let rpm figure it out
93 - Remove patches (integrated upstream)
95 * Tue Jun 11 2002 Frederic Lepied <flepied@mandrakesoft.com> 3.9.8-2mdk
97 - rebuild for libintl2
99 * Tue Apr 16 2002 Ben Reser <ben@reser.org> 3.9.8-1mdk
102 - moved cgi scripts to /var/www/cgi-bin
103 - Split the documentation from the examples in /usr/share/doc/
104 - Switched to using the system gd library and generating PNG's instead
105 of the patent encumbered GIF.
106 - Added the mandrake distribution setting so it stops saying it's running
108 - Enabled USB support.
110 * Thu Nov 22 2001 Frederic Lepied <flepied@mandrakesoft.com> 3.8.2-2mdk
111 - rebuild for new spec-helper
113 * Fri Oct 19 2001 Frederic Lepied <flepied@mandrakesoft.com> 3.8.2-1mdk
116 * Thu Oct 18 2001 David MacKenzie <djm@pix.net> 3.8.1-3mdk
117 - Move programs from /usr/sbin to /sbin so they'll work after /usr is
118 unmounted when shutting down.
120 * Mon Sep 17 2001 Frederic Lepied <flepied@mandrakesoft.com> 3.8.1-2mdk
121 - remove %%post modifications of halt and put the right dependency on
122 initscripts instead (Juergen Holm).
124 * Fri Jun 1 2001 Frederic Lepied <flepied@mandrakesoft.com> 3.8.1-1mdk
127 * Thu Mar 29 2001 Frederic Lepied <flepied@mandrakesoft.com> 3.8.0-2mdk
128 - use the new rpm macros for servers.
130 * Mon Dec 4 2000 Frederic Lepied <flepied@mandrakesoft.com> 3.8.0-1mdk
133 * Wed Aug 30 2000 Frederic Lepied <flepied@mandrakesoft.com> 3.7.0-3mdk
134 - %%postun => %%preun
136 * Mon Aug 07 2000 Frederic Lepied <flepied@mandrakesoft.com> 3.7.0-2mdk
137 - automatically added BuildRequires
139 * Fri Jul 28 2000 Frederic Lepied <flepied@mandrakesoft.com> 3.7.0-1mdk
140 - first mandrake version