blob: 55e54af86c704ac22a2a346856a07f31879a36b2 [file] [log] [blame]
gdta3214b72005-12-29 15:40:49 +00001#!/bin/sh
2
Greg Troxelcf4a2bb2007-02-02 16:52:38 +00003$Id$
gdta3214b72005-12-29 15:40:49 +00004
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 Troxel14838192007-08-02 13:38:38 +00009# Quagga is currently documented not to require GNU make, but sometimes
10# BSD make fails. Enable this if statement as a workaround.
11if false; then
Greg Troxel37ccd142007-08-02 13:23:57 +000012 MAKE=gmake
Greg Troxel14838192007-08-02 13:38:38 +000013 echo "WARNING: using gmake to work around nonportable makefiles"
Greg Troxel37ccd142007-08-02 13:23:57 +000014fi
15
gdta3214b72005-12-29 15:40:49 +000016case $1 in
17
18 build)
Greg Troxel409d8e42007-02-02 17:03:03 +000019 ./bootstrap.sh
gdta3214b72005-12-29 15:40:49 +000020 LDFLAGS="-L/usr/pkg/lib -R/usr/pkg/lib" CPPFLAGS="-I/usr/pkg/include" \
21 ./configure --prefix=/usr/quagga \
22 --sysconfdir=/etc/zebra --localstatedir=/var/run/zebra \
23 --enable-exampledir=/usr/quagga/share/examples/zebra \
24 --enable-pkgsrcrcdir=/usr/quagga/etc/rc.d \
25 --enable-opaque-lsa --enable-vtysh
26 make
27 ;;
28
29 install)
30 make install
31 ;;
32
33 clean)
34 make clean
Greg Troxel14838192007-08-02 13:38:38 +000035 ;;
36
37 *)
38 echo "Illegal command $1"
39 exit 1
40 ;;
gdta3214b72005-12-29 15:40:49 +000041
42esac