diff options
author | Lars Koeller <lkoeller@FreeBSD.org> | 2005-04-15 17:24:04 +0000 |
---|---|---|
committer | Lars Koeller <lkoeller@FreeBSD.org> | 2005-04-15 17:24:04 +0000 |
commit | 92ad9a4c495dc468cd07bb75051e4a624b523469 (patch) | |
tree | 24bd2e652a06aa9f0f95cad1e4c7f343eb3520d9 /sysutils/apcupsd | |
parent | a036ee610d54995a558631e730ab69250ebe2764 (diff) | |
download | ports-92ad9a4c495dc468cd07bb75051e4a624b523469.tar.gz ports-92ad9a4c495dc468cd07bb75051e4a624b523469.zip |
Notes
Diffstat (limited to 'sysutils/apcupsd')
-rw-r--r-- | sysutils/apcupsd/Makefile | 32 | ||||
-rw-r--r-- | sysutils/apcupsd/distinfo | 4 | ||||
-rw-r--r-- | sysutils/apcupsd/pkg-message | 38 | ||||
-rw-r--r-- | sysutils/apcupsd/pkg-plist | 7 |
4 files changed, 48 insertions, 33 deletions
diff --git a/sysutils/apcupsd/Makefile b/sysutils/apcupsd/Makefile index edf4206cfa98..206795afe1d2 100644 --- a/sysutils/apcupsd/Makefile +++ b/sysutils/apcupsd/Makefile @@ -6,8 +6,8 @@ # PORTNAME= apcupsd -PORTVERSION= 3.10.15 -PORTREVISION= 3 +PORTVERSION= 3.10.17 +#PORTREVISION= 0 CATEGORIES= sysutils MASTER_SITES= ${MASTER_SITE_SOURCEFORGE} MASTER_SITE_SUBDIR= ${PORTNAME} @@ -24,15 +24,20 @@ PLIST_SUB= STARTUP_SCRIPT=${STARTUP_SCRIPT} HAS_CONFIGURE= yes CONFIGURE_ARGS= --prefix=${PREFIX} --sbindir=${PREFIX}/sbin \ --with-nologin=/var/run \ - --disable-install-distdir --enable-usb \ + --disable-install-distdir \ --sysconfdir=${PREFIX}/etc/apcupsd \ --with-serial-dev=/dev/usv OPTIONS= CLIENT_ONLY "Build apcupsd client only (no network server)" off -OPTIONS+= CGI "Compile with CGI programms to show status" off +OPTIONS+= CGI "Compile with CGI programms to show status" off +OPTIONS+= USB "Compile with USB Support (READ MANUAL!!!)" off .include <bsd.port.pre.mk> +.if defined(WITH_USB) +CONFIGURE_ARGS+=--enable-usb +.endif + .if defined(WITH_CGI) CONFIGURE_ARGS+=--enable-cgi --with-cgi-bin=${PREFIX}/etc/apcupsd/cgi LIB_DEPENDS+= gd.4:${PORTSDIR}/graphics/gd @@ -61,11 +66,7 @@ PLIST_SUB+= POWERFL="@comment " MAN8= "apcupsd.8" -PORTDOCS= apcupsd.pdf manual.html manual.css \ - apcupsd.png back.png charging.png home.png main_configs.png \ - multimon.png next.png onbatt.png online.png status.png thanks.png \ - wininstall1.png wininstall2.png wininstall3.png wininstall4.png \ - wininstall5.png wininstall6.png wininstall7.png +PORTDOCS= manual.pdf pre-everything:: @${ECHO_MSG} "" @@ -73,6 +74,7 @@ pre-everything:: @${ECHO_MSG} "" @${ECHO_MSG} " WITH_CGI=yes if you want to build CGI support." @${ECHO_MSG} " WITH_CLIENT_ONLY=yes if you only want a network client." + @${ECHO_MSG} " WITH_USB=yes to compile with USB support (READ MANUAL!!!)" @${ECHO_MSG} "" .if defined(WITH_CGI) @${ECHO_MSG} "===> Building with CGI support." @@ -85,8 +87,8 @@ post-configure: ${REINPLACE_CMD} -e "s|%PREFIX%|${PREFIX}|g" ${WRKSRC}/doc/apcupsd.man post-install: - # If the files presaved are identical with the new one, include then in - # the package list. So the port could be removed without problems +# If the files presaved are identical with the new one, include then in +# 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 \ @@ -95,12 +97,12 @@ post-install: fi \ fi; \ done - ${ECHO_CMD} "@unexec if [ -d %D/etc/apcupsd ]; then echo \"If you are permanently removing this port, you should do a ``rm -rf ${PREFIX}/etc/apcupsd`` to remove config files left.\" | fmt ; fi" >> ${TMPPLIST} - # Install sample startup script + ${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} +# Install sample startup script ${INSTALL_SCRIPT} ${FILESDIR}/${STARTUP_SCRIPT} ${PREFIX}/etc/rc.d/${STARTUP_SCRIPT} ${INSTALL_DATA} ${FILESDIR}/apcupsd.conf.net-master.sample ${PREFIX}/etc/apcupsd/ ${INSTALL_DATA} ${FILESDIR}/apcupsd.conf.net-slave.sample ${PREFIX}/etc/apcupsd/ - # If there is already an config file it is installed as ...new +# 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 \ @@ -114,7 +116,7 @@ post-install: .if !defined(NOPORTDOCS) @${MKDIR} ${DOCSDIR} .for filen in ${PORTDOCS} - ${INSTALL_DATA} ${WRKSRC}/doc/docbook/${filen} ${DOCSDIR} + ${INSTALL_DATA} ${WRKSRC}/doc/texi/${filen} ${DOCSDIR} .endfor .endif diff --git a/sysutils/apcupsd/distinfo b/sysutils/apcupsd/distinfo index ceebd7504d0a..d41b4c9a44bd 100644 --- a/sysutils/apcupsd/distinfo +++ b/sysutils/apcupsd/distinfo @@ -1,2 +1,2 @@ -MD5 (apcupsd-3.10.15.tar.gz) = 21b2b744ebcaa0010367a403a9c5e66c -SIZE (apcupsd-3.10.15.tar.gz) = 3858266 +MD5 (apcupsd-3.10.17.tar.gz) = 2a7dab7bebac0912d683f5a14fb4e291 +SIZE (apcupsd-3.10.17.tar.gz) = 5662277 diff --git a/sysutils/apcupsd/pkg-message b/sysutils/apcupsd/pkg-message index c914317b9ca3..8f7ad98c75c4 100644 --- a/sysutils/apcupsd/pkg-message +++ b/sysutils/apcupsd/pkg-message @@ -1,23 +1,33 @@ -************************************************** +********************************************************************** NOTE IF you install a apcupsd server: -Change to /dev and create a softlink to usv from -the serial line the USV is connected to, e.g. +Change to /dev and create a softlink to e.g. ups from the serial line +the USV is connected to, e.g. cd /dev - ln -s cuaa1 usv + ln -s cuaa1 ups -Read the manual to do site specific configuration -assigenments! Especially have a detailed look into -the chapter describing the shutdown procedure. +Read the manual -Sample files are installed in ${PREFIX}/etc/apcupsd: + ${PREFIX}/share/doc/apcupsd/manual.pdf - apcupsd.conf.sample, apcupsd.conf.net-master.sample - apcupsd.conf.net-slave.sample, hosts.conf.sample - multimon.conf.sample and cgi/apcupsd.css.sample +to do site specific configuration assigenments! Especially have a +detailed look into the chapter describing the shutdown procedure. -These files must be copied and/or configured for a -proper working apcupsd. Look into the manual! +Sample files are installed in ${PREFIX}/etc/apcupsd. These files +must be copied and/or configured for a proper working apcupsd. +You need to modify ${PREFIX}/etc/apcupsd/apcupsd.conf as follows: -************************************************** + For serial cable: DEVICE /dev/ups (or /dev/cuaaX) + For USB cable: DEVICE (yes, leave it blank after DEVICE) + +NOTE that for USB cable you must comment out the line + + device uhid # "Human Interface Devices" + +in your kernel configuration file and recompile the kernel. +Your keyboard and mouse will still work. + +WARNING USB support on FreeBSD is still considered BETA! + +********************************************************************** diff --git a/sysutils/apcupsd/pkg-plist b/sysutils/apcupsd/pkg-plist index 7a52f4a6c7ad..af4dffe59064 100644 --- a/sysutils/apcupsd/pkg-plist +++ b/sysutils/apcupsd/pkg-plist @@ -16,13 +16,16 @@ etc/apcupsd/mainsback etc/apcupsd/masterconnect etc/apcupsd/mastertimeout etc/apcupsd/onbattery +%%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/host.conf.sample %D/etc/apcupsd/host.conf; then rm -f %D/etc/apcupsd/host.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%%etc/apcupsd/hosts.conf.sample -%%CGI%%etc/apcupsd/multimon.conf.sample etc/rc.d/%%STARTUP_SCRIPT%% %%CGI%%@dirrm etc/apcupsd/cgi @unexec rmdir %D/etc/apcupsd 2>/dev/null || /usr/bin/true |