summaryrefslogtreecommitdiff
path: root/sysutils/apcupsd
diff options
context:
space:
mode:
authorLars Koeller <lkoeller@FreeBSD.org>2001-12-05 21:15:26 +0000
committerLars Koeller <lkoeller@FreeBSD.org>2001-12-05 21:15:26 +0000
commitfe5ee9a8f361a9829682546ff616fbe4ca56f1c9 (patch)
tree65f6e785e974c4a67f690955931e3c4caac8b96b /sysutils/apcupsd
parentUpdate this to build with proper dependancies again. (diff)
* Add missing patch file to compile correctly with libwrap
* Use --disable-install-distdir instead of patching Makefile * Bump port revision
Notes
Notes: svn path=/head/; revision=51091
Diffstat (limited to 'sysutils/apcupsd')
-rw-r--r--sysutils/apcupsd/Makefile4
-rw-r--r--sysutils/apcupsd/files/patch-ab17
-rw-r--r--sysutils/apcupsd/files/patch-ac64
3 files changed, 66 insertions, 19 deletions
diff --git a/sysutils/apcupsd/Makefile b/sysutils/apcupsd/Makefile
index 0ed95fdc0692..7af172e4ac71 100644
--- a/sysutils/apcupsd/Makefile
+++ b/sysutils/apcupsd/Makefile
@@ -7,7 +7,7 @@
PORTNAME= apcupsd
PORTVERSION= 3.8.3
-PORTREVISION= 2
+PORTREVISION= 3
CATEGORIES= sysutils
MASTER_SITES= ftp://ftp.apcupsd.org/pub/apcupsd/stable/tar/
@@ -20,7 +20,7 @@ PLIST_SUB= STARTUP_SCRIPT=${STARTUP_SCRIPT}
HAS_CONFIGURE= yes
CONFIGURE_ARGS= --prefix=${PREFIX} --sbindir=${PREFIX}/sbin \
- --enable-nls \
+ --enable-nls --disable-install-distdir \
--sysconfdir=${PREFIX}/etc/apcupsd \
--with-serial-dev=/dev/usv \
--enable-cgi --with-cgi-bin=${PREFIX}/etc/apcupsd/cgi
diff --git a/sysutils/apcupsd/files/patch-ab b/sysutils/apcupsd/files/patch-ab
index 2c4847cf9d5b..a55ca19eba17 100644
--- a/sysutils/apcupsd/files/patch-ab
+++ b/sysutils/apcupsd/files/patch-ab
@@ -1,23 +1,6 @@
*** Makefile.in.orig Sat Nov 24 09:23:03 2001
--- Makefile.in Sun Dec 2 11:47:56 2001
***************
-*** 196,202 ****
- install-:
- $(MAKE) dummy
-
-! install: install-apcupsd@WIN32@ install-@POWERFLUTE@ install-cgi @INSTALL_DISTDIR@
-
- install-powerflute: powerflute
- @echo "Installing powerflute binary..."
---- 196,202 ----
- install-:
- $(MAKE) dummy
-
-! install: install-apcupsd@WIN32@ install-@POWERFLUTE@ install-cgi
-
- install-powerflute: powerflute
- @echo "Installing powerflute binary..."
-***************
*** 219,249 ****
@echo "Installing apcaccess binary..."
$(INSTALL_PROGRAM) $(srcdir)/apcaccess $(sbindir)/apcaccess
diff --git a/sysutils/apcupsd/files/patch-ac b/sysutils/apcupsd/files/patch-ac
new file mode 100644
index 000000000000..23e0cf5d7dee
--- /dev/null
+++ b/sysutils/apcupsd/files/patch-ac
@@ -0,0 +1,64 @@
+*** apcnisd.c.orig Sat Apr 28 09:12:05 2001
+--- apcnisd.c Mon Dec 3 22:05:08 2001
+***************
+*** 68,79 ****
+--- 68,84 ----
+ #include <sys/socket.h>
+ #include <netinet/in.h>
+ #include <arpa/inet.h>
++ #ifdef HAVE_LIBWRAP
++ #include <tcpd.h>
++ #endif
+
+ #define NETD_VERSION "1.0"
+
+ char *pname;
+
+ UPSINFO myUPS;
++ UPSINFO *core_ups = &myUPS;;
++ char argvalue[MAXSTRING];
+ static char largebuf[4096];
+ static int stat_recs;
+ static int logstats = 0;
+***************
+*** 82,87 ****
+--- 87,124 ----
+ void handle_client_request();
+ int do_daemon(int argc, char *argv[]);
+ int do_inetd(int argc, char *argv[]);
++ int check_wrappers(char *av, int newsock);
++
++ #ifdef HAVE_LIBWRAP
++ int allow_severity = LOG_INFO;
++ int deny_severity = LOG_WARNING;
++
++ int check_wrappers(char *av, int newsock)
++ {
++ struct request_info req;
++ char *av0;
++
++ if (strchr(av, '/'))
++ av0 = strrchr(av, '/');
++ else
++ av0 = av;
++
++ request_init(&req, RQ_DAEMON, av0, RQ_FILE, newsock, NULL);
++ fromhost(&req);
++ if (!hosts_access(&req)) {
++ log_event(core_ups, LOG_WARNING,
++ _("Connection from %.500s refused by tcp_wrappers."),
++ eval_client(&req));
++ return FAILURE;
++ }
++ #ifdef I_WANT_LOTS_OF_LOGGING
++ log_event(core_ups, LOG_NOTICE, "connect from %.500s", eval_client(&req));
++ #endif
++ return SUCCESS;
++ }
++
++ #endif /* HAVE_LIBWRAP */
++
+
+ void error_cleanup(UPSINFO *ups)
+ {
+