rpms/apcupsd/devel apcupsd-3.10.18-init.patch, NONE, 1.1 apcupsd.spec, NONE, 1.1 .cvsignore, 1.1, 1.2 sources, 1.1, 1.2

Orion Poplawski (orion) fedora-extras-commits at redhat.com
Tue Nov 1 02:59:13 UTC 2005


Author: orion

Update of /cvs/extras/rpms/apcupsd/devel
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv24550/devel

Modified Files:
	.cvsignore sources 
Added Files:
	apcupsd-3.10.18-init.patch apcupsd.spec 
Log Message:
auto-import apcupsd-3.10.18-3 on branch devel from apcupsd-3.10.18-3.src.rpm

apcupsd-3.10.18-init.patch:

--- NEW FILE apcupsd-3.10.18-init.patch ---
--- apcupsd-3.10.18/platforms/redhat/apcupsd.in.orig	2005-01-09 15:55:41.000000000 -0700
+++ apcupsd-3.10.18/platforms/redhat/apcupsd.in	2005-10-31 10:35:05.000000000 -0700
@@ -3,7 +3,7 @@
 # apcupsd      This shell script takes care of starting and stopping
 #	       the apcupsd UPS monitoring daemon.
 #
-# chkconfig: 2345 60 99
+# chkconfig: - 60 99
 # description: apcupsd monitors power and takes action if necessary
 #
 APCPID=@PIDDIR@/apcupsd.pid
@@ -42,7 +42,7 @@
        rm -f $APCPID
        rm -f @LOCKDIR@/subsys/apcupsd
        ;;
-    restart)
+    restart|reload)
        $0 stop
        sleep 15
        $0 start


--- NEW FILE apcupsd.spec ---
Name:         apcupsd
Version:      3.10.18
Release:      3%{?dist}
Summary:      APC UPS Power Control Daemon for Linux

Group:        System Environment/Daemons
License:      GPL
URL:          http://www.apcupsd.com
Source0:      http://download.sourceforge.net/apcupsd/%{name}-%{version}.tar.gz
Patch0:       apcupsd-3.10.18-init.patch
BuildRoot:    %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)

BuildRequires: glibc-devel >= 2.3, gd-devel > 2.0, dos2unix
Requires:      /bin/mail
Requires(post):  /sbin/chkconfig
Requires(preun): /sbin/chkconfig

%description
Apcupsd can be used for controlling most APC UPSes. During a
power failure, apcupsd will inform the users about the power
failure and that a shutdown may occur.  If power is not restored,
a system shutdown will follow when the battery is exausted, a
timeout (seconds) expires, or the battery runtime expires based
on internal APC calculations determined by power consumption
rates.  If the power is restored before one of the above shutdown
conditions is met, apcupsd will inform users about this fact.
Some features depend on what UPS model you have (simple or smart).


%package cgi
Summary:      Web interface for apcupsd
Group:        Applications/Internet
Requires:     %{name} = %{version}-%{release}
Requires:     httpd

%description cgi
A CGI interface to the APC UPS monitoring daemon.


%prep
%setup -q
%patch -p1 -b .init
dos2unix examples/*status


%build
%configure \
        --sysconfdir="%{_sysconfdir}/apcupsd" \
        --with-cgi-bin="%{_localstatedir}/www/cgi-bin/apcupsd" \
        --enable-cgi \
        --enable-pthreads \
        --enable-net \
        --enable-master-slave \
        --enable-apcsmart \
        --enable-dumb \
        --enable-usb \
        --with-serial-dev= \
        --with-upstype=usb \
        --with-upscable=usb \
        APCUPSD_MAIL=/bin/mail

make


%install
rm -rf $RPM_BUILD_ROOT

mkdir -p $RPM_BUILD_ROOT%{_initrddir}
mkdir -p $RPM_BUILD_ROOT%{_localstatedir}/www/cgi-bin/apcupsd

make DESTDIR=$RPM_BUILD_ROOT install

rm $RPM_BUILD_ROOT%{_initrddir}/halt
rm $RPM_BUILD_ROOT%{_initrddir}/halt.old

install -m744 platforms/apccontrol \
              $RPM_BUILD_ROOT%{_sysconfdir}/apcupsd/apccontrol
	      
install -m755 platforms/redhat/apcupsd $RPM_BUILD_ROOT%{_initrddir}

chmod -x examples/*.conf
rm examples/*.in


%clean
rm -rf $RPM_BUILD_ROOT


%files
%defattr(-,root,root,-)
%doc COPYING ChangeLog doc/README.apcaccess doc/developers_manual examples ReleaseNotes
%dir %{_sysconfdir}/apcupsd
%{_initrddir}/apcupsd
%config(noreplace) %{_sysconfdir}/apcupsd/apcupsd.conf
%config(noreplace) %{_sysconfdir}/apcupsd/hosts.conf
%config(noreplace) %{_sysconfdir}/apcupsd/multimon.conf
%attr(0755,root,root) %{_sysconfdir}/apcupsd/apccontrol
%{_sysconfdir}/apcupsd/changeme
%{_sysconfdir}/apcupsd/commfailure
%{_sysconfdir}/apcupsd/commok
%{_sysconfdir}/apcupsd/onbattery
%{_sysconfdir}/apcupsd/mainsback
%{_sysconfdir}/apcupsd/masterconnect
%{_sysconfdir}/apcupsd/mastertimeout
%attr(0755,root,root) %{_sbindir}/*
%{_mandir}/*/*

%files cgi
%defattr(-,root,root,-)
%config(noreplace) %{_sysconfdir}/apcupsd/apcupsd.css
%{_localstatedir}/www/cgi-bin/apcupsd/


%post
# add our links
if [ "$1" -ge 1 ] ; then
/sbin/chkconfig --add apcupsd
fi


%preun
if [ $1 = 0 ] ; then
        # remove startup links
        /sbin/chkconfig --del apcupsd
fi


%changelog
* Mon Oct 17 2005 - Orion Poplawski <orion at cora.nwra.com> - 3.10.18-3
- Removed %{_smp_mflags} from make, broke builds
- Patch init file to not start automatically and add reload
- Mark css file config
- Require /sbin/chkconfig

* Mon Oct 17 2005 - Orion Poplawski <orion at cora.nwra.com> - 3.10.18-2
- Add %defattr to -cgi package

* Wed Aug 17 2005 - Orion Poplawski <orion at cora.nwra.com> - 3.10.18-1
- Initial Fedora Version


Index: .cvsignore
===================================================================
RCS file: /cvs/extras/rpms/apcupsd/devel/.cvsignore,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- .cvsignore	1 Nov 2005 02:58:15 -0000	1.1
+++ .cvsignore	1 Nov 2005 02:59:11 -0000	1.2
@@ -0,0 +1 @@
+apcupsd-3.10.18.tar.gz


Index: sources
===================================================================
RCS file: /cvs/extras/rpms/apcupsd/devel/sources,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- sources	1 Nov 2005 02:58:15 -0000	1.1
+++ sources	1 Nov 2005 02:59:11 -0000	1.2
@@ -0,0 +1 @@
+64104a1fface0253e77318ca84948bac  apcupsd-3.10.18.tar.gz




More information about the fedora-extras-commits mailing list