README.NetBSD 1.1 KB

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