Revert "olsr: init: JOW IS THE BEST !!!"
[feed/routing.git] / bmx6 / Makefile
1 #
2 # Copyright (C) 2011 OpenWrt.org, bmx6.net
3 #
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
6 #
7 # $Id$
8
9 include $(TOPDIR)/rules.mk
10
11 PKG_NAME:=bmx6
12
13
14 PKG_SOURCE_PROTO:=git
15 PKG_SOURCE_URL:=git://git.bmx6.net/bmx6.git
16 PKG_REV:=c3ef7d76292a765c5e578bd4113030dc34ee3b9a
17
18 PKG_VERSION:=r2011031602
19
20 #PKG_RELEASE:=1
21 #PKG_INSTALL:=1 # this tries to install straight to /usr/sbin/bmx6
22
23 PKG_SOURCE_VERSION:=$(PKG_REV)
24 PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
25 PKG_SOURCE:=$(PKG_SOURCE_SUBDIR).tar.gz
26 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_SOURCE_SUBDIR)
27
28 include $(INCLUDE_DIR)/package.mk
29
30
31 TARGET_CFLAGS += $(FPIC)
32
33 #-DNO_TRAFFIC_DUMP -DNO_DYN_PLUGIN -DNO_DEBUG_DUMP -DNO_DEBUG_ALL -DNO_DEBUG_TRACK -DNO_DEBUG_SYS
34
35 MAKE_ARGS += \
36 EXTRA_CFLAGS="$(TARGET_CFLAGS) -I. -I$(STAGING_DIR)/usr/include -DNO_DEBUG_ALL -DNO_DEBUG_DUMP" \
37 EXTRA_LDFLAGS="-L$(STAGING_DIR)/usr/lib " \
38 REVISION_VERSION="$(PKG_REV)" \
39 CC="$(TARGET_CC)" \
40 INSTALL_DIR="$(PKG_INSTALL_DIR)" \
41 STRIP="/bin/true" \
42 build_all
43
44
45 define Package/bmx6/Default
46 SECTION:=net
47 CATEGORY:=Network
48 SUBMENU:=Routing and Redirection
49 TITLE:=BMX6 layer 3 routing daemon
50 URL:=http://bmx6.net/
51 MAINTAINER:=Axel Neumann <neumann@cgws.de>
52 endef
53
54 define Package/bmx6/description
55 BMX6 layer 3 routing daemon supporting IPv4, IPv6, and IPv4 over IPv6 - http://www.bmx6.net
56 endef
57
58 define Package/bmx6
59 $(call Package/bmx6/Default)
60 MENU:=1
61 endef
62
63 define Package/bmx6-uci-config
64 $(call Package/bmx6/Default)
65 DEPENDS:=bmx6 +libuci
66 TITLE:=configuration plugin based on uci (recommended!)
67 endef
68
69
70
71
72 define Build/Configure
73 mkdir -p $(PKG_INSTALL_DIR)
74 endef
75
76 define Build/Compile
77 $(MAKE) -C $(PKG_BUILD_DIR) $(MAKE_ARGS)
78 endef
79
80
81 define Package/bmx6/install
82 $(INSTALL_DIR) $(1)/usr/sbin $(1)/etc/config $(1)/etc/init.d
83 $(INSTALL_BIN) $(PKG_BUILD_DIR)/bmx6 $(1)/usr/sbin/bmx6
84 endef
85
86
87 define Package/bmx6-uci-config/conffiles
88 /etc/config/bmx6
89 endef
90
91
92 define Package/bmx6-uci-config/install
93 $(INSTALL_DIR) $(1)/usr/lib $(1)/etc/config $(1)/etc/init.d
94 $(INSTALL_BIN) $(PKG_BUILD_DIR)/lib/bmx6_uci_config/bmx6_config.so $(1)/usr/lib/bmx6_config.so
95 $(INSTALL_BIN) ./files/etc/init.d/bmx6 $(1)/etc/init.d/bmx6
96 $(INSTALL_DATA) ./files/etc/config/bmx6 $(1)/etc/config/bmx6
97 endef
98
99
100 $(eval $(call BuildPackage,bmx6))
101 $(eval $(call BuildPackage,bmx6-uci-config))
102