Sophie

Sophie

distrib > Mandriva > cs4.0 > i586 > by-pkgid > d50500ec5e14fa1c27de0942852d5e63 > files > 4

apcupsd-3.12.2-1mlcs4.src.rpm

%define	name	apcupsd
%define	version	3.12.2
%define	release	%mkrel 1
%define	_cgibin /var/www/cgi-bin
%define	_sysconfdir /etc/apcupsd
%define	_sbindir /sbin

Summary:	Power management software for APC UPS hardware
Name:		%{name}
Version:	%{version}
Release:	%{release}
Source0:	http://prdownloads.sourceforge.net/apcupsd/%{name}-%{version}.tar.bz2
Patch0:		%{name}-%{version}-usbhiddev.patch.bz2
Patch1:		%{name}-3.10.16-staleusb.patch.bz2
License:	GPL
URL:		http://sourceforge.net/projects/apcupsd/
Group:		System/Servers
Requires:	initscripts >= 6.27-5mdk
Requires(post): rpm-helper
Requires(preun):rpm-helper
BuildRoot:	%{_tmppath}/%{name}-%{version}-%{release}-buildroot
BuildRequires:	ncurses-devel gd-devel

%description
UPS power management under Linux for APCC Products.
It allows your computer/server to run during power problems
for a specified length of time or the life of the batteries
in your BackUPS, BackUPS Pro, SmartUPS v/s, or SmartUPS, and
then properly executes a controlled shutdown during an
extended power failure.

%prep
%setup -q
%patch0 -p1 -b .usbhid
%patch1 -p1 -b .usbstale

%build
%serverbuild
%configure2_5x	--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

# %%make doesn't work
make


%install
rm -rf $RPM_BUILD_ROOT
mkdir -p $RPM_BUILD_ROOT/etc/rc.d/init.d
mkdir -p $RPM_BUILD_ROOT%{_cgibin}

perl -pi -e 's|/etc|\$\$RPM_BUILD_ROOT/etc|g' platforms/mandrake/Makefile.in
perl -pi -e 's|\@/sbin/chkconfig|\#\@/sbin/chkconfig|' platforms/mandrake/Makefile.in

%makeinstall cgibin=$RPM_BUILD_ROOT%{_cgibin}
install -m 644 ./platforms/etc/apcupsd.conf $RPM_BUILD_ROOT/etc/apcupsd/
install -m 755 ./platforms/apccontrol $RPM_BUILD_ROOT/etc/apcupsd/

for src in changeme commfailure commok masterconnect \
        mastertimeout onbattery offbattery; do \
	install -m 744 ./platforms/etc/$src $RPM_BUILD_ROOT/etc/apcupsd/$src
done

%find_lang %{name}

%clean
[ "$RPM_BUILD_ROOT" != "/" ] && rm -rf $RPM_BUILD_ROOT

%post
%_post_service apcupsd

%preun
%_preun_service apcupsd

%files -f %{name}.lang
%defattr(-,root,root)
%dir /etc/apcupsd
%config(noreplace) /etc/apcupsd/*
%config(noreplace) /etc/rc.d/init.d/apcupsd
%{_sbindir}/*
%{_mandir}/man8/*
%{_cgibin}/*
%doc ChangeLog doc/ examples/

%changelog
* Mon Apr 03 2006 Giuseppe Ghibò <ghibo@mandriva.com> 3.12.2-1mdk
- Release 3.12.2.

* Fri Dec 23 2005 Giuseppe Ghibò <ghibo@mandriva.com> 3.10-18-5mdk
- added missed /etc/apcupsd/apccontrol.

* Sat Oct 15 2005 Giuseppe Ghibò <ghibo@mandriva.org> 3.10.18-4mdk
- added missed default config file (apcupsd.conf).

* Thu Aug 11 2005 Nicolas Lécureuil <neoclust@mandriva.org> 3.10.18-3mdk
- fix rpmlint errors (PreReq)

* Wed Aug 10 2005 Nicolas Lécureuil <neoclust@mandriva.org> 3.10.18-2mdk
- fix rpmlint errors (PreReq) 

* Sat Jul 23 2005 Giuseppe Ghibò <ghibo@mandriva.com> 3.10.18-1mdk
- Release 3.10.18.
- Rebuilt Patch0.

* Thu Dec 30 2004 Giuseppe Ghibò <ghibo@mandrakesoft.com> 3.10.16-2mdk
- Added Patch0 to fix USB default device under UDEV.
- Added Patch1 to support cleaning for usb stale lock files when
  default device is used.

* Tue Nov 09 2004 Oden Eriksson <oeriksson@mandrakesoft.com> 3.10.16-1mdk
- 3.10.16.

* Sun Aug 08 2004 Giuseppe Ghibò <ghibo@mandrakesoft.com> 3.10.15-1mdk
- Release 3.10.14.
- Dropped Patch0, merged upstream.

* Mon Aug 02 2004 Giuseppe Ghibò <ghibo@mandrakesoft.com> 3.10.14-2mdk
- Added Patch0 to avoid segfault during EEPROM configuring.

* Mon Aug 02 2004 Giuseppe Ghibò <ghibo@mandrakesoft.com> 3.10.14-1mdk
- Dropped Patch0, Patch1, merged upstream.
- Release 3.10.14.

* Thu Jul 29 2004 Per Øyvind Karlsen <peroyvind@linux-mandrake.com> 3.10.13-3mdk
- fix problem with lock files (Giuseppe Ghibo)

* Wed Jul 28 2004 Per Øyvind Karlsen <peroyvind@linux-mandrake.com> 3.10.13-2mdk
- fix build (P0 from Pascal Terjan)
- fix unowned dir
- cosmetics
- drop docs there's no need for
- add prereq on rpm-helper

* Fri May 21 2004 Giuseppe Ghibò <ghibo@mandrakesoft.com> 3.10.13-1mdk
- 3.10.13.

* Mon Feb 02 2004 Erwan Velu <erwan@mandrakesoft.com> 3.10.11-1mdk
- 3.10.11
- Building with lastest David suggestions 

* Mon Jan 19 2004 David Walser <luigiwalser@yahoo.com> 3.10.10-1mdk
- 3.10.10
- use USB by default
- should be safe to enable upon installation now

* Thu Jan 01 2004 David Walser <luigiwalser@yahoo.com> 3.10.9-1mdk
- 3.10.9

* Fri Nov 21 2003 Erwan Velu <erwan@mandrakesoft.com> 3.10.7-1mdk
- New release

* Sun Jun 07 2003 Stefan van der Eijk <stefan@eijk.nu> 3.10.5-2mdk
- BuildRequires

* Tue Feb 04 2003 David Walser <luigiwalser@yahoo.com> 3.10.5-1mdk
- 3.10.5
- only listen on localhost by default (Network Information Server)

* Sun Feb 01 2003 David Walser <luigiwalser@yahoo.com> 3.10.4-1mdk
- 3.10.4
- updated URLs
- remove explicit libgd1 dependency, let rpm figure it out
- Remove patches (integrated upstream)
- Don't enable upon installation

* Tue Jun 11 2002 Frederic Lepied <flepied@mandrakesoft.com> 3.9.8-2mdk
- fix for gcc3
- rebuild for libintl2

* Tue Apr 16 2002 Ben Reser <ben@reser.org> 3.9.8-1mdk
- 3.9.8
- updated URLs
- moved cgi scripts to /var/www/cgi-bin
- Split the documentation from the examples in /usr/share/doc/
- Switched to using the system gd library and generating PNG's instead
  of the patent encumbered GIF.
- Added the mandrake distribution setting so it stops saying it's running
  redhat.
- Enabled USB support.

* Thu Nov 22 2001 Frederic Lepied <flepied@mandrakesoft.com> 3.8.2-2mdk
- rebuild for new spec-helper

* Fri Oct 19 2001 Frederic Lepied <flepied@mandrakesoft.com> 3.8.2-1mdk
- 3.8.2

* Thu Oct 18 2001 David MacKenzie <djm@pix.net> 3.8.1-3mdk
- Move programs from /usr/sbin to /sbin so they'll work after /usr is
  unmounted when shutting down.

* Mon Sep 17 2001 Frederic Lepied <flepied@mandrakesoft.com> 3.8.1-2mdk
- remove %%post modifications of halt and put the right dependency on
initscripts instead (Juergen Holm).

* Fri Jun  1 2001 Frederic Lepied <flepied@mandrakesoft.com> 3.8.1-1mdk
- 3.8.1

* Thu Mar 29 2001 Frederic Lepied <flepied@mandrakesoft.com> 3.8.0-2mdk
- use the new rpm macros for servers.

* Mon Dec  4 2000 Frederic Lepied <flepied@mandrakesoft.com> 3.8.0-1mdk
- new version

* Wed Aug 30 2000 Frederic Lepied <flepied@mandrakesoft.com> 3.7.0-3mdk
- %%postun => %%preun

* Mon Aug 07 2000 Frederic Lepied <flepied@mandrakesoft.com> 3.7.0-2mdk
- automatically added BuildRequires

* Fri Jul 28 2000 Frederic Lepied <flepied@mandrakesoft.com> 3.7.0-1mdk
- first mandrake version

# end of file