frr.mk 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. ################################################################################
  2. #
  3. # frr
  4. #
  5. ################################################################################
  6. FRR_VERSION = 7.4
  7. FRR_SITE = $(call github,FRRouting,frr,frr-$(FRR_VERSION))
  8. FRR_LICENSE = GPL-2.0
  9. FRR_LICENSE_FILES = COPYING
  10. FRR_AUTORECONF = YES
  11. FRR_DEPENDENCIES = host-frr readline json-c \
  12. libyang libnl c-ares
  13. HOST_FRR_DEPENDENCIES = host-flex host-bison host-python3
  14. FRR_CONF_OPTS = --with-clippy=$(HOST_DIR)/bin/clippy \
  15. --sysconfdir=/etc/frr \
  16. --localstatedir=/var/run/frr \
  17. --with-moduledir=/usr/lib/frr/modules \
  18. --enable-configfile-mask=0640 \
  19. --enable-logfile-mask=0640 \
  20. --enable-multipath=256 \
  21. --disable-ospfclient \
  22. --enable-shell-access \
  23. --enable-user=frr \
  24. --enable-group=frr \
  25. --enable-vty-group=frrvty \
  26. --disable-capabilities \
  27. --enable-fpm
  28. HOST_FRR_CONF_OPTS = --enable-clippy-only
  29. ifeq ($(BR2_TOOLCHAIN_HAS_LIBATOMIC),y)
  30. FRR_CONF_ENV += LIBS=-latomic
  31. endif
  32. define HOST_FRR_INSTALL_CMDS
  33. $(INSTALL) -D -m 0755 $(@D)/lib/clippy $(HOST_DIR)/bin/clippy
  34. endef
  35. define FRR_INSTALL_CONFIG_FILES
  36. $(foreach f,daemons daemons.conf frr.conf vtysh.conf support_bundle_commands.conf,\
  37. $(INSTALL) -D -m 0640 $(@D)/tools/etc/frr/$(f) \
  38. $(TARGET_DIR)/etc/frr/$(f)
  39. )
  40. $(RM) $(TARGET_DIR)/etc/frr/*.sample
  41. endef
  42. FRR_POST_INSTALL_TARGET_HOOKS += FRR_INSTALL_CONFIG_FILES
  43. define FRR_PERMISSIONS
  44. /etc/frr/daemons f 640 frr frr - - - - -
  45. /etc/frr/daemons.conf f 640 frr frr - - - - -
  46. /etc/frr/frr.conf f 640 frr frr - - - - -
  47. /etc/frr/vtysh.conf f 640 frr frrvty - - - - -
  48. /etc/frr/support_bundle_commands.conf f 640 frr frr
  49. endef
  50. define FRR_USERS
  51. frr -1 frr -1 * /var/run/frr - frrvty FRR user priv
  52. endef
  53. define FRR_INSTALL_INIT_SYSV
  54. $(INSTALL) -D -m 755 $(FRR_PKGDIR)/S50frr \
  55. $(TARGET_DIR)/etc/init.d/S50frr
  56. endef
  57. $(eval $(autotools-package))
  58. $(eval $(host-autotools-package))