summaryrefslogtreecommitdiff
path: root/sysutils
diff options
context:
space:
mode:
authormartin <martin>2000-12-28 16:07:51 +0000
committermartin <martin>2000-12-28 16:07:51 +0000
commitb2cb8277bdd4fef695ddda4433b9781605be44ab (patch)
tree6146e3a5968313cb1e11d55a75d63f05955a8987 /sysutils
parent8b18744ae7a948904b6da0a73d983305305daa40 (diff)
downloadpkgsrc-b2cb8277bdd4fef695ddda4433b9781605be44ab.tar.gz
Initial import of ups-nut-cgi package from collver@softhome.net;
additional tools for monitoring UPSes using ups-nut and cgi scripts. Closes PR 11746.
Diffstat (limited to 'sysutils')
-rw-r--r--sysutils/ups-nut-cgi/Makefile31
-rw-r--r--sysutils/ups-nut-cgi/files/md53
-rw-r--r--sysutils/ups-nut-cgi/files/patch-sum6
-rw-r--r--sysutils/ups-nut-cgi/patches/patch-aa26
-rw-r--r--sysutils/ups-nut-cgi/patches/patch-ab13
-rw-r--r--sysutils/ups-nut-cgi/patches/patch-ac14
-rw-r--r--sysutils/ups-nut-cgi/patches/patch-ad162
-rw-r--r--sysutils/ups-nut-cgi/pkg/COMMENT1
-rw-r--r--sysutils/ups-nut-cgi/pkg/DESCR1
-rw-r--r--sysutils/ups-nut-cgi/pkg/PLIST7
10 files changed, 264 insertions, 0 deletions
diff --git a/sysutils/ups-nut-cgi/Makefile b/sysutils/ups-nut-cgi/Makefile
new file mode 100644
index 00000000000..b29c0bf88f7
--- /dev/null
+++ b/sysutils/ups-nut-cgi/Makefile
@@ -0,0 +1,31 @@
+# $NetBSD: Makefile,v 1.1.1.1 2000/12/28 16:07:51 martin Exp $
+#
+
+DISTNAME= nut-0.44.2
+PKGNAME= ups-nut-cgi-0.44.2
+CATEGORIES= sysutils
+MASTER_SITES= http://www.exploits.org/nut/release/
+
+MAINTAINER= collver@softhome.net
+HOMEPAGE= http://www.exploits.org/nut/
+
+DEPENDS+= gd-*:../../graphics/gd
+DEPENDS+= ups-nut-0*:../ups-nut
+BUILD_DEPENDS+= ${LOCALBASE}/bin/autoreconf:../../devel/autoconf
+
+WRKSRC= ${WRKDIR}/nut-0.44.2
+
+ALL_TARGET= cgi
+INSTALL_TARGET= install-cgi
+
+GNU_CONFIGURE= yes
+CONFIGURE_ARGS+= --sysconfdir=${LOCALBASE}/etc/nut \
+ --with-state-path=/var/db \
+ --with-cgipath=${LOCALBASE}/share/nut/cgi \
+ --with-graphics=${LOCALBASE}
+
+pre-configure:
+ cd ${WRKSRC}; ${LOCALBASE}/bin/autoreconf --force
+
+.include "../../mk/bsd.prefs.mk"
+.include "../../mk/bsd.pkg.mk"
diff --git a/sysutils/ups-nut-cgi/files/md5 b/sysutils/ups-nut-cgi/files/md5
new file mode 100644
index 00000000000..7743bd6792c
--- /dev/null
+++ b/sysutils/ups-nut-cgi/files/md5
@@ -0,0 +1,3 @@
+$NetBSD: md5,v 1.1.1.1 2000/12/28 16:07:51 martin Exp $
+
+MD5 (nut-0.44.2.tar.gz) = e426128d0a203b6d3dd5f641c2b17fd0
diff --git a/sysutils/ups-nut-cgi/files/patch-sum b/sysutils/ups-nut-cgi/files/patch-sum
new file mode 100644
index 00000000000..cdbe593e673
--- /dev/null
+++ b/sysutils/ups-nut-cgi/files/patch-sum
@@ -0,0 +1,6 @@
+$NetBSD: patch-sum,v 1.1.1.1 2000/12/28 16:07:51 martin Exp $
+
+MD5 (patch-aa) = eee72928d87163bad1bb2c6b155e9e1b
+MD5 (patch-ab) = c37f5a7191a233196603e7fe3812326b
+MD5 (patch-ac) = 51d45ff3376634bd996dce8a436026d0
+MD5 (patch-ad) = a18046f00c6d95800731555e569eb4be
diff --git a/sysutils/ups-nut-cgi/patches/patch-aa b/sysutils/ups-nut-cgi/patches/patch-aa
new file mode 100644
index 00000000000..46b234ad533
--- /dev/null
+++ b/sysutils/ups-nut-cgi/patches/patch-aa
@@ -0,0 +1,26 @@
+$NetBSD: patch-aa,v 1.1.1.1 2000/12/28 16:07:51 martin Exp $
+
+--- Makefile.in.orig Fri Dec 22 19:40:24 2000
++++ Makefile.in Thu Dec 28 16:36:28 2000
+@@ -5,10 +5,10 @@
+ BASEPATH = $(INSTALLROOT)@prefix@
+ CONFPATH = $(INSTALLROOT)@sysconfdir@
+ CGIPATH = $(INSTALLROOT)@CGIPATH@
+-INSTALLDIRS = $(CONFPATH) $(CGIPATH) $(MODELPATH) $(BASEPATH)/@bindir@ $(BASEPATH)/@sbindir@ $(BASEPATH)/misc
++INSTALLDIRS = $(CGIPATH)
+ STATEPATH = $(INSTALLROOT)@STATEPATH@
+
+-SUBDIRS = common models server clients man
++SUBDIRS = common
+ CFLAGS = -I../include @CFLAGS@
+
+ # these are here so they can be overridden during a make install
+@@ -58,7 +58,7 @@
+ $(INSTALLCMD) -d -o $(RUNUID) -g $(RUNGID) $(STATEPATH) || exit 1; \
+ fi
+
+-cgi:
++cgi: build
+ @cd clients; $(MAKE) cgi; cd ..;
+
+ install-cgi: install-dirs
diff --git a/sysutils/ups-nut-cgi/patches/patch-ab b/sysutils/ups-nut-cgi/patches/patch-ab
new file mode 100644
index 00000000000..ebca983818b
--- /dev/null
+++ b/sysutils/ups-nut-cgi/patches/patch-ab
@@ -0,0 +1,13 @@
+$NetBSD: patch-ab,v 1.1.1.1 2000/12/28 16:07:51 martin Exp $
+
+--- clients/Makefile.in.orig Fri Dec 22 19:40:24 2000
++++ clients/Makefile.in Thu Dec 28 16:38:51 2000
+@@ -58,7 +58,7 @@
+ $(CC) $(CFLAGS) -o upsstats.cgi upsstats.c upsfetch.o cgilib.o $(LIBOBJ)
+
+ upsimage.cgi: upsimage.c upsfetch.o cgilib.o $(LIBOBJ)
+- $(CC) $(CFLAGS) -o upsimage.cgi upsimage.c upsfetch.o cgilib.o @GFXLIBS@ -lm $(LIBOBJ)
++ $(CC) $(CFLAGS) @GRAPHICS_INCLUDES@ -o upsimage.cgi upsimage.c upsfetch.o cgilib.o @GRAPHICS_LIBS@ -lm $(LIBOBJ)
+
+ clean:
+ rm -f *~ *.o $(PROGS) $(SPROGS) $(CGIPROGS)
diff --git a/sysutils/ups-nut-cgi/patches/patch-ac b/sysutils/ups-nut-cgi/patches/patch-ac
new file mode 100644
index 00000000000..88988e12a35
--- /dev/null
+++ b/sysutils/ups-nut-cgi/patches/patch-ac
@@ -0,0 +1,14 @@
+$NetBSD: patch-ac,v 1.1.1.1 2000/12/28 16:07:51 martin Exp $
+
+--- acconfig.h.orig Thu Dec 14 13:48:12 2000
++++ acconfig.h Thu Dec 14 13:48:42 2000
+@@ -15,6 +15,9 @@
+ /* default path for model-specific drivers */
+ #define MODELPATH "/usr/local/ups/bin"
+
++/* default path for graphics library files */
++#define GRAPHLIB_PATH "/usr/local"
++
+ /* port number used for network communications */
+ #define UDPPORT 3305
+
diff --git a/sysutils/ups-nut-cgi/patches/patch-ad b/sysutils/ups-nut-cgi/patches/patch-ad
new file mode 100644
index 00000000000..80d4b4ce74d
--- /dev/null
+++ b/sysutils/ups-nut-cgi/patches/patch-ad
@@ -0,0 +1,162 @@
+$NetBSD: patch-ad,v 1.1.1.1 2000/12/28 16:07:51 martin Exp $
+
+--- configure.in.orig Sat Dec 2 17:18:03 2000
++++ configure.in Thu Dec 14 16:26:56 2000
+@@ -11,6 +11,7 @@
+ STATEPATH="/var/state/ups"
+ MODELPATH="$prefix/bin"
+ CGIPATH="$prefix/cgi-bin"
++GRAPHLIB_PATH="/usr/local"
+ RUN_AS_USER="nobody"
+ RUN_AS_GROUP="nogroup"
+ ###
+@@ -61,9 +62,45 @@
+ ], [], [])
+ fi
+
++AC_MSG_CHECKING(graphics library file path)
++AC_ARG_WITH(graphics,
++[ --with-graphics=PATH Path for graphics library files],
++[ case "$withval" in
++ yes|no)
++ AC_MSG_RESULT(using default: $GRAPHLIB_PATH)
++ ;;
++ *)
++ AC_MSG_RESULT($withval)
++ AC_DEFINE_UNQUOTED(GRAPHLIB_PATH, "$withval")
++ GRAPHLIB_PATH=$withval
++ ;;
++ esac],
++ AC_MSG_RESULT(using default: $GRAPHLIB_PATH)
++)
++GRAPHICS_LIBS="-L$GRAPHLIB_PATH/lib"
++GRAPHICS_INCLUDES="-I$GRAPHLIB_PATH/include"
++CFLAGS_save=$CFLAGS
++CPPFLAGS_save=$CPPFLAGS
++CFLAGS="$CFLAGS_save $GRAPHICS_LIBS"
++CPPFLAGS="$CPPFLAGS_save $GRAPHICS_INCLUDES"
++
++dnl Include in case GD was compiled with True Type support
++AC_CHECK_LIB(intl, gettext,
++[ LIBINTL="-lintl"],[ LIBINTL=""] )
++GRAPHICS_LIBS="$GRAPHICS_LIBS $LIBINTL"
++CFLAGS="$CFLAGS_save $GRAPHICS_LIBS"
++
+ dnl Include in case GD was compiled with True Type support
+ AC_CHECK_LIB(ttf, TT_New_Glyph,
+ [ LIBTTF="-lttf"],[ LIBTTF=""] )
++GRAPHICS_LIBS="$GRAPHICS_LIBS $LIBTTF"
++CFLAGS="$CFLAGS_save $GRAPHICS_LIBS"
++
++dnl Include in case GD was compiled with jpeg support
++AC_CHECK_LIB(jpeg, jpeg_abort,
++[ LIBJPEG="-ljpeg"],[ LIBJPEG=""] )
++GRAPHICS_LIBS="$GRAPHICS_LIBS $LIBJPEG"
++CFLAGS="$CFLAGS_save $GRAPHICS_LIBS"
+
+ dnl Include in case GD was compiled with Xpm support
+ AC_CHECK_LIB(X11, XBell,
+@@ -81,67 +118,33 @@
+
+ dnl Include in case GD was compiled with Xpm support
+ AC_CHECK_LIB(Xpm, XpmReadFileToXpmImage,
+- [ LIBXPM="-lXpm"],
+- [
+- echo "Retrying with $LIBX"
+- unset ac_cv_lib_Xpm_XpmReadFileToXpmImage
+- AC_CHECK_LIB(Xpm, XpmReadFileToXpmImage,
+- [ LIBXPM="-lXpm $LIBX" ],
+- [ LIBXPM="" ],
+- [ -lXpm $LIBX ],
+- )
+- ],
+- [ -lXpm ],
++ [ LIBXPM="-lXpm $LIBX"],
++ [ LIBXPM="" ],
++ [ -lXpm $LIBX ],
+ )
++GRAPHICS_LIBS="$GRAPHICS_LIBS $LIBXPM"
++CFLAGS="$CFLAGS_save $GRAPHICS_LIBS"
++
+
+ AC_CHECK_LIB(gd, gdImagePng,
+ [
+- GFXLIBS="-lgd -lpng -lz"
++ LIBGD="$GRAPHICS_LIBS -lgd -lpng -lz"
+ ],
+ [
+- echo "Trying again - using -L/usr/local/lib -I/usr/local/include..."
+- unset ac_cv_lib_gd_gdImagePng
+- CPPFLAGS="$CPPFLAGS -L/usr/local/lib -I/usr/local/include"
+- AC_CHECK_LIB(gd, gdImagePng,
+- [
+- GFXLIBS="-lgd -lpng -lz -L/usr/local/lib -I/usr/local/include"
+- ],
+- [
+- ],
+- [-lm -lpng -lz])
++ AC_MSG_RESULT(
++** You will not be able to build the CGI programs without gd.
++**
++** To get it, visit http://www.boutell.com/gd/
++ )
+ ],
+-[-lm -lpng -lz],
++[$GRAPHICS_LIBS -lm -lpng -lz],
+ )
+-
+-if test "$GFXLIBS" = "" ; then
+- echo "Trying again - using $LIBTTF"
+- unset ac_cv_lib_gd_gdImagePng
+- AC_CHECK_LIB(gd, gdImagePng,
+- [
+- GFXLIBS="-lgd -lpng -lz $LIBTTF"
+- ],
+- [
+- ],
+- [-lm -lpng -lz $LIBTTF])
+-fi
+-
+-if test "$GFXLIBS" = "" ; then
+- echo "Trying again - using $LIBTTF $LIBXPM"
+- unset ac_cv_lib_gd_gdImagePng
+- AC_CHECK_LIB(gd, gdImagePng,
+- [
+- GFXLIBS="-lgd -lpng -lz $LIBTTF $LIBXPM"
+- ],
+- [
+- ],
+- [-lm -lpng -lz $LIBTTF $LIBXPM])
+-fi
+-
+-test "$GFXLIBS" = "" && echo "** You will not be able to build the CGI programs without gd."
+-test "$GFXLIBS" = "" && echo "** "
+-test "$GFXLIBS" = "" && echo "** To get it, visit http://www.boutell.com/gd/"
++GRAPHICS_LIBS="$LIBGD"
++CFLAGS="$CFLAGS_save $GRAPHICS_LIBS"
+
+ AC_CHECK_HEADERS(gd.h gd/gd.h sys/modem.h stdarg.h varargs.h sys/shm.h)
++CFLAGS=$CFLAGS_save
++CPPFLAGS=$CPPFLAGS_save
+
+ dnl Would really like to *test* for the necessity of -R (and how to use
+ dnl it) but I have no clue how :-/
+@@ -151,7 +154,7 @@
+ for lib in `echo $LD_LIBRARY_PATH | $AWK -F: '{ for (i = NF; i > 0; --i) print $i }' | sort | uniq`; do
+ if test -f ${lib}/libpng.so; then
+ AC_CHECK_LIB(png, png_info_init,
+- [ GFXLIBS="-R${lib} $GFXLIBS"
++ [ GRAPHICS_LIBS="-R${lib} $GRAPHICS_LIBS"
+ ],
+ [],
+ [-lm -R${lib}],)
+@@ -310,7 +313,8 @@
+
+ AC_SUBST(LIBOBJ)
+ AC_SUBST(NETLIBS)
+-AC_SUBST(GFXLIBS)
++AC_SUBST(GRAPHICS_LIBS)
++AC_SUBST(GRAPHICS_INCLUDES)
+ AC_SUBST(SERLIBS)
+ AC_SUBST(STATEPATH)
+ AC_SUBST(MODELPATH)
diff --git a/sysutils/ups-nut-cgi/pkg/COMMENT b/sysutils/ups-nut-cgi/pkg/COMMENT
new file mode 100644
index 00000000000..6c9144d5031
--- /dev/null
+++ b/sysutils/ups-nut-cgi/pkg/COMMENT
@@ -0,0 +1 @@
+Network UPS Tools CGI scripts
diff --git a/sysutils/ups-nut-cgi/pkg/DESCR b/sysutils/ups-nut-cgi/pkg/DESCR
new file mode 100644
index 00000000000..5a76a0c57b7
--- /dev/null
+++ b/sysutils/ups-nut-cgi/pkg/DESCR
@@ -0,0 +1 @@
+ups-nut-cgi provides CGI scripts to monitor UPS status via WEB browser.
diff --git a/sysutils/ups-nut-cgi/pkg/PLIST b/sysutils/ups-nut-cgi/pkg/PLIST
new file mode 100644
index 00000000000..2aa74cd90c3
--- /dev/null
+++ b/sysutils/ups-nut-cgi/pkg/PLIST
@@ -0,0 +1,7 @@
+@comment $NetBSD: PLIST,v 1.1.1.1 2000/12/28 16:07:51 martin Exp $
+share/nut/cgi/multimon.cgi
+share/nut/cgi/upsimage.cgi
+share/nut/cgi/upsset.cgi
+share/nut/cgi/upsstats.cgi
+@dirrm share/nut/cgi
+@dirrm share/nut