From owner-freebsd-ports Wed Oct 24 9:40:29 2001 Delivered-To: freebsd-ports@hub.freebsd.org Received: from freefall.freebsd.org (freefall.FreeBSD.org [216.136.204.21]) by hub.freebsd.org (Postfix) with ESMTP id A071637B409 for ; Wed, 24 Oct 2001 09:40:01 -0700 (PDT) Received: (from gnats@localhost) by freefall.freebsd.org (8.11.4/8.11.4) id f9OGe1v56878; Wed, 24 Oct 2001 09:40:01 -0700 (PDT) (envelope-from gnats) Received: from beta.netcraft.com (beta.netcraft.com [195.92.95.67]) by hub.freebsd.org (Postfix) with ESMTP id 8EB3337B401 for ; Wed, 24 Oct 2001 09:32:04 -0700 (PDT) Received: (from jon@localhost) by beta.netcraft.com (8.11.4/8.11.4) id f9OGW3766807; Wed, 24 Oct 2001 17:32:03 +0100 (BST) (envelope-from jon) Message-Id: <200110241632.f9OGW3766807@beta.netcraft.com> Date: Wed, 24 Oct 2001 17:32:03 +0100 (BST) From: Jon Wilson Reply-To: Jon Wilson To: FreeBSD-gnats-submit@freebsd.org X-Send-Pr-Version: 3.113 Subject: ports/31478: new port - apcupsd Sender: owner-freebsd-ports@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org >Number: 31478 >Category: ports >Synopsis: new port - apcupsd >Confidential: no >Severity: non-critical >Priority: medium >Responsible: freebsd-ports >State: open >Quarter: >Keywords: >Date-Required: >Class: change-request >Submitter-Id: current-users >Arrival-Date: Wed Oct 24 09:40:01 PDT 2001 >Closed-Date: >Last-Modified: >Originator: Jon Wilson >Release: FreeBSD 4.3-STABLE i386 >Organization: Netcraft Ltd. >Environment: System: FreeBSD beta.netcraft.com 4.3-STABLE FreeBSD 4.3-STABLE #4: Tue Jul 10 17:40:16 BST 2001 jez@beta.netcraft.com:/usr/obj/usr/src/sys/BETA i386 >Description: New port - APCUPSD, for controlling APC Smart UPS's # This is a shell archive. Save it in a file, remove anything before # this line, and then unpack it by entering "sh file". Note, it may # create directories; files and directories will be owned by you and # have default permissions. # # This archive contains: # # /usr/ports/sysutils/apcupsd/ # /usr/ports/sysutils/apcupsd/Makefile # /usr/ports/sysutils/apcupsd/pkg-comment # /usr/ports/sysutils/apcupsd/pkg-descr # /usr/ports/sysutils/apcupsd/pkg-plist # /usr/ports/sysutils/apcupsd/distinfo # /usr/ports/sysutils/apcupsd/files # /usr/ports/sysutils/apcupsd/files/patch-a # /usr/ports/sysutils/apcupsd/files/patch-b # /usr/ports/sysutils/apcupsd/files/patch-c # /usr/ports/sysutils/apcupsd/files/configure.in.patch # /usr/ports/sysutils/apcupsd/files/patch-d # /usr/ports/sysutils/apcupsd/pkg-install # echo c - /usr/ports/sysutils/apcupsd/ mkdir -p /usr/ports/sysutils/apcupsd/ > /dev/null 2>&1 echo x - /usr/ports/sysutils/apcupsd/Makefile sed 's/^X//' >/usr/ports/sysutils/apcupsd/Makefile << 'END-of-/usr/ports/sysutils/apcupsd/Makefile' X# New ports collection makefile for: apcupsd X# Date created: 23 October 2001 X# Whom: Jon Wilson X# X# $FreeBSD$ X# X XPORTNAME= apcupsd XPORTVERSION= 3.8.2 XCATEGORIES= sysutils XMASTER_SITES= ftp://ftp.apcupsd.org/pub/apcupsd/stable/tar/ X XMAINTAINER= jon@netcraft.com X XGNU_CONFIGURE= yes XCONFIGURE_ARGS= --prefix=${PREFIX} --enable-cgi --with-cgi-bin=${PREFIX}/etc/apcupsd/cgi X XMAN8= "apcupsd.8" X X.include END-of-/usr/ports/sysutils/apcupsd/Makefile echo x - /usr/ports/sysutils/apcupsd/pkg-comment sed 's/^X//' >/usr/ports/sysutils/apcupsd/pkg-comment << 'END-of-/usr/ports/sysutils/apcupsd/pkg-comment' XA daemon for controlling APC UPS's END-of-/usr/ports/sysutils/apcupsd/pkg-comment echo x - /usr/ports/sysutils/apcupsd/pkg-descr sed 's/^X//' >/usr/ports/sysutils/apcupsd/pkg-descr << 'END-of-/usr/ports/sysutils/apcupsd/pkg-descr' X"apcupsd" can be used for controlling all APC UPS models X XIt can monitor and log the current power and battery status, perform Xautomatic shutdown, and can run in network mode in order to power down Xother hosts on a LAN X XWWW: http://www.apcupsd.org X X- Jon Xjon@netcraft.com END-of-/usr/ports/sysutils/apcupsd/pkg-descr echo x - /usr/ports/sysutils/apcupsd/pkg-plist sed 's/^X//' >/usr/ports/sysutils/apcupsd/pkg-plist << 'END-of-/usr/ports/sysutils/apcupsd/pkg-plist' Xsbin/apcupsd Xetc/apcupsd/apccontrol Xetc/apcupsd/apcupsd.conf Xetc/apcupsd/changeme Xetc/apcupsd/commok Xetc/apcupsd/onbattery Xetc/apcupsd/commfailure Xetc/apcupsd/mainsback Xetc/apcupsd/cgi/multimon.cgi Xetc/apcupsd/cgi/multimoncss.cgi Xetc/apcupsd/cgi/upsfstats.cgi Xetc/apcupsd/cgi/upsimage.cgi Xetc/apcupsd/cgi/upsstats.cgi Xsbin/apcaccess Xsbin/apcnisd Xetc/rc.apcupsd X@dirrm etc/apcupsd/cgi X@dirrm etc/apcupsd END-of-/usr/ports/sysutils/apcupsd/pkg-plist echo x - /usr/ports/sysutils/apcupsd/distinfo sed 's/^X//' >/usr/ports/sysutils/apcupsd/distinfo << 'END-of-/usr/ports/sysutils/apcupsd/distinfo' XMD5 (apcupsd-3.8.2.tar.gz) = c777c08c3b81bf7278cd8282c4a77235 END-of-/usr/ports/sysutils/apcupsd/distinfo echo c - /usr/ports/sysutils/apcupsd/files mkdir -p /usr/ports/sysutils/apcupsd/files > /dev/null 2>&1 echo x - /usr/ports/sysutils/apcupsd/files/patch-a sed 's/^X//' >/usr/ports/sysutils/apcupsd/files/patch-a << 'END-of-/usr/ports/sysutils/apcupsd/files/patch-a' X*** /var/tmp/apcupsd-3.8.2/Makefile.in Wed Jun 20 13:22:41 2001 X--- Makefile.in Wed Oct 24 11:35:11 2001 X*************** X*** 70,75 **** X--- 70,77 ---- X INSTALL_DATA = @INSTALL_DATA@ X # Generic install program. X INSTALL = @INSTALL@ X+ # Install program for scripts X+ INSTALL_SCRIPT = @INSTALL_SCRIPT@ X X # Program to format Texinfo source into Info files. X MAKEINFO = makeinfo X*************** X*** 219,225 **** X @echo "Installing apcaccess binary..." X $(INSTALL_PROGRAM) $(srcdir)/apcaccess $(sbindir)/apcaccess X @echo "Installing apccontrol script..." X! $(INSTALL_PROGRAM) -m 744 $(srcdir)/distributions/$(DISTNAME)/apccontrol.sh $(sysconfdir)/apccontrol X @echo "Installing manual pages..." X $(INSTALL_DATA) $(srcdir)/doc/apcupsd.man $(mandir)/apcupsd.$(manext) X @echo "Installing language catalogs..." X--- 221,227 ---- X @echo "Installing apcaccess binary..." X $(INSTALL_PROGRAM) $(srcdir)/apcaccess $(sbindir)/apcaccess X @echo "Installing apccontrol script..." X! $(INSTALL_SCRIPT) -m 744 $(srcdir)/distributions/$(DISTNAME)/apccontrol.sh $(sysconfdir)/apccontrol X @echo "Installing manual pages..." X $(INSTALL_DATA) $(srcdir)/doc/apcupsd.man $(mandir)/apcupsd.$(manext) X @echo "Installing language catalogs..." X*************** X*** 237,249 **** X else \ X dstconf=apcupsd.conf; \ X fi; \ X! echo "$(INSTALL_DATA) $$srcconf $(sysconfdir)/$$dstconf"; \ X! $(INSTALL_PROGRAM) $$srcconf $(sysconfdir)/$$dstconf X! $(INSTALL_PROGRAM) -m 744 $(srcdir)/etc/changeme $(sysconfdir) X! $(INSTALL_PROGRAM) -m 744 $(srcdir)/etc/commfailure $(sysconfdir) X! $(INSTALL_PROGRAM) -m 744 $(srcdir)/etc/commok $(sysconfdir) X! $(INSTALL_PROGRAM) -m 744 $(srcdir)/etc/onbattery $(sysconfdir) X! $(INSTALL_PROGRAM) -m 744 $(srcdir)/etc/mainsback $(sysconfdir) X X X install-apcupsdwin32: apcupsd X--- 239,251 ---- X else \ X dstconf=apcupsd.conf; \ X fi; \ X! echo "$(INSTALL_SCRIPT) $$srcconf $(sysconfdir)/$$dstconf"; \ X! $(INSTALL_SCRIPT) $$srcconf $(sysconfdir)/$$dstconf X! $(INSTALL_SCRIPT) -m 744 $(srcdir)/etc/changeme $(sysconfdir) X! $(INSTALL_SCRIPT) -m 744 $(srcdir)/etc/commfailure $(sysconfdir) X! $(INSTALL_SCRIPT) -m 744 $(srcdir)/etc/commok $(sysconfdir) X! $(INSTALL_SCRIPT) -m 744 $(srcdir)/etc/onbattery $(sysconfdir) X! $(INSTALL_SCRIPT) -m 744 $(srcdir)/etc/mainsback $(sysconfdir) X X X install-apcupsdwin32: apcupsd END-of-/usr/ports/sysutils/apcupsd/files/patch-a echo x - /usr/ports/sysutils/apcupsd/files/patch-b sed 's/^X//' >/usr/ports/sysutils/apcupsd/files/patch-b << 'END-of-/usr/ports/sysutils/apcupsd/files/patch-b' X*** /var/tmp/apcupsd-3.8.2/distributions/freebsd/Makefile.in Fri Jun 22 09:52:42 2001 X--- distributions/freebsd/Makefile.in Wed Oct 24 13:49:15 2001 X*************** X*** 8,13 **** X--- 8,15 ---- X X INSTALL_PROGRAM = @INSTALL_PROGRAM@ X INSTALL = @INSTALL@ X+ INSTALL_SCRIPT = @INSTALL_SCRIPT@ X+ X SED = /usr/bin/sed X X all: dummy X*************** X*** 23,29 **** X # X install: X @echo "FreeBSD distribution installation" X! $(INSTALL_PROGRAM) -m 744 apcupsd /etc/rc.apcupsd X @-today="`date +%Y%m%d%H%M`"; \ X grep -q '# TAG_APCUPSD' /etc/rc.shutdown; \ X if [ $$? -eq 0 ]; then \ X--- 25,31 ---- X # X install: X @echo "FreeBSD distribution installation" X! $(INSTALL_SCRIPT) -m 744 apcupsd @prefix@/etc/rc.apcupsd X @-today="`date +%Y%m%d%H%M`"; \ X grep -q '# TAG_APCUPSD' /etc/rc.shutdown; \ X if [ $$? -eq 0 ]; then \ X*************** X*** 46,60 **** X ) >> /etc/rc.shutdown; \ X chmod 744 /etc/rc.shutdown; \ X fi; \ X! grep -q /etc/rc.apcupsd /etc/rc.local; \ X if [ $$? -eq 0 ]; then \ X echo "/etc/rc.local already patched"; \ X else \ X rm -f /etc/rc.local.$$today; \ X cp -p /etc/rc.local /etc/rc.local.$$today; \ X ( echo "# Start the UPS daemon. Do not remove the 'TAG_APCUPSD' text"; \ X! echo "# if [ -x /etc/rc.apcupsd ]; then # TAG_APCUPSD"; \ X! echo "# /etc/rc.apcupsd start # TAG_APCUPSD"; \ X echo "# fi # TAG_APCUPSD"; \ X ) >> /etc/rc.local; \ X echo ""; \ X--- 48,62 ---- X ) >> /etc/rc.shutdown; \ X chmod 744 /etc/rc.shutdown; \ X fi; \ X! grep -q @prefix@/etc/rc.apcupsd /etc/rc.local; \ X if [ $$? -eq 0 ]; then \ X echo "/etc/rc.local already patched"; \ X else \ X rm -f /etc/rc.local.$$today; \ X cp -p /etc/rc.local /etc/rc.local.$$today; \ X ( echo "# Start the UPS daemon. Do not remove the 'TAG_APCUPSD' text"; \ X! echo "# if [ -x @prefix@/etc/rc.apcupsd ]; then # TAG_APCUPSD"; \ X! echo "# @prefix@/etc/rc.apcupsd start # TAG_APCUPSD"; \ X echo "# fi # TAG_APCUPSD"; \ X ) >> /etc/rc.local; \ X echo ""; \ X*************** X*** 62,75 **** X echo "the commands are currently commented out. You should"; \ X echo "examine the @sysconfdir@/apcupsd.conf file to ensure"; \ X echo "that it is suitable for your site. Then run"; \ X! echo "/etc/rc.apcupsd manually to ensure sane operation."; \ X echo "Once you are satisfied, uncomment the appropriate"; \ X echo "lines in /etc/rc.local" ) | /usr/bin/fmt; \ X fi X X uninstall: X @echo "FreeBSD distribution uninstall" X! rm -f /etc/rc.apcupsd X @-today="`date +%Y%m%d%H%M`"; \ X for f in /etc/rc.local /etc/rc.shutdown; do \ X grep -q '# TAG_APCUPSD' $$f; \ X--- 64,77 ---- X echo "the commands are currently commented out. You should"; \ X echo "examine the @sysconfdir@/apcupsd.conf file to ensure"; \ X echo "that it is suitable for your site. Then run"; \ X! echo "@prefix@/etc/rc.apcupsd manually to ensure sane operation."; \ X echo "Once you are satisfied, uncomment the appropriate"; \ X echo "lines in /etc/rc.local" ) | /usr/bin/fmt; \ X fi X X uninstall: X @echo "FreeBSD distribution uninstall" X! rm -f @prefix@/etc/rc.apcupsd X @-today="`date +%Y%m%d%H%M`"; \ X for f in /etc/rc.local /etc/rc.shutdown; do \ X grep -q '# TAG_APCUPSD' $$f; \ END-of-/usr/ports/sysutils/apcupsd/files/patch-b echo x - /usr/ports/sysutils/apcupsd/files/patch-c sed 's/^X//' >/usr/ports/sysutils/apcupsd/files/patch-c << 'END-of-/usr/ports/sysutils/apcupsd/files/patch-c' X*** /var/tmp/apcupsd-3.8.2/configure Tue Jul 3 21:37:07 2001 X--- configure Wed Oct 24 14:28:50 2001 X*************** X*** 11,17 **** X ac_help= X ac_default_prefix=/usr/local X # Any additions from configure.in: X- ac_default_prefix=/usr X ac_help="$ac_help X --enable-pthreads Enable pthreads X --disable-pthreads No pthreads (default)" X--- 11,16 ---- X*************** X*** 601,613 **** X ac_configure=$ac_aux_dir/configure # This should be Cygnus configure. X X X- X for ac_prog in true X do X # Extract the first word of "$ac_prog", so it can be a program name with args. X set dummy $ac_prog; ac_word=$2 X echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 X! echo "configure:611: checking for $ac_word" >&5 X if eval "test \"`echo '$''{'ac_cv_path_TRUEPRG'+set}'`\" = set"; then X echo $ac_n "(cached) $ac_c" 1>&6 X else X--- 600,611 ---- X ac_configure=$ac_aux_dir/configure # This should be Cygnus configure. X X X for ac_prog in true X do X # Extract the first word of "$ac_prog", so it can be a program name with args. X set dummy $ac_prog; ac_word=$2 X echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 X! echo "configure:609: checking for $ac_word" >&5 X if eval "test \"`echo '$''{'ac_cv_path_TRUEPRG'+set}'`\" = set"; then X echo $ac_n "(cached) $ac_c" 1>&6 X else X*************** X*** 648,654 **** X # Extract the first word of "$ac_prog", so it can be a program name with args. X set dummy $ac_prog; ac_word=$2 X echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 X! echo "configure:652: checking for $ac_word" >&5 X if eval "test \"`echo '$''{'ac_cv_path_FALSEPRG'+set}'`\" = set"; then X echo $ac_n "(cached) $ac_c" 1>&6 X else X--- 646,652 ---- X # Extract the first word of "$ac_prog", so it can be a program name with args. X set dummy $ac_prog; ac_word=$2 X echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 X! echo "configure:650: checking for $ac_word" >&5 X if eval "test \"`echo '$''{'ac_cv_path_FALSEPRG'+set}'`\" = set"; then X echo $ac_n "(cached) $ac_c" 1>&6 X else X*************** X*** 689,703 **** X export PATH X X if test x$sysconfdir = x'${prefix}/etc' ; then X! sysconfdir='/etc/apcupsd' X fi X X if test x$sbindir = x'${exec_prefix}/sbin' ; then X! sbindir='/sbin' X fi X X X- X # Extract the first word of "gcc", so it can be a program name with args. X set dummy gcc; ac_word=$2 X echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 X--- 687,703 ---- X export PATH X X if test x$sysconfdir = x'${prefix}/etc' ; then X! sysconfdir="${prefix}/etc/apcupsd" X fi X X+ if test x$exec_prefix = x'NONE' || test x$exec_prefix = x'${prefix}'; then X+ eval "exec_prefix=${prefix}" X+ fi X if test x$sbindir = x'${exec_prefix}/sbin' ; then X! eval "sbindir=${exec_prefix}/sbin" X fi X X X # Extract the first word of "gcc", so it can be a program name with args. X set dummy gcc; ac_word=$2 X echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 X*************** X*** 1158,1164 **** X test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}' X X test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' X! for ac_prog in gawk mawk nawk awk X do X # Extract the first word of "$ac_prog", so it can be a program name with args. X set dummy $ac_prog; ac_word=$2 X--- 1158,1164 ---- X test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}' X X test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' X! for ac_prog in mawk gawk nawk awk X do X # Extract the first word of "$ac_prog", so it can be a program name with args. X set dummy $ac_prog; ac_word=$2 X*************** X*** 3796,3802 **** X if { (eval echo configure:3797: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then X for file in conftest.*; do X case $file in X! *.c | *.o | *.obj) ;; X *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;; X esac X done X--- 3796,3802 ---- X if { (eval echo configure:3797: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then X for file in conftest.*; do X case $file in X! *.c | *.C | *.o | *.obj) ;; X *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;; X esac X done X*************** X*** 6616,6621 **** X--- 6616,6625 ---- X # X case "$DISTNAME" in X alpha) X+ if test "$with_pthreads" != no; then X+ PTHREAD_LFLAGS="-lpthread -lexc" X+ fi X+ X DISTVER=`uname -r` X SERIALDEV=/dev/tty01 X LOCKDIR=/var/spool/locks X*************** X*** 7471,7514 **** X rm -fr confdefs* $ac_clean_files X test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1 X X- X- eval srcdir=${srcdir} X- eval sbindir=${sbindir} X- eval sysconfdir=${sysconfdir} X- eval mandir=${mandir} X- X- echo " X- X- Configuration: X- X- Apcupsd version: ${VERSION} (${DATE}) X- Source code location: ${srcdir} X- Install binaries: ${sbindir} X- Install config files: ${sysconfdir} X- Install man files: ${mandir} X- Nologin file in: ${nologdir} X- PID directory: ${PIDDIR} X- LOG dir (events, status) ${LOGDIR} X- LOCK dir (for serial port) ${LOCKDIR} X- Power Fail dir ${PWRFAILDIR} X- Compiler: ${CC} X- Compiler flags: ${CFLAGS} ${PTHREAD_FLAGS} X- Loader flags: ${LDFLAGS} ${PTHREAD_LFLAGS} X- Host and version: ${DISTNAME} ${DISTVER} X- Serial device ${SERIALDEV} X- Network Info Port (CGI) ${NISPORT} X- Master/slave Port ${NETPORT} X- UPSTYPE ${UPSTYPE} X- UPSCABLE ${UPSCABLE} X- X- enable-cgi: ${CGI} X- with-cgi-bin: ${CGIBIN} X- with-css-dir: ${CSS_DIR} X- with-libwrap: ${with_libwrap} X- enable-nls: ${USE_NLS} X- enable-libintl: ${USE_INCLUDED_LIBINTL} X- enable-powerflute: ${USE_POWERFLUTE} X- enable-pthreads: ${with_pthreads} X- " X X touch ${srcdir}/config.h X--- 7475,7479 ---- END-of-/usr/ports/sysutils/apcupsd/files/patch-c echo x - /usr/ports/sysutils/apcupsd/files/configure.in.patch sed 's/^X//' >/usr/ports/sysutils/apcupsd/files/configure.in.patch << 'END-of-/usr/ports/sysutils/apcupsd/files/configure.in.patch' X*** /var/tmp/configure.in Wed Oct 24 17:19:04 2001 X--- configure.in Wed Oct 24 17:19:09 2001 X*************** X*** 10,16 **** X AC_CONFIG_HEADER(config.h:autoconf/config.h.in) dnl Config header file. X AC_CONFIG_AUX_DIR(autoconf) X AC_CONFIG_AUX_DIR(scripts) X! AC_PREFIX_DEFAULT(/usr) X X dnl X dnl These need to be searched before. X--- 10,16 ---- X AC_CONFIG_HEADER(config.h:autoconf/config.h.in) dnl Config header file. X AC_CONFIG_AUX_DIR(autoconf) X AC_CONFIG_AUX_DIR(scripts) X! dnl AC_PREFIX_DEFAULT(/usr) X X dnl X dnl These need to be searched before. X*************** X*** 26,45 **** X export PATH X X dnl X! dnl If the user has not set -sysconfdir, we set our default as /etc/apcupsd X dnl X if test x$sysconfdir = x'${prefix}/etc' ; then X! sysconfdir='/etc/apcupsd' X fi X X dnl X! dnl If the user has not set -sbindir, we set our default as /sbin X dnl X if test x$sbindir = x'${exec_prefix}/sbin' ; then X! sbindir='/sbin' X fi X X- X dnl X dnl Check for local host architecture. X dnl X--- 26,50 ---- X export PATH X X dnl X! dnl If the user has not set -sysconfdir, we set our default as X! dnl ${prefix}/etc/apcupsd X dnl X if test x$sysconfdir = x'${prefix}/etc' ; then X! sysconfdir="${prefix}/etc/apcupsd" X fi X X dnl X! dnl Hack to make sure $exec_prefix is properly substituted X! if test x$exec_prefix = x'NONE' || test x$exec_prefix = x'${prefix}'; then X! eval "exec_prefix=${prefix}" X! fi X! dnl X! dnl If the user has not set -sbindir, we set our default as literal value of ${exec_prefix}/sbin X dnl X if test x$sbindir = x'${exec_prefix}/sbin' ; then X! eval "sbindir=${exec_prefix}/sbin" X fi X X dnl X dnl Check for local host architecture. X dnl X*************** X*** 1088,1132 **** X fi; X fi X ] ) X- X- eval srcdir=${srcdir} X- eval sbindir=${sbindir} X- eval sysconfdir=${sysconfdir} X- eval mandir=${mandir} X- X- echo " X- X- Configuration: X- X- Apcupsd version: ${VERSION} (${DATE}) X- Source code location: ${srcdir} X- Install binaries: ${sbindir} X- Install config files: ${sysconfdir} X- Install man files: ${mandir} X- Nologin file in: ${nologdir} X- PID directory: ${PIDDIR} X- LOG dir (events, status) ${LOGDIR} X- LOCK dir (for serial port) ${LOCKDIR} X- Power Fail dir ${PWRFAILDIR} X- Compiler: ${CC} X- Compiler flags: ${CFLAGS} ${PTHREAD_FLAGS} X- Loader flags: ${LDFLAGS} ${PTHREAD_LFLAGS} X- Host and version: ${DISTNAME} ${DISTVER} X- Serial device ${SERIALDEV} X- Network Info Port (CGI) ${NISPORT} X- Master/slave Port ${NETPORT} X- UPSTYPE ${UPSTYPE} X- UPSCABLE ${UPSCABLE} X- X- enable-cgi: ${CGI} X- with-cgi-bin: ${CGIBIN} X- with-css-dir: ${CSS_DIR} X- with-libwrap: ${with_libwrap} X- enable-nls: ${USE_NLS} X- enable-libintl: ${USE_INCLUDED_LIBINTL} X- enable-powerflute: ${USE_POWERFLUTE} X- enable-pthreads: ${with_pthreads} X- " X X dnl X dnl Touch config.h since the last file updated is Makefile. X--- 1093,1098 ---- END-of-/usr/ports/sysutils/apcupsd/files/configure.in.patch echo x - /usr/ports/sysutils/apcupsd/files/patch-d sed 's/^X//' >/usr/ports/sysutils/apcupsd/files/patch-d << 'END-of-/usr/ports/sysutils/apcupsd/files/patch-d' X*** /var/tmp/apcupsd-3.8.2/cgi/Makefile.in Thu Jun 21 09:16:41 2001 X--- cgi/Makefile.in Wed Oct 24 14:02:51 2001 X*************** X*** 84,89 **** X--- 84,92 ---- X rm -f Makefile config.h X X install: cgi X+ @if test ! -d $(cgibin) ; then \ X+ mkdir -p $(cgibin); \ X+ fi X @for p in $(CGIPROGS) ; do \ X echo $(INSTALL_PROGRAM) $$p $(cgibin); \ X $(INSTALL_PROGRAM) $$p $(cgibin); \ END-of-/usr/ports/sysutils/apcupsd/files/patch-d echo x - /usr/ports/sysutils/apcupsd/pkg-install sed 's/^X//' >/usr/ports/sysutils/apcupsd/pkg-install << 'END-of-/usr/ports/sysutils/apcupsd/pkg-install' X#!/bin/sh X X# Nicked from apcupsd-3.8.2/distributions/freebsd/Makefile X Xtoday=`date +%Y%m%d%H%M` XSED=/bin/sed X Xcase "$2" in X X POST-INSTALL) X grep -q '# TAG_APCUPSD' /etc/rc.shutdown X if [ $? -eq 0 ]; then X echo "/etc/rc.shutdown already patched" X else X echo "patching /etc/rc.shutdown" X rm -f /etc/rc.shutdown.$today X cp -p /etc/rc.shutdown /etc/rc.shutdown.$today X $SED -e '/exit 0/d'< /etc/rc.shutdown.$today > /etc/rc.shutdown X ( echo "# Do not remove the 'TAG_APCUPSD' text, below"; \ X echo "if [ -f /var/run/powerfail ]; then # TAG_APCUPSD";\ X echo " powerdown=YES # TAG_APCUPSD"; \ X echo " echo '' # TAG_APCUPSD"; \ X echo " echo 'Please ensure that the UPS has powered off before' # TAG_APCUPSD"; \ X echo " echo 'rebooting. Otherwise, the UPS may cut the power' # TAG_APCUPSD"; \ X echo " echo 'during the reboot.' # TAG_APCUPSD"; \ X echo " echo '' # TAG_APCUPSD"; \ X echo "fi # TAG_APCUPSD"; \ X echo "exit 0"; \ X ) >> /etc/rc.shutdown X chmod 744 /etc/rc.shutdown; \ X fi; \ X if [ -f /etc/rc.local ] && grep -q $PKG_PREFIX/etc/rc.apcupsd /etc/rc.local && [ $? -eq 0 ] ; then X echo "/etc/rc.local already patched"; X else X rm -f /etc/rc.local.$today X if [ -f /etc/rc.local ]; then X cp -p /etc/rc.local /etc/rc.local.$today X fi X ( echo "# Start the UPS daemon. Do not remove the 'TAG_APCUPSD' text"; \ X echo "# if [ -x /usr/local/etc/rc.apcupsd ]; then # TAG_APCUPSD"; \ X echo "# /usr/local/etc/rc.apcupsd start # TAG_APCUPSD"; \ X echo "# fi # TAG_APCUPSD"; \ X ) >> /etc/rc.local X echo "" X ( echo "While /etc/rc.local has been patched to run apcupsd,";\ X echo "the commands are currently commented out. You should"; \ X echo "examine the /usr/local/etc/apcupsd/apcupsd.conf file to ensure"; \ X echo "that it is suitable for your site. Then run"; \ X echo "/usr/local/etc/rc.apcupsd manually to ensure sane operation."; \ X echo "Once you are satisfied, uncomment the appropriate"; \ X echo "lines in /etc/rc.local" ) | /usr/bin/fmt X fi X ;; X X PRE-INSTALL) X ;; X X *) X ;; X Xesac X Xexit 0 END-of-/usr/ports/sysutils/apcupsd/pkg-install exit >How-To-Repeat: >Fix: >Release-Note: >Audit-Trail: >Unformatted: To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-ports" in the body of the message