[128980] trunk/dports/net/nedi/Portfile

devans at macports.org devans at macports.org
Mon Dec 1 14:39:40 PST 2014


Revision: 128980
          https://trac.macports.org/changeset/128980
Author:   devans at macports.org
Date:     2014-12-01 14:39:40 -0800 (Mon, 01 Dec 2014)
Log Message:
-----------
nedi: add mode line and retab, white space only.

Modified Paths:
--------------
    trunk/dports/net/nedi/Portfile

Modified: trunk/dports/net/nedi/Portfile
===================================================================
--- trunk/dports/net/nedi/Portfile	2014-12-01 22:37:36 UTC (rev 128979)
+++ trunk/dports/net/nedi/Portfile	2014-12-01 22:39:40 UTC (rev 128980)
@@ -1,59 +1,60 @@
+# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4
 # $Id$
 
-PortSystem	1.0
+PortSystem          1.0
 
-name			nedi
-version			1.0.7
-revision		3
-license                 GPL-3
-categories		net
-maintainers		nomaintainer
-platforms		darwin
+name                nedi
+version             1.0.7
+revision            3
+license             GPL-3
+categories          net
+maintainers         nomaintainer
+platforms           darwin
 
-description		Network Discovery Suite
+description         Network Discovery Suite
 
-long_description	A low noise network discovery, management, and inventory \
-			system for Cisco networks with a user friendly web interface.
+long_description    A low noise network discovery, management, and inventory \
+                    system for Cisco networks with a user friendly web interface.
 
-homepage		http://www.nedi.ch/
-master_sites	        http://www.nedi.ch/pub
+homepage            http://www.nedi.ch/
+master_sites        http://www.nedi.ch/pub
 
-extract.mkdir		yes
-extract.suffix		.tgz
-checksums		md5 7eb73bfc687c8efbd833b1f8f3fbd749 \
-			rmd160 3b7895f80697f6f4a0b53e348874a8c4044e6ed4
+extract.mkdir       yes
+extract.suffix      .tgz
+checksums           md5 7eb73bfc687c8efbd833b1f8f3fbd749 \
+                    rmd160 3b7895f80697f6f4a0b53e348874a8c4044e6ed4
 
-depends_lib		port:perl5.12 \
-			path:bin/mysql_config5:mysql5 \
-			port:p5.12-net-snmp \
-			port:p5.12-net-ssh-perl \
-			port:p5.12-net-telnet \
-			port:p5.12-net-telnet-cisco \
-			port:p5.12-libwww-perl \
-			port:p5.12-algorithm-diff \
-			port:p5.12-dbi \
-			port:p5.12-dbd-mysql \
-			port:rrdtool \
-			port:fping
+depends_lib         port:perl5.12 \
+                    path:bin/mysql_config5:mysql5 \
+                    port:p5.12-net-snmp \
+                    port:p5.12-net-ssh-perl \
+                    port:p5.12-net-telnet \
+                    port:p5.12-net-telnet-cisco \
+                    port:p5.12-libwww-perl \
+                    port:p5.12-algorithm-diff \
+                    port:p5.12-dbi \
+                    port:p5.12-dbd-mysql \
+                    port:rrdtool \
+                    port:fping
 
 
 # Set some useful variables
-set nedidir ${prefix}/share/${name}
-set rrdbin ${prefix}/bin/rrdtool
-set rrdfiles ${nedidir}/rrd
-set fpingpath ${prefix}/sbin
-set cacticlidir ${prefix}/share/cacti/cli
+set nedidir         ${prefix}/share/${name}
+set rrdbin          ${prefix}/bin/rrdtool
+set rrdfiles        ${nedidir}/rrd
+set fpingpath       ${prefix}/sbin
+set cacticlidir     ${prefix}/share/cacti/cli
 
-startupitem.create	yes
-startupitem.name	nedimonitor
-startupitem.executable	${nedidir}/moni.pl
+startupitem.create  yes
+startupitem.name    nedimonitor
+startupitem.executable  ${nedidir}/moni.pl
 
-use_configure		no
+use_configure       no
 build {}
 
 destroot {
-	file mkdir ${destroot}${nedidir}
-	system "cp -R ${worksrcpath}/* ${destroot}${nedidir}"
+    file mkdir ${destroot}${nedidir}
+    system "cp -R ${worksrcpath}/* ${destroot}${nedidir}"
 }
 
 post-destroot {
@@ -61,25 +62,25 @@
        eval reinplace "s|/usr/bin/perl|${prefix}/bin/perl5.12|g" \
                 [glob ${destroot}${nedidir}/*.pl] \
                 [glob ${destroot}${nedidir}/html/inc/*.pl] \
-		[glob ${destroot}${nedidir}/contrib/*.pl]
+        [glob ${destroot}${nedidir}/contrib/*.pl]
 
-	reinplace "s|netstat|/usr/sbin/netstat|g" \
+    reinplace "s|netstat|/usr/sbin/netstat|g" \
                 ${destroot}${nedidir}/inc/libmisc.pm
 
         reinplace "s|/etc/nedi.conf|${nedidir}/nedi.conf|g" \
                 ${destroot}${nedidir}/html/inc/libmisc.php
 
 # Fix rrdcmd location in nedi.conf
-	reinplace "s|rrdtool|${rrdbin}|g" \
+    reinplace "s|rrdtool|${rrdbin}|g" \
                 ${destroot}${nedidir}/nedi.conf
 
 # Fix fping path
-	reinplace "s|/usr/local/sbin|${fpingpath}|g" \
- 		${destroot}${nedidir}/html/Nodes-Toolbox.php
+    reinplace "s|/usr/local/sbin|${fpingpath}|g" \
+        ${destroot}${nedidir}/html/Nodes-Toolbox.php
 
 # Fix Cacti paths in nedi.conf
-	reinplace "s|/usr/bin/php /var/www/html/cacti/cli|${prefix}/bin/php ${cacticlidir}|g" \
-		${destroot}${nedidir}/nedi.conf
+    reinplace "s|/usr/bin/php /var/www/html/cacti/cli|${prefix}/bin/php ${cacticlidir}|g" \
+        ${destroot}${nedidir}/nedi.conf
 
 # Create directory for rrd files
         xinstall -m 755 -d ${destroot}${rrdfiles}
@@ -87,25 +88,25 @@
 # Keep these empty directories
         destroot.keepdirs \
                 ${destroot}${nedidir}/db/cfg \
-		${destroot}${nedidir}/html/log \
-		${destroot}${rrdfiles}
+        ${destroot}${nedidir}/html/log \
+        ${destroot}${rrdfiles}
 
 # Rename nedi.conf to nedi.conf.sample so port upgrades don't overwrite an installed nedi.conf
 # Also set permissions on nedi.conf because it has passwords.
-	file rename ${destroot}${nedidir}/nedi.conf \
-		${destroot}${nedidir}/nedi.conf.sample
-		system "chmod 600 ${destroot}${nedidir}/nedi.conf.sample"
+    file rename ${destroot}${nedidir}/nedi.conf \
+        ${destroot}${nedidir}/nedi.conf.sample
+        system "chmod 600 ${destroot}${nedidir}/nedi.conf.sample"
 }
 
 pre-install {
 # MacPorts can create only one startupitem per portfile.  So copy nedisyslog.plist
 # from filespath and link it into /Library/LaunchDaemons as startupitem's do.
 
-	xinstall -m 755 -d ${destroot}${prefix}/etc/LaunchDaemons/org.macports.nedisyslog/
-	xinstall -m 755 ${filespath}/org.macports.nedisyslog.plist \
-		${destroot}${prefix}/etc/LaunchDaemons/org.macports.nedisyslog/
-	system "cd /Library/LaunchDaemons && ln -sf \
-		${prefix}/etc/LaunchDaemons/org.macports.nedisyslog/org.macports.nedisyslog.plist"
+    xinstall -m 755 -d ${destroot}${prefix}/etc/LaunchDaemons/org.macports.nedisyslog/
+    xinstall -m 755 ${filespath}/org.macports.nedisyslog.plist \
+        ${destroot}${prefix}/etc/LaunchDaemons/org.macports.nedisyslog/
+    system "cd /Library/LaunchDaemons && ln -sf \
+        ${prefix}/etc/LaunchDaemons/org.macports.nedisyslog/org.macports.nedisyslog.plist"
 }
 
 notes \
@@ -118,17 +119,17 @@
         sudo -u mysql ${prefix}/lib/mysql5/bin/mysql_install_db
 
 -Start MySQL and set it to run at system boot:
-	sudo launchctl load -w /Library/LaunchDaemons/org.macports.mysql5.plist
+    sudo launchctl load -w /Library/LaunchDaemons/org.macports.mysql5.plist
 
 -Set the root MySQL password (replace <mypassword> with your chosen password):
-	sudo ${prefix}/lib/mysql5/bin/mysqladmin -u root password <mypassword>
+    sudo ${prefix}/lib/mysql5/bin/mysqladmin -u root password <mypassword>
 
 
 2) Install PHP5 with SNMP support and MacPorts Apache
 ------------------------------------------------
-	sudo port install php5 +apache2 +mysql5 +snmp
+    sudo port install php5 +apache2 +mysql5 +snmp
 
-	sudo ${prefix}/apache2/bin/apxs -a -e -n \"php5\" libphp5.so
+    sudo ${prefix}/apache2/bin/apxs -a -e -n \"php5\" libphp5.so
 
 NOTE: Check to make sure the PHP variable \"mysql.default_socket\" is set to path
  ${prefix}/var/run/mysql5/mysqld.sock by viewing the output of this terminal command:
@@ -139,18 +140,18 @@
 ------------------------------------------------
 -Turn off Apple's built-in Apache (Personal Web Sharing in System Preferences).  Then execute
    these commands:
-	cd ${prefix}/apache2/conf
-	sudo cp httpd.conf.sample httpd.conf
+    cd ${prefix}/apache2/conf
+    sudo cp httpd.conf.sample httpd.conf
 
 -Edit your httpd.conf
    Change the user/group variables in the Apache httpd.conf to be the Unix user/group that
      you'll use to run the NeDi executable
 
    Add an alias statement:
-	Alias /nedi \"${prefix}/share/nedi/html\"
+    Alias /nedi \"${prefix}/share/nedi/html\"
 
 -Start Apache and set it to run at system boot:
-	sudo launchctl load -w /Library/LaunchdDaemons/org.macports.apache2.plist
+    sudo launchctl load -w /Library/LaunchdDaemons/org.macports.apache2.plist
 
 
 4) Configure NeDi, initialize NeDi database, and Login to NeDi
@@ -158,19 +159,19 @@
 -Set NeDi owner: sudo chown -R <nedi-user>:<nedi-group> ${nedidir}
 
 -Edit nedi.conf Backend/Authen/Device Access sections: sudo pico ${nedidir}/nedi.conf
-	Leave nedi.conf permissions at 600 to protect your network passwords!
+    Leave nedi.conf permissions at 600 to protect your network passwords!
 
-backend		MSQ
-dbpass		<nedidb-password>
-authuser	mysql
+backend     MSQ
+dbpass      <nedidb-password>
+authuser    mysql
 
 comm <my-community-string> (community string of your Cisco devices)
 <usr> <pass> <enablepass> (user/pass of your Cisco devices)
 
 -Initialize the NeDi database:
-	cd ${nedidir}
-	sudo ./nedi.pl -i
-	When prompted for \"MySQL admin user:\" and enter 'root' and then MySQL root password.
+    cd ${nedidir}
+    sudo ./nedi.pl -i
+    When prompted for \"MySQL admin user:\" and enter 'root' and then MySQL root password.
 
 -Verify the NeDi DB:
         mysql -u root -p
@@ -179,7 +180,7 @@
         mysql> exit;
 
 -Login to the NeDi web interface: http://localhost/nedi
-	Initial user/pass is 'admin'/'admin'
+    Initial user/pass is 'admin'/'admin'
 
 
 5) Discover Your Network with NeDi
@@ -192,14 +193,14 @@
 -Make any other desired changes in nedi.conf
 
 -Start NeDi data collection:
-	cd ${nedidir}
-	sudo -u <nedi-user> nedi.pl -pr (options shown set CDP and routing tables for discovery)
+    cd ${nedidir}
+    sudo -u <nedi-user> nedi.pl -pr (options shown set CDP and routing tables for discovery)
 
 -Put a command in the crontab to discover your network at regular intervals.
-	A typical interval is 1 hour; to get accurate NeDi rrdtool graphs at
-	NeDi's default settings you must run NeDi at 1 hour intervals.
-	Otherwise, you must adjust NeDi's default rrdtool settings.  To run
-	NeDi every hour, the cron entry is:
+    A typical interval is 1 hour; to get accurate NeDi rrdtool graphs at
+    NeDi's default settings you must run NeDi at 1 hour intervals.
+    Otherwise, you must adjust NeDi's default rrdtool settings.  To run
+    NeDi every hour, the cron entry is:
 
 0 * * * * cd ${nedidir} ; ./nedi.pl -pr >> /dev/null 2>&1
 
@@ -208,12 +209,12 @@
 -----------------------------------------------
 -To enable NeDi alerts
 
-	sudo launchctl load -w /Library/LaunchDaemons/org.macports.nedimonitor.plist
+    sudo launchctl load -w /Library/LaunchDaemons/org.macports.nedimonitor.plist
 
 -To enable the NeDi syslog daemon:
 
-	sudo launchctl load -w /Library/LaunchDaemons/org.macports.nedisyslog.plist"
+    sudo launchctl load -w /Library/LaunchDaemons/org.macports.nedisyslog.plist"
 
-livecheck.type  regex
-livecheck.url   http://www.nedi.ch/download/
-livecheck.regex "current\.*${name}-(\\d+(?:\\.\\d+)*)${extract.suffix}"
+livecheck.type      regex
+livecheck.url       http://www.nedi.ch/download/
+livecheck.regex     "current\.*${name}-(\\d+(?:\\.\\d+)*)${extract.suffix}"
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.macosforge.org/pipermail/macports-changes/attachments/20141201/11d287d9/attachment.html>


More information about the macports-changes mailing list