Developing lightweight computation at the DSG edge

Makefile 4.32 KB
Newer Older
1
#    Copyright (C) 2011 Fundacio Privada per a la Xarxa Oberta, Lliure i Neutral guifi.net
2
#
3
4
5
6
#    This program is free software; you can redistribute it and/or modify
#    it under the terms of the GNU General Public License as published by
#    the Free Software Foundation; either version 2 of the License, or
#    (at your option) any later version.
7
#
8
9
10
11
#    This program is distributed in the hope that it will be useful,
#    but WITHOUT ANY WARRANTY; without even the implied warranty of
#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
#    GNU General Public License for more details.
12
#
13
14
15
16
17
18
#    You should have received a copy of the GNU General Public License along
#    with this program; if not, write to the Free Software Foundation, Inc.,
#    51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
#
#    The full GNU General Public License is included in this distribution in
#    the file called "COPYING".
19
20
21
22
23
#
# Contibutors:
#	Simó Albert i Beltran
#

24
25
26
27
28
29

include $(TOPDIR)/rules.mk

PKG_NAME:=bmx6-qmp

PKG_SOURCE_PROTO:=git
30

31
Public Sources:
32
33
34
#PKG_SOURCE_URL:=git://git.bmx6.net/bmx6.git
PKG_SOURCE_URL:=git://github.com/axn/bmx6.git

35
PKG_REV:=7219010098ea67f8ea08a06a68e7a765b114ca16
36

37
Private Sources:
38
#PKG_SOURCE_URL:=file:///usr/src/bmx6/bmx6-private.git
39

40
PKG_VERSION:=r2013022001
41

42
PKG_RELEASE:=4
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
#PKG_INSTALL:=1  # this tries to install straight to /usr/sbin/bmx6

PKG_SOURCE_VERSION:=$(PKG_REV)
PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
PKG_SOURCE:=$(PKG_SOURCE_SUBDIR).tar.gz
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_SOURCE_SUBDIR)

include $(INCLUDE_DIR)/package.mk


TARGET_CFLAGS += $(FPIC)

#-DNO_TRAFFIC_DUMP -DNO_DYN_PLUGIN -DNO_DEBUG_DUMP -DNO_DEBUG_ALL -DNO_DEBUG_TRACK -DNO_DEBUG_SYS

MAKE_ARGS += \
	EXTRA_CFLAGS="$(TARGET_CFLAGS) -I. -I$(STAGING_DIR)/usr/include -DNO_DEBUG_ALL -DNO_DEBUG_DUMP" \
	EXTRA_LDFLAGS="-L$(STAGING_DIR)/usr/lib " \
	REVISION_VERSION="$(PKG_REV)" \
	CC="$(TARGET_CC)" \
	INSTALL_DIR="$(PKG_INSTALL_DIR)" \
63
	STRIP="/bin/false" \
64
65
66
67
68
	build_all


define Package/bmx6-qmp/Default
  SECTION:=net
69
  CATEGORY:=qMp
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
  TITLE:=BMX6 layer 3 routing daemon (QMP version)
  URL:=http://bmx6.net/
  MAINTAINER:=Axel Neumann <neumann@cgws.de>
endef

define Package/bmx6-qmp/description
BMX6 layer 3 routing daemon (QMP version) supporting IPv4, IPv6, and IPv4 over IPv6 -  http://www.bmx6.net
endef

define Package/bmx6-qmp
  $(call Package/bmx6-qmp/Default)
  MENU:=1
endef

define Package/bmx6-qmp-uci-config
  $(call Package/bmx6-qmp/Default)
  DEPENDS:=bmx6-qmp +libuci
  TITLE:=configuration plugin based on uci (recommended!)
endef


define Package/bmx6-qmp-json
  $(call Package/bmx6-qmp/Default)
  DEPENDS:=bmx6-qmp +libjson
94
  TITLE:=josn plugin based on jsonc
95
96
endef

97
98
99
define Package/bmx6-qmp-sms
  $(call Package/bmx6-qmp/Default)
  DEPENDS:=bmx6-qmp
100
  TITLE:=sms plugin
101
endef
102

103
104
105
106
107
define Package/bmx6-qmp-quagga
  $(call Package/bmx6-qmp/Default)
  DEPENDS:=bmx6-qmp
  TITLE:=bmx6 quagga plugin to redistribute/export routes (needs manet/bmx6 patched quagga 0.99.21)
endef
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140

define Build/Configure
	mkdir -p $(PKG_INSTALL_DIR)
endef

define Build/Compile
	$(MAKE) -C $(PKG_BUILD_DIR) $(MAKE_ARGS)
endef


define Package/bmx6-qmp/install
	$(INSTALL_DIR) $(1)/usr/sbin $(1)/etc/config $(1)/etc/init.d
	$(INSTALL_BIN) $(PKG_BUILD_DIR)/bmx6 $(1)/usr/sbin/bmx6
endef


define Package/bmx6-qmp-uci-config/conffiles
/etc/config/bmx6
endef


define Package/bmx6-qmp-uci-config/install
	$(INSTALL_DIR) $(1)/usr/lib $(1)/etc/config $(1)/etc/init.d
	$(INSTALL_BIN) $(PKG_BUILD_DIR)/lib/bmx6_uci_config/bmx6_config.so $(1)/usr/lib/bmx6_config.so
	$(INSTALL_BIN) ./files/etc/init.d/bmx6 $(1)/etc/init.d/bmx6
	$(INSTALL_DATA) ./files/etc/config/bmx6 $(1)/etc/config/bmx6
endef

define Package/bmx6-qmp-json/install
	$(INSTALL_DIR) $(1)/usr/lib
	$(INSTALL_BIN) $(PKG_BUILD_DIR)/lib/bmx6_json/bmx6_json.so $(1)/usr/lib/bmx6_json.so
endef

141
142
143
144
145
define Package/bmx6-qmp-sms/install
	$(INSTALL_DIR) $(1)/usr/lib
	$(INSTALL_BIN) $(PKG_BUILD_DIR)/lib/bmx6_sms/bmx6_sms.so $(1)/usr/lib/bmx6_sms.so
endef

146
147
148
149
150
define Package/bmx6-qmp-quagga/install
	$(INSTALL_DIR) $(1)/usr/lib
	$(INSTALL_BIN) $(PKG_BUILD_DIR)/lib/bmx6_quagga/bmx6_quagga.so $(1)/usr/lib/bmx6_quagga.so
endef

151
152
153
$(eval $(call BuildPackage,bmx6-qmp))
$(eval $(call BuildPackage,bmx6-qmp-uci-config))
$(eval $(call BuildPackage,bmx6-qmp-json))
154
$(eval $(call BuildPackage,bmx6-qmp-sms))
155
156
$(eval $(call BuildPackage,bmx6-qmp-quagga))

157