]>
Commit | Line | Data |
---|---|---|
a3214b79 | 1 | #!/bin/sh |
2 | ||
1689cf7e | 3 | # This file is helpful for building FRR from cvs on NetBSD, and |
a3214b79 | 4 | # probably on any system using pkgsrc. |
5 | # One should have readline installed already (pkgsrc/devel/readline). | |
6 | ||
85c4968b | 7 | MAKE=make |
1689cf7e | 8 | # FRR is currently documented not to require GNU make, but sometimes |
14838194 GT |
9 | # BSD make fails. Enable this if statement as a workaround. |
10 | if false; then | |
37ccd146 | 11 | MAKE=gmake |
14838194 | 12 | echo "WARNING: using gmake to work around nonportable makefiles" |
37ccd146 GT |
13 | fi |
14 | ||
1689cf7e | 15 | # Use /usr/frr to be independent, and /usr/pkg to overwrite pkgsrc. |
85c4968b GT |
16 | PREFIX=/usr/pkg |
17 | ||
a3214b79 | 18 | case $1 in |
19 | ||
20 | build) | |
fe0a1a45 GT |
21 | # Omitted because it is now default: |
22 | # --enable-opaque-lsa | |
409d8e4f | 23 | ./bootstrap.sh |
a3214b79 | 24 | LDFLAGS="-L/usr/pkg/lib -R/usr/pkg/lib" CPPFLAGS="-I/usr/pkg/include" \ |
85c4968b | 25 | ./configure --prefix=${PREFIX} \ |
a3214b79 | 26 | --sysconfdir=/etc/zebra --localstatedir=/var/run/zebra \ |
85c4968b GT |
27 | --enable-exampledir=${PREFIX}/share/examples/zebra \ |
28 | --enable-pkgsrcrcdir=${PREFIX}/etc/rc.d \ | |
fe0a1a45 | 29 | --enable-vtysh |
85c4968b | 30 | ${MAKE} |
a3214b79 | 31 | ;; |
32 | ||
33 | install) | |
85c4968b | 34 | ${MAKE} install |
a3214b79 | 35 | ;; |
36 | ||
37 | clean) | |
85c4968b | 38 | ${MAKE} clean |
14838194 GT |
39 | ;; |
40 | ||
41 | *) | |
85c4968b | 42 | echo "Usage: README.NetBSD (build|install|clean)" |
14838194 GT |
43 | exit 1 |
44 | ;; | |
a3214b79 | 45 | |
46 | esac |