svn commit: r400408 - in head/net-mgmt: . klg klg/files
Kurt Jaeger
pi at FreeBSD.org
Wed Oct 28 18:38:30 UTC 2015
Author: pi
Date: Wed Oct 28 18:38:28 2015
New Revision: 400408
URL: https://svnweb.freebsd.org/changeset/ports/400408
Log:
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 at dan.me.uk>
Added:
head/net-mgmt/klg/
head/net-mgmt/klg/Makefile (contents, props changed)
head/net-mgmt/klg/distinfo (contents, props changed)
head/net-mgmt/klg/files/
head/net-mgmt/klg/files/pkg-message.in (contents, props changed)
head/net-mgmt/klg/pkg-descr (contents, props changed)
Modified:
head/net-mgmt/Makefile
Modified: head/net-mgmt/Makefile
==============================================================================
--- head/net-mgmt/Makefile Wed Oct 28 18:37:56 2015 (r400407)
+++ head/net-mgmt/Makefile Wed Oct 28 18:38:28 2015 (r400408)
@@ -95,6 +95,7 @@
SUBDIR += isic
SUBDIR += jnettop
SUBDIR += kismet
+ SUBDIR += klg
SUBDIR += lanmap
SUBDIR += lg
SUBDIR += librenms
Added: head/net-mgmt/klg/Makefile
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/net-mgmt/klg/Makefile Wed Oct 28 18:38:28 2015 (r400408)
@@ -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 at 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>
Added: head/net-mgmt/klg/distinfo
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/net-mgmt/klg/distinfo Wed Oct 28 18:38:28 2015 (r400408)
@@ -0,0 +1,2 @@
+SHA256 (klg-1.5.txz) = 4f966bb22a940b61f731f423b663bcff541871489958c79ad30e6462465ff582
+SIZE (klg-1.5.txz) = 24431
Added: head/net-mgmt/klg/files/pkg-message.in
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/net-mgmt/klg/files/pkg-message.in Wed Oct 28 18:38:28 2015 (r400408)
@@ -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
+
+=======================================================================
Added: head/net-mgmt/klg/pkg-descr
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/net-mgmt/klg/pkg-descr Wed Oct 28 18:38:28 2015 (r400408)
@@ -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
More information about the svn-ports-head
mailing list