Ticket #20424: Portfile

File Portfile, 4.0 KB (added by mike-savory, 15 years ago)
Line 
1# $Id$
2
3PortSystem 1.0
4
5name            quagga
6version         0.99.14
7set branch      [join [lrange [split ${version} .] 0 1] .]
8categories      net
9platforms       darwin
10maintainers     nzbox.com:mike openmaintainer
11description     Collection of Routing daemons for OSPF BGP and RIP
12long_description    Quagga is a routing software suite, providing implementations \
13                of OSPFv2, OSPFv3, RIP v1 and v2, RIPng and BGP-4 for Unix \
14                platforms, particularly FreeBSD, Linux, Solaris and NetBSD. \
15                Quagga is a fork of GNU Zebra which was developed by Kunihiro \
16                Ishiguro. The Quagga tree aims to build a more involved community \
17                around Quagga than the current centralised model of GNU Zebra. \
18                This port installs the binaries, but does not include startup \
19                items, it should be considered experimental.
20
21homepage        http://quagga.net/about.php
22master_sites    http://quagga.net/download/
23
24checksums       quagga-0.99.14.tar.gz \
25                    md5     3a075fd5e26ec6d52f4a51b14a2d3c2c \
26                    sha1    5c182a70987957b968b92251ab81b886647292a4 \
27                    rmd160  48ab35063c91c1e8e180f791ec2db65a9b10c53c \
28                quagga-patch1.diff \
29                    md5     fb87ce3a56ead2bbcdbbd8e2a41f7a61 \
30                    sha1    da74f5adddd89e014af39c09d6ca472410a28588 \
31                    rmd160  b27493ace57274d747f635a33190a18bb4c9da33 \
32                quagga-patch2.diff \
33                    md5     2f4ee1c2ae5eb1bd2dd6e0e7a4c188e0 \
34                    sha1    f74e7c936e97c3fb429deacfb44bacaa4c3d1a6a \
35                    rmd160  d1aec7e2b44f2dc10bc642a80b70e3db9ff86388 \
36                quagga-patch3.diff \
37                    md5     1b9587d0d45de3b0017a4935bc57dfc7 \
38                    sha1    b5e7c12649e29d221fbb3e84749ef609f9b279c1 \
39                    rmd160  58a7d2f58c19d45ea4dba0a54aabaee3709b18bc
40
41patchfiles      quagga-patch1.diff \
42                quagga-patch2.diff \
43                quagga-patch3.diff
44
45depends_lib     port:readline
46
47configure.args  --localstatedir=${prefix}/var/run/quagga \
48                --sysconfdir=${prefix}/etc/quagga \
49                --mandir=${prefix}/share/man \
50                --enable-vty-group=staff
51               
52pre-destroot {
53    addgroup quagga
54    set gid [existsgroup quagga]
55    adduser quagga gid=${gid} realname=Quagga home=${prefix}/var/quagga
56}
57
58post-destroot   {
59    xinstall -o quagga -g quagga -m 755 -d \
60        ${destroot}${prefix}/var/run/quagga ${destroot}${prefix}/etc/quagga \
61        ${destroot}${prefix}/var/quagga/logs
62
63}
64post-activate   {
65
66    # Make sure initial conf files are present and setup correctly
67    foreach f { bgpd.conf ospf6d.conf ospfd.conf ripd.conf ripngd.conf zebra.conf } {
68        if {![file exists ${prefix}/etc/quagga/${f}]} {
69            file copy ${prefix}/etc/quagga/${f}.sample \
70                ${prefix}/etc/quagga/${f}
71        }
72    }
73
74        ui_msg "******************************************************"
75        ui_msg "* The routing protocol daemons are in ${prefix}/sbin"
76        ui_msg "* bgpd ospfd ospf6d ripd ripng isisd zebra"
77        ui_msg "* These have not been well tested on OSX (yet)"
78        ui_msg "* The man files for the above are in section 8"
79        ui_msg "* The sample configs in ${prefix}/etc/quagga"
80        ui_msg "* sudo cp <daemon>.conf.sample <daemon>.conf"
81        ui_msg "* and edit as needed."
82        ui_msg "* No Startup Items have been made (yet)"
83        ui_msg "* As an example to start one of the daemons use"
84        ui_msg "* sudo ospfd -d"
85        ui_msg "* These drop root priviledges and run as quagga/quagga"
86        ui_msg "* To manage that daemons use"
87        ui_msg "* telnet localhost:2604"
88        ui_msg "* for more info see http://quagga.net/about.php"
89        ui_msg "* To stop one of the daemons use"
90        ui_msg "* sudo kill `cat ${prefix}/var/run/quagga/ospfd.pid`"
91        ui_msg "******************************************************"
92
93}
94
95destroot.keepdirs   ${destroot}${prefix}/var/run/quagga \
96                    ${destroot}${prefix}/var/quagga/logs
97
98