aboutsummaryrefslogtreecommitdiff
path: root/sysutils/apcupsd
diff options
context:
space:
mode:
authorIon-Mihai Tetcu <itetcu@FreeBSD.org>2007-10-21 10:39:39 +0000
committerIon-Mihai Tetcu <itetcu@FreeBSD.org>2007-10-21 10:39:39 +0000
commita62bccf85afdbe1164740cf4bcde29c964cdf2f2 (patch)
tree1efa8ec8775b6033ad0becd7f01c9a67d1d189b7 /sysutils/apcupsd
parent64ae7ba97f35598b6712ec76797fd5af9e339471 (diff)
downloadports-a62bccf85afdbe1164740cf4bcde29c964cdf2f2.tar.gz
ports-a62bccf85afdbe1164740cf4bcde29c964cdf2f2.zip
Notes
Diffstat (limited to 'sysutils/apcupsd')
-rw-r--r--sysutils/apcupsd/Makefile27
-rw-r--r--sysutils/apcupsd/distinfo6
-rw-r--r--sysutils/apcupsd/files/apcupsd.in2
-rw-r--r--sysutils/apcupsd/files/pkg-message.in (renamed from sysutils/apcupsd/pkg-message)6
-rw-r--r--sysutils/apcupsd/pkg-plist40
5 files changed, 42 insertions, 39 deletions
diff --git a/sysutils/apcupsd/Makefile b/sysutils/apcupsd/Makefile
index 1cdd5ed66a72..e94e9f1affea 100644
--- a/sysutils/apcupsd/Makefile
+++ b/sysutils/apcupsd/Makefile
@@ -6,7 +6,7 @@
#
PORTNAME= apcupsd
-PORTVERSION= 3.14.1
+PORTVERSION= 3.14.2
CATEGORIES= sysutils
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE:S/$/:src_sf/g} \
http://sce-tindy.tecnik93.com/FreeBSD/ports/${PORTNAME}/sources/:src_bk \
@@ -21,14 +21,16 @@ IGNOREFILES= ${PORTNAME}.pdf
MAINTAINER= itetcu@FreeBSD.org
COMMENT= A daemon for controlling APC UPS
-USE_GETTEXT= yes
+BUILD_DEPENDS= makedepend:${PORTSDIR}/devel/makedepend
+
USE_RC_SUBR= apcupsd
+SUB_FILES= pkg-message
GNU_CONFIGURE= yes
CONFIGURE_ARGS= --sbindir=${PREFIX}/sbin \
--with-nologin=/var/run \
--disable-install-distdir \
- --sysconfdir=${PREFIX}/etc/apcupsd \
+ --sysconfdir=${ETCDIR} \
--with-serial-dev=/dev/usv
CONFIGURE_ENV= CPPFLAGS="-I${LOCALBASE}/include -L${LOCALBASE}/lib" \
@@ -51,7 +53,7 @@ CONFIGURE_ARGS+= --enable-net
.endif
.if defined(WITH_CGI)
-CONFIGURE_ARGS+= --enable-cgi --with-cgi-bin=${PREFIX}/etc/apcupsd/cgi
+CONFIGURE_ARGS+= --enable-cgi --with-cgi-bin=${ETCDIR}/cgi
LIB_DEPENDS+= gd.4:${PORTSDIR}/graphics/gd
PLIST_SUB+= CGI=""
.else
@@ -79,21 +81,21 @@ post-install:
# the package list. So the port could be removed without problems
for na in apccontrol commfailure mainsback mastertimeout \
changeme commok masterconnect onbattery; do \
- if [ -f ${PREFIX}/etc/apcupsd/$$na.orig ]; then \
- if cmp -s ${PREFIX}/etc/apcupsd/$$na ${PREFIX}/etc/apcupsd/$$na.orig; then \
- ${ECHO_CMD} "etc/apcupsd/$$na.orig" >> ${TMPPLIST}; \
+ if [ -f ${ETCDIR}/$$na.orig ]; then \
+ if cmp -s ${ETCDIR}/$$na ${ETCDIR}/$$na.orig; then \
+ ${ECHO_CMD} "%%ETCDIR%%/$$na.orig" >> ${TMPPLIST}; \
fi \
fi; \
done
- @${ECHO_CMD} "@unexec if [ -d %D/etc/apcupsd ]; then ${ECHO_CMD} \"If you are permanently removing this port, you should do a ``rm -rf ${PREFIX}/etc/apcupsd`` to remove config files left.\" | ${FMT} ; fi" >> ${TMPPLIST}
+ @${ECHO_CMD} "@unexec if [ -d %D/${ETCDIR_REL} ]; then ${ECHO_CMD} \"If you are permanently removing this port, you should do a ``rm -rf ${ETCDIR}`` to remove config files left.\" | ${FMT} ; fi" >> ${TMPPLIST}
# Install sample startup script
# If there is already a config file it is installed as ...new
for na in apcupsd.conf apcupsd.css hosts.conf multimon.conf; do \
- if [ -f ${PREFIX}/etc/apcupsd/$$na ]; then \
- if [ -f ${PREFIX}/etc/apcupsd/$$na.new ]; then \
- ${MV} ${PREFIX}/etc/apcupsd/$$na.new ${PREFIX}/etc/apcupsd/$$na.sample; \
+ if [ -f ${ETCDIR}/$$na ]; then \
+ if [ -f ${ETCDIR}/$$na.new ]; then \
+ ${MV} ${ETCDIR}/$$na.new ${ETCDIR}/$$na.sample; \
else \
- ${CP} ${PREFIX}/etc/apcupsd/$$na ${PREFIX}/etc/apcupsd/$$na.sample; \
+ ${CP} ${ETCDIR}/$$na ${ETCDIR}/$$na.sample; \
fi; \
fi; \
done
@@ -101,5 +103,6 @@ post-install:
@${MKDIR} ${DOCSDIR}
cd ${DISTDIR} && ${INSTALL_DATA} ${PORTNAME}.pdf ${DOCSDIR}
.endif
+ @${CAT} ${PKGMESSAGE}
.include <bsd.port.post.mk>
diff --git a/sysutils/apcupsd/distinfo b/sysutils/apcupsd/distinfo
index 7224c63b9faa..374e637e5dbf 100644
--- a/sysutils/apcupsd/distinfo
+++ b/sysutils/apcupsd/distinfo
@@ -1,5 +1,5 @@
-MD5 (apcupsd-3.14.1.tar.gz) = 258eb7515a12de493bb8952bc6d2f4e1
-SHA256 (apcupsd-3.14.1.tar.gz) = 3d68ce2c387194a8d6d2afae40dbaa0c02a87992ac1bdbd2495b1b610266c123
-SIZE (apcupsd-3.14.1.tar.gz) = 4352400
+MD5 (apcupsd-3.14.2.tar.gz) = fd8785e7607d20cefa68dc20e44eebc4
+SHA256 (apcupsd-3.14.2.tar.gz) = 72605e54356ffe32dc24159b4094a5b7e5e978d2440edded8b01496af9caca50
+SIZE (apcupsd-3.14.2.tar.gz) = 4345034
MD5 (apcupsd.pdf) = IGNORE
SHA256 (apcupsd.pdf) = IGNORE
diff --git a/sysutils/apcupsd/files/apcupsd.in b/sysutils/apcupsd/files/apcupsd.in
index 0f82cfb9e4a2..09f6cee2a6b0 100644
--- a/sysutils/apcupsd/files/apcupsd.in
+++ b/sysutils/apcupsd/files/apcupsd.in
@@ -28,7 +28,7 @@ load_rc_config $name
: ${apcupsd_lockfile="/var/spool/lock/apcupsd.lock"}
pidfile="/var/run/apcupsd.pid"
-required_files="%%PREFIX%%/etc/apcupsd/apcupsd.conf"
+required_files="%%ETCDIR%%/apcupsd.conf"
command="%%PREFIX%%/sbin/apcupsd"
run_rc_command "$1"
diff --git a/sysutils/apcupsd/pkg-message b/sysutils/apcupsd/files/pkg-message.in
index 5e9629f52a54..ad709025e578 100644
--- a/sysutils/apcupsd/pkg-message
+++ b/sysutils/apcupsd/files/pkg-message.in
@@ -1,14 +1,14 @@
**********************************************************************
Read the manual
- ${PREFIX}/share/doc/apcupsd/manual.pdf
+ %%DOCSDIR%%/manual.pdf
to do site specific configuration assigenments! Especially have a
detailed look into the chapter describing the shutdown procedure.
-Sample files are installed in ${PREFIX}/etc/apcupsd. These files
+Sample files are installed in %%ETCDIR%%. These files
must be copied and/or configured for a proper working apcupsd.
-You need to modify ${PREFIX}/etc/apcupsd/apcupsd.conf as follows:
+You need to modify %%ETCDIR%%/apcupsd.conf as follows:
For serial cable: DEVICE /dev/cuadX (or /dev/cuaaX for [45.]x)
For USB cable: DEVICE (yes, leave it blank after DEVICE)
diff --git a/sysutils/apcupsd/pkg-plist b/sysutils/apcupsd/pkg-plist
index 02253d04466d..a520a0e81f68 100644
--- a/sysutils/apcupsd/pkg-plist
+++ b/sysutils/apcupsd/pkg-plist
@@ -3,23 +3,23 @@ sbin/apcaccess
sbin/apctest
sbin/smtp
%%POWERFL%%sbin/powerflute
-@unexec if cmp -s %D/etc/apcupsd/apcupsd.conf.sample %D/etc/apcupsd/apcupsd.conf; then rm -f %D/etc/apcupsd/apcupsd.conf; fi
-etc/apcupsd/apcupsd.conf.sample
-etc/apcupsd/apccontrol
-etc/apcupsd/changeme
-etc/apcupsd/commfailure
-etc/apcupsd/commok
-etc/apcupsd/onbattery
-etc/apcupsd/offbattery
-%%CGI%%@unexec if cmp -s %D/etc/apcupsd/apcupsd.css.sample %D/etc/apcupsd/apcupsd.css; then rm -f %D/etc/apcupsd/apcupsd.css; fi
-%%CGI%%etc/apcupsd/apcupsd.css.sample
-%%CGI%%@unexec if cmp -s %D/etc/apcupsd/hosts.conf.sample %D/etc/apcupsd/hosts.conf; then rm -f %D/etc/apcupsd/hosts.conf; fi
-%%CGI%%etc/apcupsd/hosts.conf.sample
-%%CGI%%@unexec if cmp -s %D/etc/apcupsd/multimon.conf.sample %D/etc/apcupsd/multimon.conf; then rm -f %D/etc/apcupsd/multimon.conf; fi
-%%CGI%%etc/apcupsd/multimon.conf.sample
-%%CGI%%etc/apcupsd/cgi/multimon.cgi
-%%CGI%%etc/apcupsd/cgi/upsfstats.cgi
-%%CGI%%etc/apcupsd/cgi/upsimage.cgi
-%%CGI%%etc/apcupsd/cgi/upsstats.cgi
-%%CGI%%@dirrm etc/apcupsd/cgi
-@dirrmtry etc/apcupsd
+@unexec if cmp -s %D/%%ETCDIR%%/apcupsd.conf.sample %D/%%ETCDIR%%/apcupsd.conf; then rm -f %D/%%ETCDIR%%/apcupsd.conf; fi
+%%ETCDIR%%/apcupsd.conf.sample
+%%ETCDIR%%/apccontrol
+%%ETCDIR%%/changeme
+%%ETCDIR%%/commfailure
+%%ETCDIR%%/commok
+%%ETCDIR%%/onbattery
+%%ETCDIR%%/offbattery
+%%CGI%%@unexec if cmp -s %D/%%ETCDIR%%/apcupsd.css.sample %D/%%ETCDIR%%/apcupsd.css; then rm -f %D/%%ETCDIR%%/apcupsd.css; fi
+%%CGI%%%%ETCDIR%%/apcupsd.css.sample
+%%CGI%%@unexec if cmp -s %D/%%ETCDIR%%/hosts.conf.sample %D/%%ETCDIR%%/hosts.conf; then rm -f %D/%%ETCDIR%%/hosts.conf; fi
+%%CGI%%%%ETCDIR%%/hosts.conf.sample
+%%CGI%%@unexec if cmp -s %D/%%ETCDIR%%/multimon.conf.sample %D/%%ETCDIR%%/multimon.conf; then rm -f %D/%%ETCDIR%%/multimon.conf; fi
+%%CGI%%%%ETCDIR%%/multimon.conf.sample
+%%CGI%%%%ETCDIR%%/cgi/multimon.cgi
+%%CGI%%%%ETCDIR%%/cgi/upsfstats.cgi
+%%CGI%%%%ETCDIR%%/cgi/upsimage.cgi
+%%CGI%%%%ETCDIR%%/cgi/upsstats.cgi
+%%CGI%%@dirrm %%ETCDIR%%/cgi
+@dirrmtry %%ETCDIR%%