Sophie

Sophie

distrib > Mandriva > 10.0-com > i586 > by-pkgid > 2cb2d9a8500ea21b82e5d7b831a996fc > files > 4

bpowerd-3.0b1-4mdk.src.rpm

%define name bpowerd
%define version 3.0b1
%define release 4mdk

Summary: Power Control Program for Best Patriot UPS
Name: %{name}
Version: %{version}
Release: %{release}
License: GPL
URL: http://www.ccraig.org/bpowerd/ 
Group: Monitoring
Source: %name-%version.tar.bz2
Source1: bpowerd
Source2: power
Source3: INSTALL
Requires: SysVinit >= 2.64, initscripts, chkconfig
BuildRoot: %{_tmppath}/%{name}-buildroot

%description
A program that monitors Best Patriot UPS systems for power outages
and alarms and calls init when they occur.  Allows for the automated
shutdown of the system when alarms occur and killing of the inverter
on shutdown.

%prep
rm -rf $RPM_BUILD_ROOT

%setup
# specifying --with-shutdown allows configure to be run as non-root
CFLAGS="$RPM_OPT_FLAGS" ./configure --with-shutdown=/var/run/shutdown.pid

%build
%make

%install
rm -rf $RPM_BUILD_ROOT

install -m 755 -d $RPM_BUILD_ROOT%{_sbindir}
install -m 755 -s bpowerd $RPM_BUILD_ROOT%{_sbindir}/bpowerd

install -m 755 -d $RPM_BUILD_ROOT%{_mandir}/man8
install -m 644 bpowerd.man $RPM_BUILD_ROOT%{_mandir}/man8/

install -d  $RPM_BUILD_ROOT/etc/rc.d/init.d
install  -m 755 bpowerfail $RPM_BUILD_ROOT/etc/rc.d/init.d/bpowerfail
install  -m 755 ${RPM_SOURCE_DIR}/bpowerd $RPM_BUILD_ROOT/etc/rc.d/init.d/bpowerd

install -d  $RPM_BUILD_ROOT/etc/sysconfig
install -m 644 ${RPM_SOURCE_DIR}/power $RPM_BUILD_ROOT/etc/sysconfig/power
install -m 644 ${RPM_SOURCE_DIR}/INSTALL INSTALL

%clean
rm -rf $RPM_BUILD_ROOT

%files
%defattr(-,root,root)
%{_sbindir}/*
%config /etc/rc.d/init.d/bpowerfail
%config /etc/rc.d/init.d/bpowerd
%{_mandir}/man8/*
%config /etc/sysconfig/power
%defattr(0644,root,root,755)
%doc README
%doc INSTALL

%post
/sbin/chkconfig --add bpowerd
echo "Please read /usr/doc/bpowerd-%{PACKAGE_VERSION}/INSTALL for info on configuring bpowerd"
echo "This is mandatory as bpowerd will not run as currently configured"

%postun
/sbin/chkconfig --del bpowerd

%changelog
* Fri Feb 20 2004 Lenny Cartier <lenny@mandrakesoft.com> 3.0b1-4mdk
- rebuild

* Fri Jan 24 2003 Lenny Cartier <lenny@mandrakesoft.com> 3.0b1-3mdk
- rebuild

* Thu Aug 29 2002 Lenny Cartier <lenny@mandrakesoft.com> 3.0b1-2mdk
- rebuild

* Thu Jun 28 2001 Lenny Cartier <lenny@mandrakesoft.com> 3.0b1-1mdk
- updated to 3.0b1

* Fri Jan 05 2001 Lenny Cartier <lenny@mandrakesoft.com> 2.2-4mdk
- add url
- rebuild

* Tue Aug 01 2000 Thierry Vignaud <tvignaud@mandrakesoft.com> 2.2-3mdk
- BM

* Tue Apr 25 2000 Lenny Cartier <lenny@mandrakesoft.com> 2.2-2mdk
- fix permission on sources
- fix group
- fix files section

* Thu Feb 08 2000 Lenny Cartier <lenny@mandrakesoft.com> 2.2-1mdk
- mandrake build

* Mon Nov 23 1998 Christopher Craig <ccraig@ccraig.org> 
- Version 2.2 released  

* Wed Nov 11 1998 Christopher Craig <ccraig@ccraig.org> 
- Version 2.1 released
-  changes in documentation and support scripts  

* Tue Nov 10 1998 Christopher Craig <ccraig@ccraig.org> 
- Version 2.0 released by ccraig  

* Thu Sep 11 1997 Christopher Craig <ccraig@cc.gatech.edu> 
- Version 1.0  released 9/7/97 by ccraig