SPECS: apcupsd.spec - bcond with cgi program - todo: move cgi to ...

mwinkler mwinkler at pld-linux.org
Thu Jan 12 19:28:54 CET 2006


Author: mwinkler                     Date: Thu Jan 12 18:28:54 2006 GMT
Module: SPECS                         Tag: HEAD
---- Log message:
- bcond with cgi program 
- todo: move cgi to better place, css fix

---- Files affected:
SPECS:
   apcupsd.spec (1.65 -> 1.66) 

---- Diffs:

================================================================
Index: SPECS/apcupsd.spec
diff -u SPECS/apcupsd.spec:1.65 SPECS/apcupsd.spec:1.66
--- SPECS/apcupsd.spec:1.65	Thu Jan 12 18:49:21 2006
+++ SPECS/apcupsd.spec	Thu Jan 12 19:28:48 2006
@@ -5,6 +5,7 @@
 %bcond_without	usb	# without USB support
 %bcond_without	net	# without network support
 %bcond_with	snmp	# with SNMP support
+%bcond_with	cgi	# with CGI program support
 #
 Summary:	Power management software for APC UPS hardware
 Summary(pl):	Oprogramowanie do zarządzania energią dla UPS-ów APC
@@ -29,6 +30,7 @@
 BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
 %define		_sysconfdir	/etc/apcupsd
+%define         _cgidir        /home/services/httpd/cgi-bin
 
 %description
 UPS power management under Linux for APCC Products. It allows your
@@ -44,6 +46,14 @@
 odpowiednio uruchamia kontrolowany shutdown przy dłuższej awarii
 zasilania.
 
+%package cgi 
+Summary:        upsstats is a CGI program
+Group:          Applications/Networking
+Requires:       webserver
+
+%description cgi
+upsstats is a CGI program
+
 %prep
 %setup -q
 #%patch0 -p1
@@ -54,9 +64,15 @@
 %{__autoconf}
 cp -f configure ..
 cd ..
+
 %configure \
 	--with-log-dir=%{_var}/log \
 	--with-stat-dir=%{_var}/lib/apcupsd \
+%if %{with cgi}
+	--enable-cgi \
+	--with-cgi-bin=/home/services/httpd/cgi-bin \
+	--with-css-dir=/home/services/httpd/cgi-bin \
+%endif
 	%{?with_test:--enable-test} \
 %if %{with net}
 	--enable-net \
@@ -121,6 +137,12 @@
 %attr(754,root,root) %{_sysconfdir}/mastertimeout
 %attr(754,root,root) %{_sysconfdir}/onbattery
 %attr(754,root,root) %{_sysconfdir}/offbattery
+%if %{with cgi}
+%attr(754,root,root) %{_sysconfdir}/hosts.conf
+%attr(754,root,root) %{_sysconfdir}/multimon.conf
+#move to cgi-bin ??
+%attr(754,root,root) %{_sysconfdir}/*.css
+%endif
 %attr(754,root,root) /etc/rc.d/init.d/apcupsd
 %attr(754,root,root) /etc/rc.d/init.d/halt
 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/logrotate.d/apcupsd
@@ -130,12 +152,21 @@
 %attr(640,root,root) %ghost /var/lib/apcupsd/apcupsd.status
 %{_mandir}/man8/apcupsd.*
 
+%files cgi
+%defattr(644,root,root,755)
+%attr(755,root,root) %{_cgidir}/*.cgi
+
+
 %define date	%(echo `LC_ALL="C" date +"%a %b %d %Y"`)
 %changelog
 * %{date} PLD Team <feedback at pld-linux.org>
 All persons listed below can be reached at <cvs_login>@pld-linux.org
 
 $Log$
+Revision 1.66  2006/01/12 18:28:48  mwinkler
+- bcond with cgi program
+- todo: move cgi to better place, css fix
+
 Revision 1.65  2006/01/12 17:49:21  mwinkler
 - updated to 3.12.1
 
================================================================

---- CVS-web:
    http://cvs.pld-linux.org/SPECS/apcupsd.spec?r1=1.65&r2=1.66&f=u



More information about the pld-cvs-commit mailing list