Makefile 3.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788
  1. include $(TOPDIR)/rules.mk
  2. PKG_NAME:=oonf-olsrd2
  3. PKG_VERSION:=v0.15.1
  4. PKG_REV:=bffb88b040659b237c4c91b6b42dbbb47431750e
  5. PKG_RELEASE:=$(PKG_REV)
  6. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
  7. PKG_SOURCE_URL:=https://github.com/OLSR/OONF.git
  8. PKG_SOURCE_PROTO:=git
  9. PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
  10. PKG_SOURCE_VERSION:=$(PKG_REV)
  11. PKG_MIRROR_HASH:=2e38140e804e7fc0138d0893416c4f19b1ca43bd9de066e8b028bd0d59ac9255
  12. CMAKE_INSTALL:=1
  13. include $(INCLUDE_DIR)/package.mk
  14. include $(INCLUDE_DIR)/cmake.mk
  15. SPACE:=
  16. SPACE+=
  17. CMAKE_OPTIONAL_PLUGINS:= $(subst $(SPACE),;,$(strip \
  18. $(if $(filter y,$(CONFIG_OONF_NHDP_AUTOLL4)),auto_ll4,) \
  19. $(if $(filter y,$(CONFIG_OONF_OLSRV2_LAN_IMPORT)),lan_import,) \
  20. $(if $(filter y,$(CONFIG_OONF_OLSRV2_ROUTE_MODIFIER)),route_modifier,) \
  21. $(if $(filter y,$(CONFIG_OONF_GENERIC_DLEP_ROUTER)),dlep_router,) \
  22. $(if $(filter y,$(CONFIG_OONF_GENERIC_REMOTECONTROL)),remotecontrol,) \
  23. $(if $(filter y,$(CONFIG_OONF_OLSRV2_MPR)),mpr,) \
  24. $(if $(filter y,$(CONFIG_OONF_GENERIC_HTTP)),http,) \
  25. ))
  26. BUILD_TYPE:= $(if $(filter y,$(CONFIG_DEBUG)),Debug,Release)
  27. CMAKE_OPTIONS+=-D CMAKE_BUILD_TYPE:String=$(BUILD_TYPE) \
  28. -D OONF_NO_WERROR:Bool=true \
  29. -D OONF_LOGGING_LEVEL:String=debug \
  30. -D OONF_NO_TESTING:Bool=true \
  31. -D UCI:Bool=true \
  32. -D OONF_APP_DEFAULT_CFG_HANDLER:String=uci \
  33. -D OONF_STATIC_PLUGINS:String="class;clock;duplicate_set;layer2;packet_socket;rfc5444;socket;stream_socket;telnet;timer;viewer;os_clock;os_fd;os_interface;os_routing;os_system;nhdp;olsrv2;ff_dat_metric;neighbor_probing;nl80211_listener;link_config;layer2info;systeminfo;cfg_uciloader;cfg_compact;nhdpinfo;olsrv2info;netjsoninfo;${CMAKE_OPTIONAL_PLUGINS}" \
  34. -D OONF_LIB_GIT:String=v$(PKG_VERSION)-archive \
  35. -D OONF_VERSION:String=$(PKG_VERSION) \
  36. -D INSTALL_LIB_DIR:Path=lib/oonf \
  37. -D INSTALL_INCLUDE_DIR:Path=include/oonf \
  38. -D INSTALL_CMAKE_DIR:Path=lib/oonf \
  39. -D CMAKE_PREFIX_PATH=$(STAGING_DIR)/usr
  40. define Package/oonf-git/template
  41. SECTION:=net
  42. CATEGORY:=Network
  43. MAINTAINER:=Henning Rogge <hrogge@gmail.com>
  44. SUBMENU:=OLSR.org network framework
  45. URL:=http://www.olsr.org/
  46. MENU:=1
  47. endef
  48. define Package/oonf-olsrd2
  49. $(call Package/oonf-git/template)
  50. TITLE:= Build Olsrd V2 Routing Agent
  51. DEPENDS:=+librt +libnl-tiny +libuci +oonf-init-scripts
  52. VERSION:=$(PKG_VERSION)
  53. endef
  54. define Package/oonf-olsrd2/config
  55. source "$(SOURCE)/Config.in"
  56. endef
  57. Build/Compile=$(call Build/Compile/Default,olsrd2_static)
  58. Build/Install=
  59. define Build/Install
  60. $(INSTALL_BIN) -D $(PKG_BUILD_DIR)/$(MAKE_PATH)/olsrd2_static $(PKG_INSTALL_DIR)/usr/sbin/olsrd2;
  61. endef
  62. TARGET_CFLAGS += -I$(STAGING_DIR)/usr/include -I${STAGING_DIR}/usr/include/libnl-tiny
  63. define Package/oonf-olsrd2/install
  64. $(INSTALL_BIN) -D $(PKG_BUILD_DIR)/olsrd2_static $(1)/usr/sbin/olsrd2
  65. $(INSTALL_BIN) -D ./files/olsrd2.init $(1)/etc/init.d/olsrd2
  66. $(INSTALL_BIN) -D ./files/olsrd2.hotplug $(1)/etc/hotplug.d/iface/50-olsrd2
  67. $(INSTALL_DATA) -D ./files/olsrd2.uci $(1)/etc/config/olsrd2
  68. endef
  69. define Package/oonf-olsrd2/conffiles
  70. /etc/config/olsrd2
  71. endef
  72. $(eval $(call BuildPackage,oonf-olsrd2))