gdt | a3214b7 | 2005-12-29 15:40:49 +0000 | [diff] [blame] | 1 | #!/bin/sh |
| 2 | |
Greg Troxel | b65c639 | 2010-03-10 14:03:54 -0500 | [diff] [blame] | 3 | # $QuaggaId: Format:%an, %ai, %h$ $ |
gdt | a3214b7 | 2005-12-29 15:40:49 +0000 | [diff] [blame] | 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 | |
Greg Troxel | 85c4968 | 2010-04-20 12:44:21 -0400 | [diff] [blame] | 9 | MAKE=make |
Greg Troxel | 1483819 | 2007-08-02 13:38:38 +0000 | [diff] [blame] | 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 |
Greg Troxel | 37ccd14 | 2007-08-02 13:23:57 +0000 | [diff] [blame] | 13 | MAKE=gmake |
Greg Troxel | 1483819 | 2007-08-02 13:38:38 +0000 | [diff] [blame] | 14 | echo "WARNING: using gmake to work around nonportable makefiles" |
Greg Troxel | 37ccd14 | 2007-08-02 13:23:57 +0000 | [diff] [blame] | 15 | fi |
| 16 | |
Greg Troxel | 85c4968 | 2010-04-20 12:44:21 -0400 | [diff] [blame] | 17 | # Use /usr/quagga to be independent, and /usr/pkg to overwrite pkgsrc. |
| 18 | PREFIX=/usr/pkg |
| 19 | |
gdt | a3214b7 | 2005-12-29 15:40:49 +0000 | [diff] [blame] | 20 | case $1 in |
| 21 | |
| 22 | build) |
Greg Troxel | fe0a1a4 | 2011-06-28 15:05:05 -0400 | [diff] [blame^] | 23 | # Omitted because it is now default: |
| 24 | # --enable-opaque-lsa |
Greg Troxel | 409d8e4 | 2007-02-02 17:03:03 +0000 | [diff] [blame] | 25 | ./bootstrap.sh |
gdt | a3214b7 | 2005-12-29 15:40:49 +0000 | [diff] [blame] | 26 | LDFLAGS="-L/usr/pkg/lib -R/usr/pkg/lib" CPPFLAGS="-I/usr/pkg/include" \ |
Greg Troxel | 85c4968 | 2010-04-20 12:44:21 -0400 | [diff] [blame] | 27 | ./configure --prefix=${PREFIX} \ |
gdt | a3214b7 | 2005-12-29 15:40:49 +0000 | [diff] [blame] | 28 | --sysconfdir=/etc/zebra --localstatedir=/var/run/zebra \ |
Greg Troxel | 85c4968 | 2010-04-20 12:44:21 -0400 | [diff] [blame] | 29 | --enable-exampledir=${PREFIX}/share/examples/zebra \ |
| 30 | --enable-pkgsrcrcdir=${PREFIX}/etc/rc.d \ |
Greg Troxel | fe0a1a4 | 2011-06-28 15:05:05 -0400 | [diff] [blame^] | 31 | --enable-vtysh |
Greg Troxel | 85c4968 | 2010-04-20 12:44:21 -0400 | [diff] [blame] | 32 | ${MAKE} |
gdt | a3214b7 | 2005-12-29 15:40:49 +0000 | [diff] [blame] | 33 | ;; |
| 34 | |
| 35 | install) |
Greg Troxel | 85c4968 | 2010-04-20 12:44:21 -0400 | [diff] [blame] | 36 | ${MAKE} install |
gdt | a3214b7 | 2005-12-29 15:40:49 +0000 | [diff] [blame] | 37 | ;; |
| 38 | |
| 39 | clean) |
Greg Troxel | 85c4968 | 2010-04-20 12:44:21 -0400 | [diff] [blame] | 40 | ${MAKE} clean |
Greg Troxel | 1483819 | 2007-08-02 13:38:38 +0000 | [diff] [blame] | 41 | ;; |
| 42 | |
| 43 | *) |
Greg Troxel | 85c4968 | 2010-04-20 12:44:21 -0400 | [diff] [blame] | 44 | echo "Usage: README.NetBSD (build|install|clean)" |
Greg Troxel | 1483819 | 2007-08-02 13:38:38 +0000 | [diff] [blame] | 45 | exit 1 |
| 46 | ;; |
gdt | a3214b7 | 2005-12-29 15:40:49 +0000 | [diff] [blame] | 47 | |
| 48 | esac |