source: trunk/dports/net/rancid/Portfile

Last change on this file was 151861, checked in by mojca@…, 13 months ago

rancid: switch to perl5.24 (#52081)

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 3.6 KB
Line 
1# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:filetype=tcl:et:sw=4:ts=4:sts=4
2# $Id: Portfile 151861 2016-08-23 12:31:10Z ryandesign@macports.org $
3
4PortSystem          1.0
5PortGroup           perl5 1.0
6
7name                rancid
8version             3.4.1
9revision            1
10categories          net
11license             BSD-old
12maintainers         nomaintainer
13platforms           darwin
14
15description         Really Awesome New Cisco confIg Differ
16
17long_description    Rancid maintains a CVS/SVN/git repository of router and \
18                    device config files.  It emails you when changes \
19                    occur and tells you what commands were changed.
20
21homepage            http://www.shrubbery.net/rancid
22master_sites        ftp://ftp.shrubbery.net/pub/rancid/
23
24checksums           rmd160  87e72f1b839a9177b6d36dc6054750efbb503add \
25                    sha256  572964f01969bd18b198110a75013ec31ec2aba6ca582ebf6cd208c422fe3bfe
26
27perl5.branches      5.24
28depends_lib         port:perl${perl5.major} \
29                    port:p${perl5.major}-lockfile-simple \
30                    path:lib/libssl.dylib:openssl
31
32patchfiles          patch-etc-Makefile.am.diff \
33                    bin-Makefile.in.diff
34
35post-patch {
36# Set path for lg.conf.sample so Looking Glass will work
37    reinplace "s|@prefix@/bin|@prefix@/libexec/rancid:@prefix@/bin|g" \
38        ${worksrcpath}/etc/lg.conf.sample.in
39}
40
41configure.env       PERLV_PATH=${perl5.bin}
42configure.args      --localstatedir=${prefix}/var/${name} \
43                    --bindir=${prefix}/libexec/${name} \
44                    --sysconfdir=${prefix}/etc/${name} \
45                    --mandir=\\\${prefix}/share/man
46
47post-destroot {
48    system "ln -s -f ${prefix}/libexec/${name}/rancid-cvs ${destroot}${prefix}/bin/rancid-cvs"
49    system "ln -s -f ${prefix}/libexec/${name}/rancid-run ${destroot}${prefix}/bin/rancid-run"
50}
51
52notes "
53#### To complete the RANCID installation ####
54
55Copy the sample .cloginrc file to the RANCID user's home directory,\
56make sure it isn't world readable, and edit it according to your needs.
57
58        cp ${prefix}/share/rancid/cloginrc.sample ~/.cloginrc
59        sudo chmod 640 ~/.cloginrc
60
61See the README file in ${prefix}/share/rancid for more information.
62
63
64To use the optional looking glass service to run status check commands\
65(show ip route, show run, etc) against your devices from a web form,\
66perform these steps:
67
681) Copy the looking glass files and set permissions.
69
70   Use the lg.conf.sample looking glass configuration file as a start.
71        cd ${prefix}/etc/rancid
72        cp lg.conf.sample lg.conf
73
74   Make an /lg folder in your Apache document root and copy lg files
75        sudo mkdir -p <Apache-directory>/lg/log
76        cd <Apache-directory>/lg
77        sudo cp ${prefix}/share/rancid/index.html ./
78        sudo cp ${prefix}/share/rancid/lgnotes.html ./
79
80   Copy the .cgi's to the Apache document root
81        cd <Apache-directory>/lg
82        cp ${prefix}/libexec/rancid/lg.cgi      ./
83        cp ${prefix}/libexec/rancid/lgform.cgi  ./
84
85   Set the file permissions.  The rancid-user should also be the Apache user.
86        sudo chown -R <rancid-user>:<rancid-user> <Apache-docroot>/lg
87
88
892) To enable the cgi's in this directory to run, set this line in your httpd.conf:
90
91        <Directory /Library/WebServer/Documents/lg>
92                Options ExecCGI
93        </Directory>
94
95
963) Goto url http://localhost/lg with a web browser to use the looking glass.
97
98#### WARNING DATABASE FORMAT CHANGE ####
99
100Note that the router.db format has changed. The file separator is now a \
101semicolon from a colon.
102
103This is to better support IPv6 addresses in the file.
104
105#### WARNING DATABASE FORMAT CHANGE ####
106"
107
108livecheck.type      regex
109livecheck.url       [lindex ${master_sites} 0]
110livecheck.regex     ${name}-(\[0-9.\]+)\\.
Note: See TracBrowser for help on using the repository browser.