aboutsummaryrefslogtreecommitdiff
path: root/net-mgmt
diff options
context:
space:
mode:
authorKurt Jaeger <pi@FreeBSD.org>2015-10-28 18:38:28 +0000
committerKurt Jaeger <pi@FreeBSD.org>2015-10-28 18:38:28 +0000
commit680f85adfea280ba4d298023bf4083929de8ed11 (patch)
treef3df127e0570f5e0d4dc1745d0d9ca1ef78e1caa /net-mgmt
parentdc0a634f5c008c44e3cd6e51bb556741dbf453db (diff)
downloadports-680f85adfea280ba4d298023bf4083929de8ed11.tar.gz
ports-680f85adfea280ba4d298023bf4083929de8ed11.zip
New port: net-mgmt/klg
klg is a looking glass written in PHP that can access and report back routing information from Cisco, Juniper and Zebra/Quagga routers. It can also lookup AS numbers to names via WHOIS interfaces, and supports friendly BGP community names via MySQL database. WWW: http://sourceforge.net/projects/klg PR: 204020 Submitted by: Daniel Austin <freebsd-ports@dan.me.uk>
Notes
Notes: svn path=/head/; revision=400408
Diffstat (limited to 'net-mgmt')
-rw-r--r--net-mgmt/Makefile1
-rw-r--r--net-mgmt/klg/Makefile50
-rw-r--r--net-mgmt/klg/distinfo2
-rw-r--r--net-mgmt/klg/files/pkg-message.in44
-rw-r--r--net-mgmt/klg/pkg-descr6
5 files changed, 103 insertions, 0 deletions
diff --git a/net-mgmt/Makefile b/net-mgmt/Makefile
index ba1b1f4adb4d..e68c8698c1e2 100644
--- a/net-mgmt/Makefile
+++ b/net-mgmt/Makefile
@@ -95,6 +95,7 @@
SUBDIR += isic
SUBDIR += jnettop
SUBDIR += kismet
+ SUBDIR += klg
SUBDIR += lanmap
SUBDIR += lg
SUBDIR += librenms
diff --git a/net-mgmt/klg/Makefile b/net-mgmt/klg/Makefile
new file mode 100644
index 000000000000..aba77ac24a7f
--- /dev/null
+++ b/net-mgmt/klg/Makefile
@@ -0,0 +1,50 @@
+# $FreeBSD$
+
+PORTNAME= klg
+PORTVERSION= 1.5
+CATEGORIES= net-mgmt www
+MASTER_SITES= SF \
+ ftp://ftpmirror.uk/freebsd-ports/klg/
+
+MAINTAINER= freebsd-ports@dan.me.uk
+COMMENT= PHP-based looking glass for Cisco, Juniper and Quagga/Zebra routers
+
+LICENSE= BSD3CLAUSE
+
+USES= tar:txz
+USE_MYSQL= yes
+USE_PHP= mysql pcre sockets xml
+WANT_PHP_WEB= yes
+NO_ARCH= yes
+NO_BUILD= yes
+PKGMESSAGE= ${WRKDIR}/pkg-message
+PLIST_FILES= %%DATADIR%%/CREDITS \
+ %%DATADIR%%/ChangeLog \
+ %%DATADIR%%/klg_README.txt \
+ %%DATADIR%%/klg_schema.sql \
+ %%WWWDIR%%/klg.php \
+ "@sample %%WWWDIR%%/klg_config.php.sample" \
+ "@sample %%WWWDIR%%/klg_template.html.sample" \
+ %%WWWDIR%%/klg_router_functions.php
+SUB_FILES+= pkg-message
+
+OPTIONS_DEFINE= SSH2
+OPTIONS_DEFAULT= SSH2
+
+SSH2_DESC= SSH2 support for router access
+
+.include <bsd.port.options.mk>
+
+.if ${PORT_OPTIONS:MSSH2}
+RUN_DEPENDS+= ${PHPBASE}/lib/php/${PHP_EXT_DIR}/ssh2.so:${PORTSDIR}/security/pecl-ssh2
+.endif
+
+do-install:
+ ${MKDIR} ${STAGEDIR}/${WWWDIR} ${STAGEDIR}${DATADIR}
+ ${CP} ${WRKSRC}/CREDITS ${WRKSRC}/ChangeLog ${WRKSRC}/klg_README.txt \
+ ${WRKSRC}/klg_schema.sql ${STAGEDIR}${DATADIR}
+ ${CP} ${WRKSRC}/klg.php ${WRKSRC}/klg_router_functions.php ${STAGEDIR}/${WWWDIR}
+ ${CP} ${WRKSRC}/klg_config.php ${STAGEDIR}/${WWWDIR}/klg_config.php.sample
+ ${CP} ${WRKSRC}/klg_template.html ${STAGEDIR}/${WWWDIR}/klg_template.html.sample
+
+.include <bsd.port.mk>
diff --git a/net-mgmt/klg/distinfo b/net-mgmt/klg/distinfo
new file mode 100644
index 000000000000..95de63884ac5
--- /dev/null
+++ b/net-mgmt/klg/distinfo
@@ -0,0 +1,2 @@
+SHA256 (klg-1.5.txz) = 4f966bb22a940b61f731f423b663bcff541871489958c79ad30e6462465ff582
+SIZE (klg-1.5.txz) = 24431
diff --git a/net-mgmt/klg/files/pkg-message.in b/net-mgmt/klg/files/pkg-message.in
new file mode 100644
index 000000000000..014bcff5d392
--- /dev/null
+++ b/net-mgmt/klg/files/pkg-message.in
@@ -0,0 +1,44 @@
+=======================================================================
+KLG is now installed.
+
+If this is the first installation, you need to configure a few things first.
+
+1. Create the MySQL database, a klg user, and initialise:
+ a) CREATE DATABASE klg;
+ b) CREATE USER 'klg'@'localhost' IDENTIFIED BY 'password';
+ GRANT ALL ON klg.* TO 'klg'@'localhost';
+ FLUSH PRIVILEGES;
+ c) import the schema:
+ mysql -u klg -p klg < %%DATADIR%%/klg_schema.sql
+
+2. Edit %%WWWDIR%%/klg/klg_config.php from the template klg_config.php.sample
+
+ You need to specify the MySQL details from above at the top of the file,
+ and details of your routers further down. Follow the comments in the file.
+
+ You may wish to specify the timezone by adding a line similar to this:
+
+ date_default_timezone_set('Europe/London');
+
+3. Edit %%WWWDIR%%/klg/klg_template.html from the template file to suit your
+ needs. Items in this file are substituted upon execution so you can skin
+ your looking glass to your site.
+
+4. Example Apache 2.4 configuration:
+
+ This assumes you have already configured Apache to serve .php documents.
+
+ Alias /klg "%%WWWDIR%%/klg/"
+
+ <Directory "%%WWWDIR%%/klg/">
+ Require all granted
+ AllowOverride None
+ Order Allow,deny
+ Allow from all
+ </Directory>
+
+5. Access your new looking glass:
+
+ http://HOSTNAME/klg/klg.php
+
+=======================================================================
diff --git a/net-mgmt/klg/pkg-descr b/net-mgmt/klg/pkg-descr
new file mode 100644
index 000000000000..1d9590a42534
--- /dev/null
+++ b/net-mgmt/klg/pkg-descr
@@ -0,0 +1,6 @@
+klg is a looking glass written in PHP that can access and report
+back routing information from Cisco, Juniper and Zebra/Quagga
+routers. It can also lookup AS numbers to names via WHOIS interfaces,
+and supports friendly BGP community names via MySQL database.
+
+WWW: http://sourceforge.net/projects/klg