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