diff options
author | itetcu <itetcu@FreeBSD.org> | 2011-08-03 01:05:43 +0800 |
---|---|---|
committer | itetcu <itetcu@FreeBSD.org> | 2011-08-03 01:05:43 +0800 |
commit | 46c7cf04325d383da0da1b5096dbd4079508cdd8 (patch) | |
tree | 30409d3882403e8a2a5e495cda0c774a875f3f62 /sysutils | |
parent | 288de0e0b56c6cd632e4e2f51633573e7f3c25db (diff) | |
download | freebsd-ports-gnome-46c7cf04325d383da0da1b5096dbd4079508cdd8.tar.gz freebsd-ports-gnome-46c7cf04325d383da0da1b5096dbd4079508cdd8.tar.zst freebsd-ports-gnome-46c7cf04325d383da0da1b5096dbd4079508cdd8.zip |
Update to 2.6.1. Main changes:
- IPv6 always compiled in (drop IPV6 option)
- megatec and megatec_usb drivers replaced by blazer_ser and blazer_usb.
- liebertgxt2 renamed to liebert-esp2
- s/PREFIX/LOCALBASE/ for gd includes/libs (grrr!)
- add OPTIONal bash completion
PR: 152866 [1], 157925 [2],
Submitted by: John Bayly <freebsd.ports@tipstrade.net> [1], lev@ [2]
Diffstat (limited to 'sysutils')
-rw-r--r-- | sysutils/nut/Makefile | 55 | ||||
-rw-r--r-- | sysutils/nut/distinfo | 8 | ||||
-rw-r--r-- | sysutils/nut/files/extra-patch-m4_nut_check_libusb.m4 | 31 | ||||
-rw-r--r-- | sysutils/nut/files/nut.sh.in | 6 | ||||
-rw-r--r-- | sysutils/nut/files/nut_upsmon.sh.in | 6 | ||||
-rw-r--r-- | sysutils/nut/files/patch-clients-Makefile.in | 11 | ||||
-rw-r--r-- | sysutils/nut/files/patch-clients-upssched.c | 11 | ||||
-rw-r--r-- | sysutils/nut/files/patch-clients__Makefile.in | 11 | ||||
-rw-r--r-- | sysutils/nut/files/patch-data__html__Makefile.in (renamed from sysutils/nut/files/patch-data-html-Makefile.in) | 20 | ||||
-rw-r--r-- | sysutils/nut/files/patch-m4-nut_check_ipv6.m4 | 13 | ||||
-rw-r--r-- | sysutils/nut/pkg-plist | 12 |
11 files changed, 74 insertions, 110 deletions
diff --git a/sysutils/nut/Makefile b/sysutils/nut/Makefile index 54a3e97a5603..e607b3418555 100644 --- a/sysutils/nut/Makefile +++ b/sysutils/nut/Makefile @@ -6,8 +6,7 @@ # PORTNAME= nut -PORTVERSION= 2.4.1 -PORTREVISION= 7 +PORTVERSION= 2.6.1 CATEGORIES= sysutils MASTER_SITES= http://www.networkupstools.org/source/${PORTVERSION:R}/ DISTFILES= ${DISTNAME}${EXTRACT_SUFX} ${DISTNAME}${EXTRACT_SUFX}.sig @@ -26,14 +25,14 @@ NUT_USER?= uucp NUT_GROUP?= uucp STATEDIR?= /var/db/nut -OPTIONS= SERIAL "SERIAL support" on \ - USB "USB support" on \ - SNMP "SNMP support" on \ +OPTIONS= SERIAL "SERIAL support" on \ + USB "USB support" on \ + SNMP "SNMP support" on \ NEON "NEON XML/HTTP support" on \ - PDU "Powerman PDU support" off \ - HAL "HAL support" off \ - IPV6 "IPV6 support" on \ - CGI "Web CGI interface" off + PDU "Powerman PDU support" off \ + HAL "HAL support" off \ + CGI "Web CGI interface" off \ + BASH "Bash Completion support" off USE_RC_SUBR= nut.sh nut_upsmon.sh nut_upslog.sh SUB_LIST+= STATEDIR=${STATEDIR} @@ -45,7 +44,7 @@ MAN3= upscli_connect.3 upscli_disconnect.3 upscli_fd.3 \ upscli_splitname.3 upscli_ssl.3 upscli_strerror.3 \ upscli_upserror.3 upsclient.3 -MAN5= ups.conf.5 upsd.conf.5 upsd.users.5 upsmon.conf.5 \ +MAN5= nut.conf.5 ups.conf.5 upsd.conf.5 upsd.users.5 upsmon.conf.5 \ upssched.conf.5 MAN8= nutupsdrv.8 upsc.8 upscmd.8 upsd.8 upsdrvctl.8 \ @@ -76,8 +75,8 @@ CGIDIR?= ${PREFIX}/www/cgi-bin/${PORTNAME} CGIDIR_REL?= ${CGIDIR:S,^${PREFIX}/,,} CONFIGURE_ARGS+= --with-cgi --with-cgipath=${CGIDIR} \ --with-htmlpath=${WWWDIR} \ - --with-gd-includes=-I${PREFIX}/include \ - --with-gd-libs="-L${PREFIX}/lib -lgd" + --with-gd-includes=-I${LOCALBASE}/include \ + --with-gd-libs="-L${LOCALBASE}/lib -lgd" PLIST_SUB+= NUT_CGI="" PLIST_SUB+= CGIDIR="${CGIDIR_REL}" PLIST_SUB+= CGIETCDIR="etc/nut/" @@ -88,13 +87,13 @@ PLIST_SUB+= NUT_CGI="@comment " .if !defined(WITHOUT_SERIAL) CONFIGURE_ARGS+= --with-serial -MAN8+= apcsmart.8 bcmxcp.8 belkin.8 belkinunv.8 \ - bestuferrups.8 bestups.8 bestfcom.8 blazer.8 cyberpower.8 \ +MAN8+= apcsmart.8 bestfortress.8 bcmxcp.8 belkin.8 belkinunv.8 \ + bestuferrups.8 bestups.8 bestfcom.8 blazer.8 clone.8 \ dummy-ups.8 etapro.8 everups.8 gamatronic.8 genericups.8 \ - isbmex.8 liebert.8 masterguard.8 megatec.8 metasys.8 \ - mge-shut.8 mge-utalk.8 microdowell.8 oneac.8 optiups.8 \ - powercom.8 powerpanel.8 rhino.8 safenet.8 solis.8 tripplite.8 \ - tripplitesu.8 upscode2.8 victronups.8 + isbmex.8 ivtscd.8 liebert.8 liebert-esp2.8 masterguard.8 \ + metasys.8 mge-shut.8 mge-utalk.8 microdowell.8 oneac.8 \ + optiups.8 powercom.8 powerpanel.8 rhino.8 safenet.8 solis.8 \ + tripplite.8 tripplitesu.8 upscode2.8 victronups.8 PLIST_SUB+= NUT_SERIAL="" .else CONFIGURE_ARGS+= --without-serial @@ -105,11 +104,10 @@ PLIST_SUB+= NUT_SERIAL="@comment " . if ${OSVERSION} < 800069 LIB_DEPENDS+= usb-0.1.8:${PORTSDIR}/devel/libusb . else -EXTRA_PATCHES= ${FILESDIR}/extra-patch-m4_nut_check_libusb.m4 +#EXTRA_PATCHES= ${FILESDIR}/extra-patch-m4_nut_check_libusb.m4 . endif CONFIGURE_ARGS+= --with-usb=auto -MAN8+= bcmxcp_usb.8 megatec_usb.8 richcomm_usb.8 tripplite_usb.8 \ - usbhid-ups.8 +MAN8+= bcmxcp_usb.8 richcomm_usb.8 tripplite_usb.8 usbhid-ups.8 PLIST_SUB+= NUT_USB="" .else CONFIGURE_ARGS+= --without-usb @@ -151,7 +149,8 @@ PLIST_SUB+= NUT_PDU="@comment " BROKEN= HAL is only usable with USB support enabled. Run 'make config' again! . endif LIB_DEPENDS+= hal.1:${PORTSDIR}/sysutils/hal -CONFIGURE_ARGS+= --with-hal +CONFIGURE_ARGS+= --with-hal \ + --with-hal-callouts-path=${PREFIX}/libexec #MAN8+= PLIST_SUB+= NUT_HAL="" .else @@ -159,10 +158,11 @@ CONFIGURE_ARGS+= --without-hal PLIST_SUB+= NUT_HAL="@comment " .endif -.if !defined(WITHOUT_IPV6) -CONFIGURE_ARGS+= --with-ipv6 +.if defined(WITH_BASH) +RUN_DEPENDS+= ${LOCALBASE}/bin/bash_completion.sh:${PORTSDIR}/shells/bash-completion +PLIST_SUB+= BASH="" .else -CONFIGURE_ARGS+= --without-ipv6 +PLIST_SUB+= BASH="@comment " .endif post-patch: @@ -177,10 +177,13 @@ pre-install: .if !defined(NOPORTDOCS) post-install: +.if defined(WITH_BASH) + ${INSTALL_DATA} ${WRKSRC}/scripts/misc/nut.bash_completion ${PREFIX}/etc/bash_completion.d/ +.endif @${MKDIR} ${DOCSDIR}/cables ${INSTALL_DATA} ${WRKSRC}/docs/cables/*.txt ${DOCSDIR}/cables ${INSTALL_DATA} ${WRKSRC}/docs/*.txt ${DOCSDIR} - ${INSTALL_DATA} ${WRKSRC}/docs/FAQ ${DOCSDIR} + ${INSTALL_DATA} ${WRKSRC}/docs/FAQ.txt ${DOCSDIR} .for file in AUTHORS COPYING ChangeLog INSTALL MAINTAINERS NEWS README UPGRADING ${INSTALL_DATA} ${WRKSRC}/${file} ${DOCSDIR} .endfor diff --git a/sysutils/nut/distinfo b/sysutils/nut/distinfo index d0e4392383c9..5302b0a8e072 100644 --- a/sysutils/nut/distinfo +++ b/sysutils/nut/distinfo @@ -1,4 +1,4 @@ -SHA256 (nut-2.4.1.tar.gz) = 9e2441e1a7046627715cfe78e22f82f7bb05bf380735f803731b64e06bd19f3c -SIZE (nut-2.4.1.tar.gz) = 1121152 -SHA256 (nut-2.4.1.tar.gz.sig) = 9e3e116b8f51e452d9af9b77d310b097096e8078a22c73a1ee3a0cb934ab64a5 -SIZE (nut-2.4.1.tar.gz.sig) = 72 +SHA256 (nut-2.6.1.tar.gz) = f5c46b856c0cf5b7f0e4b22d82b670af64cc98717a90eaac8723dd402a181c00 +SIZE (nut-2.6.1.tar.gz) = 1776645 +SHA256 (nut-2.6.1.tar.gz.sig) = 780be2a54fcd4df1124f8dcec4e49df3c1c7a985e030856dbe63fd77d0e76ea8 +SIZE (nut-2.6.1.tar.gz.sig) = 72 diff --git a/sysutils/nut/files/extra-patch-m4_nut_check_libusb.m4 b/sysutils/nut/files/extra-patch-m4_nut_check_libusb.m4 deleted file mode 100644 index d6a89d6d8198..000000000000 --- a/sysutils/nut/files/extra-patch-m4_nut_check_libusb.m4 +++ /dev/null @@ -1,31 +0,0 @@ ---- m4/nut_check_libusb.m4.orig 2009-03-07 23:56:24.000000000 +0300 -+++ m4/nut_check_libusb.m4 2009-03-07 23:57:04.000000000 +0300 -@@ -17,24 +17,12 @@ - - dnl Check for libusb libs and flags - AC_MSG_CHECKING(for libusb cflags) -- CFLAGS=`libusb-config --cflags 2>/dev/null` -- if (test "$?" != "0") -- then -- AC_MSG_RESULT(not found) -- nut_have_libusb=no -- else -- AC_MSG_RESULT(${CFLAGS}) -- fi -+ CFLAGS="" -+ AC_MSG_RESULT(${CFLAGS}) - - AC_MSG_CHECKING(for libusb libs) -- LDFLAGS=`libusb-config --libs 2>/dev/null` -- if (test "$?" != "0") -- then -- AC_MSG_RESULT(not found) -- nut_have_libusb=no -- else -- AC_MSG_RESULT(${LDFLAGS}) -- fi -+ LDFLAGS="-lusb" -+ AC_MSG_RESULT(${LDFLAGS}) - - if test "${nut_have_libusb}" = "yes"; then - LIBUSB_CFLAGS="${CFLAGS}" diff --git a/sysutils/nut/files/nut.sh.in b/sysutils/nut/files/nut.sh.in index 8f6a85b8389e..1aa66a56732f 100644 --- a/sysutils/nut/files/nut.sh.in +++ b/sysutils/nut/files/nut.sh.in @@ -41,4 +41,10 @@ nut_poststop() { ${nut_prefix}/libexec/nut/upsdrvctl stop } +extra_commands=reload +reload() +{ + kill -HUP `cat $pidfile` +} + run_rc_command "$1" diff --git a/sysutils/nut/files/nut_upsmon.sh.in b/sysutils/nut/files/nut_upsmon.sh.in index c047ea2cf8d1..e1836ac174c1 100644 --- a/sysutils/nut/files/nut_upsmon.sh.in +++ b/sysutils/nut/files/nut_upsmon.sh.in @@ -31,4 +31,10 @@ command="${nut_upsmon_prefix}/sbin/upsmon" pidfile="%%STATEDIR%%/upsmon.pid" nut_upsmon_flags=${nut_upsmon_flags-"localhost"} +extra_commands=reload +reload() +{ + ${command} -c reload +} + run_rc_command "$1" diff --git a/sysutils/nut/files/patch-clients-Makefile.in b/sysutils/nut/files/patch-clients-Makefile.in deleted file mode 100644 index 5f1ff8b9b730..000000000000 --- a/sysutils/nut/files/patch-clients-Makefile.in +++ /dev/null @@ -1,11 +0,0 @@ ---- clients/Makefile.in.orig 2007-07-05 15:21:22.000000000 +0200 -+++ clients/Makefile.in 2007-08-28 15:25:39.000000000 +0200 -@@ -440,7 +440,7 @@ - done - install-cgiexecPROGRAMS: $(cgiexec_PROGRAMS) - @$(NORMAL_INSTALL) -- test -z "$(cgiexecdir)" || $(MKDIR_P) "$(DESTDIR)$(cgiexecdir)" -+ test -z "$(cgiexec_PROGRAMS)" -o -z "$(cgiexecdir)" || $(MKDIR_P) "$(DESTDIR)$(cgiexecdir)" - @list='$(cgiexec_PROGRAMS)'; for p in $$list; do \ - p1=`echo $$p|sed 's/$(EXEEXT)$$//'`; \ - if test -f $$p \ diff --git a/sysutils/nut/files/patch-clients-upssched.c b/sysutils/nut/files/patch-clients-upssched.c deleted file mode 100644 index 1d2129b03d53..000000000000 --- a/sysutils/nut/files/patch-clients-upssched.c +++ /dev/null @@ -1,11 +0,0 @@ ---- clients/upssched.c.orig 2009-02-19 20:01:40.000000000 +0100 -+++ clients/upssched.c 2009-02-19 20:02:00.000000000 +0100 -@@ -595,7 +595,7 @@ - int pipefd, ret; - struct sockaddr_un saddr; - -- memset(&sa, '\0', sizeof(saddr)); -+ memset(&saddr, '\0', sizeof(saddr)); - saddr.sun_family = AF_UNIX; - snprintf(saddr.sun_path, sizeof(saddr.sun_path), "%s", pipefn); - diff --git a/sysutils/nut/files/patch-clients__Makefile.in b/sysutils/nut/files/patch-clients__Makefile.in new file mode 100644 index 000000000000..f979934d2d2d --- /dev/null +++ b/sysutils/nut/files/patch-clients__Makefile.in @@ -0,0 +1,11 @@ +--- ./clients/Makefile.in.orig 2011-01-14 21:59:12.000000000 +0200 ++++ ./clients/Makefile.in 2011-05-22 13:48:02.993038232 +0300 +@@ -486,7 +486,7 @@ + rm -f $$list + install-cgiexecPROGRAMS: $(cgiexec_PROGRAMS) + @$(NORMAL_INSTALL) +- test -z "$(cgiexecdir)" || $(MKDIR_P) "$(DESTDIR)$(cgiexecdir)" ++ test -z "$(cgiexec_PROGRAMS)" -o -z "$(cgiexecdir)" || $(MKDIR_P) "$(DESTDIR)$(cgiexecdir)" + @list='$(cgiexec_PROGRAMS)'; test -n "$(cgiexecdir)" || list=; \ + for p in $$list; do echo "$$p $$p"; done | \ + sed 's/$(EXEEXT)$$//' | \ diff --git a/sysutils/nut/files/patch-data-html-Makefile.in b/sysutils/nut/files/patch-data__html__Makefile.in index da43f2a417c5..750851894626 100644 --- a/sysutils/nut/files/patch-data-html-Makefile.in +++ b/sysutils/nut/files/patch-data__html__Makefile.in @@ -1,20 +1,20 @@ ---- data/html/Makefile.in.orig 2007-07-05 15:21:23.000000000 +0200 -+++ data/html/Makefile.in 2007-08-28 15:25:08.000000000 +0200 -@@ -285,7 +285,7 @@ - uninstall-info-am: +--- ./data/html/Makefile.in.orig 2011-05-22 13:48:44.069749930 +0300 ++++ ./data/html/Makefile.in 2011-05-22 13:49:55.668124441 +0300 +@@ -299,7 +299,7 @@ + -rm -rf .libs _libs install-dist_htmlDATA: $(dist_html_DATA) @$(NORMAL_INSTALL) - test -z "$(htmldir)" || $(MKDIR_P) "$(DESTDIR)$(htmldir)" + test -z "$(dist_html_DATA)" -o -z "$(htmldir)" || $(MKDIR_P) "$(DESTDIR)$(htmldir)" - @list='$(dist_html_DATA)'; for p in $$list; do \ + @list='$(dist_html_DATA)'; test -n "$(htmldir)" || list=; \ + for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ - f=$(am__strip_dir) \ -@@ -302,7 +302,7 @@ - done +@@ -319,7 +319,7 @@ + cd "$(DESTDIR)$(htmldir)" && rm -f $$files install-nodist_htmlDATA: $(nodist_html_DATA) @$(NORMAL_INSTALL) - test -z "$(htmldir)" || $(MKDIR_P) "$(DESTDIR)$(htmldir)" + test -z "$(nodist_html_DATA)" -o -z "$(htmldir)" || $(MKDIR_P) "$(DESTDIR)$(htmldir)" - @list='$(nodist_html_DATA)'; for p in $$list; do \ + @list='$(nodist_html_DATA)'; test -n "$(htmldir)" || list=; \ + for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ - f=$(am__strip_dir) \ diff --git a/sysutils/nut/files/patch-m4-nut_check_ipv6.m4 b/sysutils/nut/files/patch-m4-nut_check_ipv6.m4 deleted file mode 100644 index fa12e98b55d3..000000000000 --- a/sysutils/nut/files/patch-m4-nut_check_ipv6.m4 +++ /dev/null @@ -1,13 +0,0 @@ ---- m4/nut_check_ipv6.m4.orig 2007-03-15 21:19:05.000000000 +0100 -+++ m4/nut_check_ipv6.m4 2007-10-15 11:42:02.000000000 +0200 -@@ -22,7 +22,9 @@ - struct in6_addr], - [:], - [nut_have_ipv6=no], -- [#include <netdb.h>]) -+ [#include <netdb.h> -+ #include <sys/socket.h> -+ #include <netinet/in.h>]) - - dnl AC_CHECK_MEMBERS([struct in6_addr.s6_addr32], - dnl [:], diff --git a/sysutils/nut/pkg-plist b/sysutils/nut/pkg-plist index 214429a02810..3e757171b078 100644 --- a/sysutils/nut/pkg-plist +++ b/sysutils/nut/pkg-plist @@ -6,6 +6,7 @@ bin/upscmd bin/upslog bin/upsrw bin/upssched-cmd +%%BASH%%etc/bash_completion.d/nut.bash_completion etc/nut/cmdvartab etc/nut/driver.list etc/nut/nut.conf.sample @@ -16,14 +17,16 @@ etc/nut/upsmon.conf.sample etc/nut/upssched.conf.sample include/parseconf.h include/upsclient.h +lib/libupsclient.a lib/libupsclient.so.1 lib/libupsclient.so lib/libupsclient.la +%%NUT_HAL%%libexec/hald-addon-blazer_usb %%NUT_HAL%%libexec/hald-addon-bcmxcp_usb -%%NUT_HAL%%libexec/hald-addon-megatec_usb %%NUT_HAL%%libexec/hald-addon-tripplite_usb %%NUT_HAL%%libexec/hald-addon-usbhid-ups %%NUT_SERIAL%%libexec/nut/apcsmart +%%NUT_SERIAL%%libexec/nut/bestfortress %%NUT_SERIAL%%libexec/nut/bcmxcp %%NUT_USB%%libexec/nut/bcmxcp_usb %%NUT_SERIAL%%libexec/nut/belkin @@ -33,17 +36,18 @@ lib/libupsclient.la %%NUT_SERIAL%%libexec/nut/bestups %%NUT_SERIAL%%libexec/nut/blazer_ser %%NUT_USB%%libexec/nut/blazer_usb -%%NUT_SERIAL%%libexec/nut/cyberpower +%%NUT_SERIAL%%libexec/nut/clone +%%NUT_SERIAL%%libexec/nut/clone-outlet %%NUT_SERIAL%%libexec/nut/dummy-ups %%NUT_SERIAL%%libexec/nut/etapro %%NUT_SERIAL%%libexec/nut/everups %%NUT_SERIAL%%libexec/nut/gamatronic %%NUT_SERIAL%%libexec/nut/genericups %%NUT_SERIAL%%libexec/nut/isbmex +%%NUT_SERIAL%%libexec/nut/ivtscd %%NUT_SERIAL%%libexec/nut/liebert +%%NUT_SERIAL%%libexec/nut/liebert-esp2 %%NUT_SERIAL%%libexec/nut/masterguard -%%NUT_SERIAL%%libexec/nut/megatec -%%NUT_USB%%libexec/nut/megatec_usb %%NUT_SERIAL%%libexec/nut/metasys %%NUT_SERIAL%%libexec/nut/mge-shut %%NUT_SERIAL%%libexec/nut/mge-utalk |