batman-adv: Prevent FTBFS when redefining ether_setup
[feed/routing.git] / oonf-olsrd2 / Makefile
1 include $(TOPDIR)/rules.mk
2
3 PKG_NAME:=oonf-olsrd2
4 PKG_VERSION:=0.13.0
5 PKG_REV:=9f941b25e1ac806db9d41e9892a5cf361bfe98f5
6 PKG_RELEASE:=$(PKG_REV)
7
8 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
9 PKG_SOURCE_URL:=https://github.com/OLSR/OONF.git
10 PKG_SOURCE_PROTO:=git
11 PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
12 PKG_SOURCE_VERSION:=$(PKG_REV)
13
14 CMAKE_INSTALL:=1
15
16 include $(INCLUDE_DIR)/package.mk
17 include $(INCLUDE_DIR)/cmake.mk
18
19 SPACE:=
20 SPACE+=
21 CMAKE_OPTIONAL_PLUGINS:= $(subst $(SPACE),;,$(strip \
22 $(if $(filter y,$(CONFIG_OONF_NHDP_AUTOLL4)),auto_ll4,) \
23 $(if $(filter y,$(CONFIG_OONF_OLSRV2_LAN_IMPORT)),lan_import,) \
24 $(if $(filter y,$(CONFIG_OONF_OLSRV2_ROUTE_MODIFIER)),route_modifier,) \
25 $(if $(filter y,$(CONFIG_OONF_GENERIC_DLEP_ROUTER)),dlep_router,) \
26 $(if $(filter y,$(CONFIG_OONF_GENERIC_REMOTECONTROL)),remotecontrol,) \
27 ))
28
29 CMAKE_OPTIONS=-D OONF_NO_WERROR:Bool=true \
30 -D OONF_LOGGING_LEVEL:String=debug \
31 -D OONF_NO_TESTING:Bool=true \
32 -D UCI:Bool=true \
33 -D OONF_APP_DEFAULT_CFG_HANDLER:String=uci \
34 -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}" \
35 -D OONF_LIB_GIT:String=v$(PKG_VERSION)-archive \
36 -D OONF_VERSION:String=$(PKG_VERSION) \
37 -D INSTALL_LIB_DIR:Path=lib/oonf \
38 -D INSTALL_INCLUDE_DIR:Path=include/oonf \
39 -D INSTALL_CMAKE_DIR:Path=lib/oonf \
40 -D CMAKE_PREFIX_PATH=$(STAGING_DIR)/usr
41
42 define Package/oonf-git/template
43 SECTION:=net
44 CATEGORY:=Network
45 MAINTAINER:=Henning Rogge <hrogge@gmail.com>
46 SUBMENU:=OLSR.org network framework
47 URL:=http://www.olsr.org/
48 MENU:=1
49 endef
50
51 define Package/oonf-olsrd2
52 $(call Package/oonf-git/template)
53 TITLE:= Build Olsrd V2 Routing Agent
54 DEPENDS:=+librt +libnl-tiny +libuci +oonf-init-scripts
55 VERSION:=$(PKG_VERSION)
56 endef
57
58 define Package/oonf-olsrd2/config
59 source "$(SOURCE)/Config.in"
60 endef
61
62 Build/Compile=$(call Build/Compile/Default,olsrd2_static)
63 Build/Install=
64
65 define Build/Install
66 $(INSTALL_BIN) -D $(PKG_BUILD_DIR)/$(MAKE_PATH)/olsrd2_static $(PKG_INSTALL_DIR)/usr/sbin/olsrd2;
67 endef
68
69 TARGET_CFLAGS += -I$(STAGING_DIR)/usr/include -I${STAGING_DIR}/usr/include/libnl-tiny
70
71 define Package/oonf-olsrd2/install
72 $(INSTALL_BIN) -D $(PKG_BUILD_DIR)/olsrd2_static $(1)/usr/sbin/olsrd2
73 $(INSTALL_BIN) -D ./files/olsrd2.init $(1)/etc/init.d/olsrd2
74 $(INSTALL_BIN) -D ./files/olsrd2.hotplug $(1)/etc/hotplug.d/iface/50-olsrd2
75 $(INSTALL_DATA) -D ./files/olsrd2.uci $(1)/etc/config/olsrd2
76 endef
77
78 define Package/oonf-olsrd2/conffiles
79 /etc/config/olsrd2
80 endef
81
82 $(eval $(call BuildPackage,oonf-olsrd2))