Ticket #4265: Portfile.2

File Portfile.2, 1.8 KB (added by dports@…, 19 years ago)

RANCID Portfile

Line 
1# $Id: Portfile,v 1.4 2004/12/03 19:41:51 jberry Exp $
2
3PortSystem      1.0
4
5name                            rancid
6version                         2.3.1
7
8categories                      net
9maintainers                     dports@mac.com
10platforms                       darwin
11
12description                     Really Awesome New Cisco confIg Differ
13
14long_description                Rancid maintains a CVS repository of router and \
15                                device config files.  It emails you when changes \
16                                occur and tells you what commands were changed.
17
18homepage                        http://www.shrubbery.net/rancid
19                                       
20master_sites                    ftp://ftp.shrubbery.net/pub/rancid/
21
22checksums                       md5 b188595e528515b4f87078f63936d355
23
24destroot.destdir                prefix=${destroot}${prefix}
25depends_lib                     port:expect \
26                                port:openssl
27
28configure.args                  --prefix=${prefix} \
29                                --localstatedir=${prefix}/var/${name} \
30                                --bindir=${prefix}/libexec/${name} \
31                                --sysconfdir=${prefix}/etc/${name}
32
33pre-configure {
34                reinplace "s|@bindir@|${destroot}@bindir@|g" \
35        ${worksrcpath}/Makefile.in ${worksrcpath}/bin/Makefile.in
36
37                reinplace "s|@sysconfdir@|${destroot}@sysconfdir@|g" \
38        ${worksrcpath}/Makefile.in ${worksrcpath}/etc/Makefile.in
39
40                reinplace "s|@localstatedir@|${destroot}@localstatedir@|g" \
41        ${worksrcpath}/Makefile.in
42}
43
44post-destroot {
45                xinstall -d 755  ${destroot}${prefix}/bin
46                system "ln -s -f ${prefix}/libexec/${name}/rancid-cvs ${destroot}${prefix}/bin/rancid-cvs"
47                system "ln -s -f ${prefix}/libexec/${name}/rancid-run ${destroot}${prefix}/bin/rancid-run"       
48}
49
50post-activate {
51
52                ui_msg "\nCopy the sample .cloginrc file to the RANCID user's home directory,
53make sure it isn't world readable, and edit it according to your needs.
54
55cp ${prefix}/share/rancid/cloginrc.sample ~/.cloginrc
56sudo chmod 640 ~/.cloginrc
57
58See the README file in ${prefix}/share/rancid for instructions.\n"
59}