[csw-devel] SF.net SVN: gar:[11493] csw/mgar/pkg/apcupsd

aigoshin at users.sourceforge.net aigoshin at users.sourceforge.net
Thu Nov 4 11:52:04 CET 2010


Revision: 11493
          http://gar.svn.sourceforge.net/gar/?rev=11493&view=rev
Author:   aigoshin
Date:     2010-11-04 10:52:04 +0000 (Thu, 04 Nov 2010)

Log Message:
-----------
apcupsd: release 20101104

Modified Paths:
--------------
    csw/mgar/pkg/apcupsd/trunk/Makefile
    csw/mgar/pkg/apcupsd/trunk/checksums
    csw/mgar/pkg/apcupsd/trunk/files/cswapcupsd

Property Changed:
----------------
    csw/mgar/pkg/apcupsd/


Property changes on: csw/mgar/pkg/apcupsd
___________________________________________________________________
Added: svn:externals
   + gar https://gar.svn.sourceforge.net/svnroot/gar/csw/mgar/gar/v2


Modified: csw/mgar/pkg/apcupsd/trunk/Makefile
===================================================================
--- csw/mgar/pkg/apcupsd/trunk/Makefile	2010-11-04 09:47:08 UTC (rev 11492)
+++ csw/mgar/pkg/apcupsd/trunk/Makefile	2010-11-04 10:52:04 UTC (rev 11493)
@@ -1,7 +1,9 @@
 GARNAME = apcupsd
-GARVERSION = 3.14.4
+GARVERSION = 3.14.8
 CATEGORIES = utils
 
+GARCOMPILER = GCC3
+
 DESCRIPTION = A daemon for controlling APC UPS
 define BLURB
 	"apcupsd" can be used for controlling all APC UPS models
@@ -10,40 +12,43 @@
 	other hosts on a LAN
 endef
 
-MASTER_SITES = http://www.apcupsd.org/
-DISTFILES  = $(GARNAME)-$(GARVERSION).tar.gz
-DISTFILES += $(call admfiles,CSWapcupsd, postinstall)
-DISTFILES += cswapcupsd
+MASTER_SITES = $(SF_MIRRORS)
+DISTFILES    = $(GARNAME)-$(GARVERSION).tar.gz
+DISTFILES   += cswapcupsd
 
+LICENSE      = COPYING
+
 # We define upstream file regex so we can be notifed of new upstream software release
 UFILES_REGEX = $(GARNAME)-(\d+(?:\.\d+)*).tar.gz
 
-RUNTIME_DEP_PKGS = CSWcswclassutils
+RUNTIME_DEP_PKGS = CSWtcpwrap
 
-SPKG_CLASSES = none cswcpsampleconf cswinitsmf
-PROTOTYPE_FILTER = awk '$$$$3 ~ /\/init.d\/cswapcupsd$$$$/ { $$$$2 = "cswinitsmf" } $$$$3 ~ /\/apcupsd\/apcupsd.conf.CSW$$$$/ { $$$$2 = "cswcpsampleconf" } { print }' | grep -v \/etc\/rc
+sysconfdir      = /etc/opt/csw
+localstatedir   = /var/opt/csw
 
-CONFIGURE_ARGS = $(DIRPATHS)
-CONFIGURE_ARGS += --sysconfdir=/etc/opt/csw/apcupsd
-CONFIGURE_ARGS += --with-nologin=/var/run
-CONFIGURE_ARGS += --with-pwrfail-dir=/opt/csw/etc/apcupsd/powerfail
-CONFIGURE_ARGS += --with-log-dir=/opt/csw/var/apcupsd
-CONFIGURE_ARGS += --with-cgi-bin=/opt/csw/etc/apcupsd/cgi
+NODIRPATHS      = --sysconfdir
+CONFIGURE_ARGS  = $(DIRPATHS)
+CONFIGURE_ARGS += --sysconfdir=$(sysconfdir)/apcupsd
+CONFIGURE_ARGS += --with-log-dir=$(localstatedir)/apcupsd
+CONFIGURE_ARGS += --with-libwrap=$(prefix)
+CONFIGURE_ARGS += --with-nisip=127.0.0.1
+CONFIGURE_ARGS += --disable-install-distdir
 
-GARCOMPILER = GNU
-
 TEST_SCRIPTS=
 
-# moving configuration file & installing init script
-post-install-modulated:
-	(cd $(DESTDIR)/etc/opt/csw/apcupsd; \
-	for i in apcupsd.conf; do \
-		if [ -r "$$i" ]; then \
-			echo "$$i -> $$i.CSW"; \
-			mv "$$i" "$$i.CSW";     \
-		fi \
-	done)
-	ginstall -d $(DESTDIR)/etc/opt/csw/init.d
-	ginstall -m 755 files/cswapcupsd $(DESTDIR)/etc/opt/csw/init.d/cswapcupsd
+INITSMF      = $(sysconfdir)/init.d/cswapcupsd
+PRESERVECONF = $(sysconfdir)/apcupsd.conf
 
+#DISTRETC     = init.d rc0.d rc1.d rc2.d
+APCUPSDDOC   = COPYING ChangeLog DISCLAIMER Developers ReleaseNotes VERIFYING
+
 include gar/category.mk
+
+post-install-modulated:
+	ginstall -d $(DESTDIR)$(sysconfdir)/init.d
+	ginstall -d $(DESTDIR)$(docdir)/apcupsd
+	ginstall -d $(DESTDIR)$(localstatedir)/apcupsd
+	cd $(DESTDIR)/etc ; rm -rf $(DISTRETC)
+	cp $(WORKDIR)/cswapcupsd $(DESTDIR)$(sysconfdir)/init.d/
+	cd $(WORKSRC); cp -r $(APCUPSDDOC) $(DESTDIR)$(docdir)/apcupsd
+	$(MAKECOOKIE)

Modified: csw/mgar/pkg/apcupsd/trunk/checksums
===================================================================
--- csw/mgar/pkg/apcupsd/trunk/checksums	2010-11-04 09:47:08 UTC (rev 11492)
+++ csw/mgar/pkg/apcupsd/trunk/checksums	2010-11-04 10:52:04 UTC (rev 11493)
@@ -1,4 +1 @@
-78811129db1a882b9a2b9afd540470b3  download/apcupsd-3.14.4.tar.gz
-8f6ac052c4f049b79553ba43eda38d30  download/CSWapcupsd.gspec
-27409e07fa0133f0ed22e0b76d5a5ada  download/CSWapcupsd.postinstall
-6b63d7b83cb6bc893797d41b751fef70  download/cswapcupsd
+cd17f0a903dc2220e55ed54e242359d2  apcupsd-3.14.8.tar.gz

Modified: csw/mgar/pkg/apcupsd/trunk/files/cswapcupsd
===================================================================
--- csw/mgar/pkg/apcupsd/trunk/files/cswapcupsd	2010-11-04 09:47:08 UTC (rev 11492)
+++ csw/mgar/pkg/apcupsd/trunk/files/cswapcupsd	2010-11-04 10:52:04 UTC (rev 11493)
@@ -1,52 +1,32 @@
 #! /bin/sh
 #
-# apcupsd      This shell script takes care of starting and stopping
-#	       the apcupsd UPS monitoring daemon.
+#RC_KNUM 21
+#RC_SNUM 89
+#RC_KLEV 0
+#RC_SLEV 1,2
+#AUTOENABLE no
 #
-# chkconfig: 2345 20 99
-# description: apcupsd monitors power and takes action if necessary
-#
-#  Update October 7th, 2001 - CPE
-#
-APCPID=/var/run/apcupsd.pid
-DISTVER="Solaris"
-POWERFAILDIR=/opt/csw/etc/apcupsd
-LOCKDIR=/var/spool/locks
-SBINDIR=/opt/csw/sbin
 
-return=" Done."
-
-
 case "$1" in
-    start)
-	rm -f ${POWERFAILDIR}/powerfail
-	echo "Starting apcupsd power management ...\c"
-	${SBINDIR}/apcupsd || return="	Failed."
-	touch ${LOCKDIR}/apcupsd
-	echo "$return"
-    ;;
-    stop)
-	echo "Stopping apcupsd power management ...\c"
-	if [ -f ${APCPID} ]; then
-		THEPID=`cat ${APCPID}`
-		kill ${THEPID} || return=" Failed."
-		rm -f ${APCPID}
-	else
-		return=" Failed."
-	fi
+  start)
+	rm -f /etc/powerfail
+	/opt/csw/sbin/apcupsd
+	touch /var/spool/locks/apcupsd
+	;;
+  stop)
+	pkill -f "\/opt\/csw\/sbin\/apcupsd"
 	rm -f ${LOCKDIR}/apcupsd
-	echo "$return"
-    ;;
-    restart)
-       $0 stop
-       $0 start
-    ;;
-    status)
-       ${SBINDIR}/apcaccess status
-    ;;
-    *)
-    echo "Usage: $0 {start|stop|restart|status}"
-    exit 1
+	;;
+  restart)
+	$0 stop
+	$0 start
+	;;
+  status)
+	/opt/csw/sbin/apcaccess status
+	;;
+  *)
+	echo "Usage: $0 {start|stop|restart|status}"
+	exit 1
 esac
 
 exit 0


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.


More information about the devel mailing list