Репозиторий Sisyphus
Последнее обновление: 1 октября 2023 | Пакетов: 18631 | Посещений: 37408268
en ru br
Репозитории ALT
S:4.3.30-alt2
5.1: 4.3.16-alt0.M51.1
www.altlinux.org/Changes

Группа :: Мониторинг
Пакет: xymon

 Главная   Изменения   Спек   Патчи   Sources   Загрузить   Gear   Bugs and FR  Repocop 

Патч: xymon_trunk.configureclient.patch
Скачать


--- configure.client.fix	2012-05-22 17:14:36.173710191 -0700
+++ configure.client	2012-05-22 17:41:48.023766470 -0700
@@ -7,6 +7,47 @@
 echo "Configuration script for Xymon client"
 echo ""
 
+while test "$1" != ""
+do
+	OPT="$1"; shift
+
+	case "$OPT" in
+	  "--help")
+	  	cat <<EOF
+  To configure Xymon client, the following options are available:
+     --pcreinclude DIRECTORY  : Specify location of PCRE include files
+     --pcrelib DIRECTORY      : Specify location of PCRE libraries
+     --zlibinclude DIRECTORY  : Specify location of ZLIB include files
+     --zliblib DIRECTORY      : Specify location of ZLIB libraries
+     --sslinclude DIRECTORY   : Specify location of OpenSSL include files
+     --ssllib DIRECTORY       : Specify location of OpenSSL libraries
+
+  The script will search a number of standard directories for
+  all of these files, so you normally do not have to specify any options.
+EOF
+		exit 0
+		;;
+	  "--pcreinclude")
+	  	USERPCREINC="$1"; shift
+		;;
+	  "--pcrelib")
+	  	USERPCRELIB="$1"; shift
+		;;
+	  "--zlibinclude")
+	  	USERZLIBINC="$1"; shift
+		;;
+	  "--zliblib")
+	  	USERZLIBLIB="$1"; shift
+		;;
+	  "--sslinclude")
+	  	USEROSSLINC="$1"; shift
+		;;
+	  "--ssllib")
+	  	USEROSSLLIB="$1"; shift
+		;;
+	esac
+done
+
 if test -r Makefile
 then
 	echo "Already configured - remove Makefile to re-configure"
@@ -46,6 +87,9 @@
 fi
 echo ""
 
+
+echo "Checking pre-requisites for building Xymon"
+echo ""
 if test "$CONFTYPE" = "client"
 then
 	echo "Checking for the PCRE libraries"
@@ -53,6 +97,42 @@
 	echo ""
 fi
 echo ""
+. build/zlib.sh
+echo ""; echo ""
+
+if test "$SSLOK" = "NO"
+then
+	ENABLESSL="n"
+	SSLDEF=""
+else
+	. build/ssl.sh
+	echo ""
+	echo "Xymon client can use the OpenSSL library to send SSL-encrypted reports"
+	echo "If you have the OpenSSL library installed, I recommend that you enable this."
+	echo ""
+	echo "Do you want to be able to send SSL-enabled reports (y) ?"
+	if test "$ENABLESSL" = ""
+	then
+		read ENABLESSL
+	fi
+	if test "$ENABLESSL" = "" -o "$ENABLESSL" = "y"
+	then
+		ENABLESSL="y"
+		SSLDEF="-DHAVE_OPENSSL"
+		if test "$OSSL2OK" = "Y"
+		then
+			SSLDEF="$SSLDEF -DHAVE_SSLV2_SUPPORT=1"
+		fi
+	else
+		ENABLESSL="n"
+		SSLDEF=""
+	fi
+	echo ""
+fi
+echo ""; echo "";
+
+. build/clock-gettime-librt.sh
+echo ""; echo ""
 
 MAKE="$MAKE -s" ./build/lfs.sh
 if test $? -eq 0; then
@@ -62,10 +142,9 @@
 fi
 echo ""; echo ""
 
-MAKE="$MAKE -s" . ./build/clock-gettime-librt.sh
-echo ""; echo ""
+# Pre-requisites completed.
 
-MAKE="$MAKE -s" . ./build/zlib.sh
+echo "Setting up for a Xymon server"
 echo ""; echo ""
 
 echo "What userid will be running Xymon [xymon] ?"
@@ -172,6 +251,53 @@
 echo "LFSDEF = $LFS"                     >>Makefile
 echo "LIBRTDEF = $LIBRTDEF"              >>Makefile
 
+if test "$CONFTYPE" = "client"
+then
+echo ""                                  >>Makefile
+echo "# PCRE settings"                   >>Makefile
+    if test "$PCREINC" != ""; then
+	echo "PCREINCDIR = -I$PCREINC"   >>Makefile
+    fi
+    if test "$PCRELIB" != ""; then
+	echo "PCRELIBS = -L$PCRELIB -lpcre" >>Makefile
+	echo "RPATHVAL += ${PCRELIB}"       >>Makefile
+    else
+	echo "PCRELIBS = -lpcre"         >>Makefile
+    fi
+fi
+echo ""                                  >>Makefile
+echo "# ZLIB settings"                   >>Makefile
+if test "$ZLIBOK" = "YES"
+then
+    if test "$ZLIBINC" != ""; then
+	echo "ZLIBINCDIR = -I$ZLIBINC"   >>Makefile
+    fi
+    if test "$ZLIBLIB" != ""; then
+	echo "ZLIBLIBS = -L$ZLIBLIB -lz" >>Makefile
+	echo "RPATHVAL += ${ZLIBLIB}"    >>Makefile
+    else
+	echo "ZLIBLIBS = -lz"            >>Makefile
+    fi
+fi
+echo ""                                  >>Makefile
+echo "# OpenSSL settings"                >>Makefile
+if test "$ENABLESSL" = "y"
+then
+    echo "SSLFLAGS = $SSLFLAGS"          >>Makefile
+    if test "$SSLINC" != ""; then
+	echo "SSLINCDIR = -I$SSLINC"     >>Makefile
+    fi
+    if test "$OSSLLIB" != ""; then
+	echo "SSLLIBS = -L$OSSLLIB -lssl -lcrypto" >>Makefile
+	echo "RPATHVAL += ${OSSLLIB}"    >>Makefile
+    else
+	echo "SSLLIBS = -lssl -lcrypto"  >>Makefile
+    fi
+fi
+echo "#"                                 >>Makefile
+
+
+
 echo "" >>Makefile
 if test -r build/Makefile.`uname -s`
 then
@@ -213,14 +339,6 @@
 	echo "INSTALLSTATICWWWDIR = $INSTALLSTATICWWWDIR"   >>Makefile
 fi
 echo "" >>Makefile
-if test "$CONFTYPE" = "client"
-then
-	echo "# PCRE settings"                   >>Makefile
-	echo "PCREINCDIR = -I$PCREINC"           >>Makefile
-	echo "PCRELIBS = -L$PCRELIB -lpcre"      >>Makefile
-	echo "RPATHVAL += ${PCRELIB}"            >>Makefile
-fi
-echo "#"                                 >>Makefile
 echo "# Add local CFLAGS etc. settings here" >>Makefile
 echo "" >>Makefile
 echo "include build/Makefile.rules" >> Makefile
 
дизайн и разработка: Vladimir Lettiev aka crux © 2004-2005, Andrew Avramenko aka liks © 2007-2008
текущий майнтейнер: Michael Shigorin