Update to 3.14.4.
Notable changes are: - it now builds using gmake - NLS and POWERFLUTE are removed - POLLTIME directive to control UPS polling interval. This directive specifies the number of seconds to delay between polling the UPS for status. Previously, NETTIME allowed this to be adjusted for network connections only (snmp, pcnet, nis-net). POLLTIME configures the delay for all connection types. NETTIME is accepted as a synonym for compatibility with old config files. - you can now use the graphical client via GAPCMON OPTION - it won't build on anything pre 6.3R Tested by: Stefan Lambrev <stefan.lambrev@moneybookers.com>
This commit is contained in:
parent
2da42908d7
commit
8f93fe176d
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=216669
6 changed files with 37 additions and 61 deletions
|
@ -6,8 +6,7 @@
|
|||
#
|
||||
|
||||
PORTNAME= apcupsd
|
||||
PORTVERSION= 3.14.3
|
||||
PORTREVISION= 2
|
||||
PORTVERSION= 3.14.4
|
||||
CATEGORIES= sysutils
|
||||
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE:S/$/:src_sf/g} \
|
||||
http://T32.TecNik93.com/FreeBSD/ports/${PORTNAME}/sources/:src_bk \
|
||||
|
@ -22,12 +21,11 @@ EXTRACT_ONLY= ${DISTNAME}${EXTRACT_SUFX}
|
|||
MAINTAINER= itetcu@FreeBSD.org
|
||||
COMMENT= Set of programs for controlling APC UPS
|
||||
|
||||
BUILD_DEPENDS= makedepend:${PORTSDIR}/devel/makedepend
|
||||
|
||||
USE_RC_SUBR= apcupsd
|
||||
SUB_FILES= pkg-message
|
||||
|
||||
GNU_CONFIGURE= yes
|
||||
USE_GMAKE= yes
|
||||
CONFIGURE_ARGS= --sbindir=${PREFIX}/sbin \
|
||||
--with-nologin=/var/run \
|
||||
--disable-install-distdir \
|
||||
|
@ -44,18 +42,17 @@ OPTIONS= APCSMART_DRV "Compile APC SmartUPS serial driver" on \
|
|||
APCDUMB_DRV "Compile dumb UPS driver" on \
|
||||
CLIENT_ONLY "Only NIS client (no network server or drivers)" off \
|
||||
CGI "Compile with CGI programms to show status" off \
|
||||
NLS "Enable Native Language Support" off \
|
||||
PCNET_DRV "Compile PowerChute Network Shutdown driver" on \
|
||||
POWERFLUTE "Compile powerflute program" on \
|
||||
USB "Compile with USB Support driver" on \
|
||||
SNMP_DRV "Compile with SNMP driver" on \
|
||||
TCP_WRAPPERS "Compile with TCP_WRAPPERS support" on\
|
||||
TEST_DRV "Compile TEST driver" off \
|
||||
# GAPCMON "Build GTK GUI front-end" off
|
||||
GAPCMON "Build GTK GUI front-end" off
|
||||
# POWERFLUTE "Compile powerflute program" off
|
||||
|
||||
PORTDOCS= ${PORTNAME}.pdf
|
||||
|
||||
.include <bsd.port.pre.mk>
|
||||
.include <bsd.port.options.mk>
|
||||
|
||||
.ifdef(WITH_APCSMART_DRV)
|
||||
CONFIGURE_ARGS+= --enable-apcsmart
|
||||
|
@ -83,16 +80,12 @@ PLIST_SUB+= CGI=""
|
|||
PLIST_SUB+= CGI="@comment "
|
||||
.endif
|
||||
|
||||
#.ifdef(WITH_GAPCMON)
|
||||
#CONFIGURE_ARGS+= --enable-gapcmon
|
||||
#.endif
|
||||
|
||||
.ifndef(WITHOUT_NLS)
|
||||
USE_GETTEXT= yes
|
||||
CONFIGURE_ARGS+= --enable-nls
|
||||
PLIST_SUB+= NLS=""
|
||||
.ifdef(WITH_GAPCMON)
|
||||
CONFIGURE_ARGS+= --enable-gapcmon
|
||||
USE_GNOME+= gconf2
|
||||
PLIST_SUB+= GAPCMON=""
|
||||
.else
|
||||
PLIST_SUB+= NLS="@comment "
|
||||
PLIST_SUB+= GAPCMON="@comment "
|
||||
.endif
|
||||
|
||||
.ifdef(WITH_PCNET_DRV)
|
||||
|
@ -101,6 +94,7 @@ CONFIGURE_ARGS+= --enable-pcnet
|
|||
CONFIGURE_ARGS+= --disable-pcnet
|
||||
.endif
|
||||
|
||||
# disabled upstream
|
||||
.ifdef(WITH_POWERFLUTE)
|
||||
CONFIGURE_ARGS+= --enable-powerflute
|
||||
CONFIGURE_ENV+= LIBS+="-lcurses -lmenu"
|
||||
|
@ -132,6 +126,8 @@ CONFIGURE_ARGS+= --enable-test
|
|||
#CONFIGURE_ENV+= LIBS="-lcurses -lmenu"
|
||||
#PLIST_SUB+= POWERFL=""
|
||||
|
||||
.include <bsd.port.pre.mk>
|
||||
|
||||
pre-configure:
|
||||
.if defined(WITH_CLIENT_ONLY) && ( defined(WITH_APCSMART_DRV) || \
|
||||
defined(WITH_APCDUMB_DRV) || defined(WITH_PCNET_DRV) || \
|
||||
|
@ -171,7 +167,7 @@ post-install:
|
|||
done
|
||||
.if !defined(NOPORTDOCS)
|
||||
@${MKDIR} ${DOCSDIR}
|
||||
cd ${DISTDIR} && ${INSTALL_DATA} ${PORTNAME}.pdf ${DOCSDIR}
|
||||
${INSTALL_DATA} ${DISTDIR}/${PORTNAME}.pdf ${DOCSDIR}
|
||||
.endif
|
||||
@${CAT} ${PKGMESSAGE}
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
MD5 (apcupsd-3.14.3.tar.gz) = a212351d21828e9344264614c7ad8ba1
|
||||
SHA256 (apcupsd-3.14.3.tar.gz) = 01b8f4219ff91044600afd78842ac93cb40f034cf00cd25144fe918db80eed88
|
||||
SIZE (apcupsd-3.14.3.tar.gz) = 4350109
|
||||
MD5 (apcupsd-3.14.4.tar.gz) = 78811129db1a882b9a2b9afd540470b3
|
||||
SHA256 (apcupsd-3.14.4.tar.gz) = c76f0967f665474c774a77f5f3a99bf1f24505be24418fca76bb1dbd0a925596
|
||||
SIZE (apcupsd-3.14.4.tar.gz) = 4196027
|
||||
MD5 (apcupsd.pdf) = d81946b0b2c2e8cc651fb217e521f4bf
|
||||
SHA256 (apcupsd.pdf) = 3fde7947a45bf65572c1c84dfd6df6ca9f9ce24e559c50cf3e5e53172ab17c97
|
||||
SIZE (apcupsd.pdf) = 1074251
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
--- src/apcaccess.c.orig 2007-08-03 18:17:38.000000000 +0300
|
||||
+++ src/apcaccess.c 2008-02-27 09:30:39.352400647 +0200
|
||||
@@ -62,11 +62,19 @@
|
||||
--- ./src/apcaccess.c.orig 2008-01-27 18:22:58.000000000 +0200
|
||||
+++ ./src/apcaccess.c 2008-06-29 14:17:12.000000000 +0300
|
||||
@@ -68,11 +68,19 @@
|
||||
int main(int argc, char **argv)
|
||||
{
|
||||
int mode = 0;
|
||||
|
@ -20,7 +20,7 @@
|
|||
if (argc < 2) {
|
||||
/* Assume user wants "status" */
|
||||
mode = 2;
|
||||
@@ -87,6 +95,20 @@
|
||||
@@ -94,8 +102,23 @@
|
||||
*p++ = 0;
|
||||
port = atoi(p);
|
||||
}
|
||||
|
@ -40,9 +40,12 @@
|
|||
+ }
|
||||
}
|
||||
|
||||
+
|
||||
if (!*host || strcmp(host, "0.0.0.0") == 0)
|
||||
@@ -101,5 +123,7 @@
|
||||
Error_abort0(_("Strange mode\n"));
|
||||
host = "localhost";
|
||||
|
||||
@@ -108,5 +131,7 @@
|
||||
return 1;
|
||||
}
|
||||
|
||||
+ detach_ups(ups);
|
||||
|
|
|
@ -1,32 +0,0 @@
|
|||
--- ./src/drivers/usb/bsd/bsd-usb.c.orig 2007-10-27 20:15:14.000000000 +0300
|
||||
+++ ./src/drivers/usb/bsd/bsd-usb.c 2008-03-29 20:21:50.000000000 +0200
|
||||
@@ -351,9 +351,9 @@
|
||||
|
||||
int pusb_ups_get_capabilities(UPSINFO *ups, const struct s_known_info *known_info)
|
||||
{
|
||||
- int i, rc, ci, phys;
|
||||
+ int i, ci, phys, input, feature;
|
||||
USB_DATA *my_data = (USB_DATA *)ups->driver_internal_data;
|
||||
- hid_item_t item;
|
||||
+ hid_item_t item, witem;
|
||||
USB_INFO *info;
|
||||
|
||||
write_lock(ups);
|
||||
@@ -506,7 +506,7 @@
|
||||
|
||||
// Store a (possibly truncated) copy of the floating point value in the
|
||||
// integer field as well.
|
||||
- val.iValue = val.dValue;
|
||||
+ val.iValue = (int) val.dValue;
|
||||
|
||||
Dmsg4(200, "Def val=%d exp=%d dVal=%f ci=%d\n", info->value,
|
||||
exponent, val.dValue, info->ci);
|
||||
@@ -775,7 +775,7 @@
|
||||
return true;
|
||||
}
|
||||
|
||||
-int pusb_write_int_to_ups(UPSINFO *ups, int ci, int value, char *name)
|
||||
+int pusb_write_int_to_ups(UPSINFO *ups, int ci, int value, const char *name)
|
||||
{
|
||||
USB_DATA *my_data = (USB_DATA *)ups->driver_internal_data;
|
||||
USB_INFO *info;
|
|
@ -1,5 +1,5 @@
|
|||
--- ./src/powerflute.c.orig 2008-04-05 15:12:15.000000000 +0300
|
||||
+++ ./src/powerflute.c 2008-04-05 15:12:29.000000000 +0300
|
||||
--- ./src/powerflute.c.orig 2008-01-27 18:22:57.000000000 +0200
|
||||
+++ ./src/powerflute.c 2008-06-29 14:16:28.000000000 +0300
|
||||
@@ -28,12 +28,12 @@
|
||||
#ifdef HAVE_POWERFLUTE
|
||||
|
||||
|
|
|
@ -22,4 +22,13 @@ sbin/smtp
|
|||
%%CGI%%%%ETCDIR%%/cgi/upsimage.cgi
|
||||
%%CGI%%%%ETCDIR%%/cgi/upsstats.cgi
|
||||
%%CGI%%@dirrm %%ETCDIR%%/cgi
|
||||
%%GAPCMON%%bin/gapcmon
|
||||
%%GAPCMON%%share/applications/gapcmon.desktop
|
||||
%%GAPCMON%%share/pixmaps/apcupsd.png
|
||||
%%GAPCMON%%share/pixmaps/charging.png
|
||||
%%GAPCMON%%share/pixmaps/gapc_prefs.png
|
||||
%%GAPCMON%%share/pixmaps/onbatt.png
|
||||
%%GAPCMON%%share/pixmaps/online.png
|
||||
%%GAPCMON%%share/pixmaps/unplugged.png
|
||||
%%GAPCMON%%@dirrmtry share/applications
|
||||
@dirrmtry %%ETCDIR%%
|
||||
|
|
Loading…
Reference in a new issue