1 # Copyright (C) 2011 Fundacio Privada per a la Xarxa Oberta, Lliure i Neutral guifi.net
3 # This program is free software; you can redistribute it and/or modify
4 # it under the terms of the GNU General Public License as published by
5 # the Free Software Foundation; either version 2 of the License, or
6 # (at your option) any later version.
8 # This program is distributed in the hope that it will be useful,
9 # but WITHOUT ANY WARRANTY; without even the implied warranty of
10 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 # GNU General Public License for more details.
13 # You should have received a copy of the GNU General Public License along
14 # with this program; if not, write to the Free Software Foundation, Inc.,
15 # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
17 # The full GNU General Public License is included in this distribution in
18 # the file called "COPYING".
21 # Axel Neumann, Simó Albert i Beltran, Pau Escrich
25 include $(TOPDIR
)/rules.mk
31 #PKG_SOURCE_URL:=file:///usr/src/bmx6/bmx6.git
32 #PKG_SOURCE_URL:=git://bmx6.net/bmx6.git
33 PKG_SOURCE_URL
:=git
://github.com
/axn
/bmx6.git
35 PKG_REV
:=60143a195478a98e73089566bbfde78cf193ed67
36 PKG_VERSION
:=r2016021505
40 PKG_SOURCE_VERSION
:=$(PKG_REV
)
41 PKG_SOURCE_SUBDIR
:=$(PKG_NAME
)-$(PKG_VERSION
)
42 PKG_SOURCE
:=$(PKG_SOURCE_SUBDIR
).
tar.gz
43 PKG_BUILD_DIR
:=$(BUILD_DIR
)/$(PKG_SOURCE_SUBDIR
)
45 include $(INCLUDE_DIR
)/package.mk
47 TARGET_CFLAGS
+= $(FPIC
)
50 EXTRA_CFLAGS
="$(TARGET_CFLAGS) -I. -I$(STAGING_DIR)/usr/include -DCRYPTLIB=POLARSSL_1_3_4 -DCORE_LIMIT=20000 -DTRAFFIC_DUMP -DNO_TRACE_FUNCTION_CALLS" \
51 EXTRA_LDFLAGS
="$(TARGET_LDFLAGS) -L$(STAGING_DIR)/usr/lib " \
52 GIT_REV
="$(PKG_REV)" \
54 INSTALL_DIR
="$(PKG_INSTALL_DIR)" \
57 define Package
/bmx7
/Default
60 SUBMENU
:=Routing and Redirection
61 TITLE
:=BMX7 layer
3 routing daemon
63 MAINTAINER
:=Axel Neumann
<neumann@cgws.de
>
64 DEPENDS
:=+zlib
+libpolarssl
67 define Package
/bmx7
/description
68 BMX7 routing daemon supporting securely-entrusted IPv6
(and IPv4in6
) routing
72 $(call Package
/bmx7
/Default
)
76 define Package
/bmx7-uci-config
77 $(call Package
/bmx7
/Default
)
79 TITLE
:=configuration plugin based on uci
(recommended
!)
82 define Package
/bmx7-json
83 $(call Package
/bmx7
/Default
)
84 DEPENDS
:=bmx7
+libjson-c
85 TITLE
:=json plugin based on json-c
88 define Package
/bmx7-sms
89 $(call Package
/bmx7
/Default
)
94 define Package
/bmx7-tun
95 $(call Package
/bmx7
/Default
)
96 DEPENDS
:=bmx7
+kmod-ip6-tunnel
+kmod-iptunnel6
+kmod-tun
97 TITLE
:=ipip-based tunnel plugin
(recommended
!)
100 define Package
/bmx7-table
101 $(call Package
/bmx7
/Default
)
102 DEPENDS
:=bmx7
+bmx7-tun
103 TITLE
:=plugin to announce routes from tables via tunnels
106 define Build
/Configure
107 mkdir
-p
$(PKG_INSTALL_DIR
)
111 $(MAKE
) -C
$(PKG_BUILD_DIR
) $(MAKE_ARGS
)
114 define Package
/bmx7
/install
115 $(INSTALL_DIR
) $(1)/usr
/sbin
$(1)/etc
/config
$(1)/etc
/init.d
116 $(INSTALL_BIN
) $(PKG_BUILD_DIR
)/bmx7
$(1)/usr
/sbin
/bmx7
119 define Package
/bmx7
/postinst
121 # # check if we are on real system
122 if
[ -z
"$${IPKG_INSTROOT}" ]; then
123 if
[ -f
/etc
/sysupgrade.conf
] && ! grep bmx7
/etc
/sysupgrade.conf
; then
124 echo
/etc
/bmx7
>> /etc
/sysupgrade.conf
130 define Package
/bmx7-uci-config
/conffiles
134 define Package
/bmx7-uci-config
/install
135 $(INSTALL_DIR
) $(1)/usr
/lib
$(1)/etc
/config
$(1)/etc
/init.d
136 $(INSTALL_BIN
) $(PKG_BUILD_DIR
)/lib
/bmx7_uci_config
/bmx7_config.so
$(1)/usr
/lib
/bmx7_config.so
137 $(INSTALL_BIN
) .
/files
/etc
/init.d
/bmx7
$(1)/etc
/init.d
/bmx7
138 $(INSTALL_DATA
) .
/files
/etc
/config
/bmx7
$(1)/etc
/config
/bmx7
141 define Package
/bmx7-json
/install
142 $(INSTALL_DIR
) $(1)/usr
/lib
143 $(INSTALL_BIN
) $(PKG_BUILD_DIR
)/lib
/bmx7_json
/bmx7_json.so
$(1)/usr
/lib
/bmx7_json.so
146 define Package
/bmx7-sms
/install
147 $(INSTALL_DIR
) $(1)/usr
/lib
148 $(INSTALL_BIN
) $(PKG_BUILD_DIR
)/lib
/bmx7_sms
/bmx7_sms.so
$(1)/usr
/lib
/bmx7_sms.so
151 define Package
/bmx7-tun
/install
152 $(INSTALL_DIR
) $(1)/usr
/lib
153 $(INSTALL_BIN
) $(PKG_BUILD_DIR
)/lib
/bmx7_tun
/bmx7_tun.so
$(1)/usr
/lib
/bmx7_tun.so
156 define Package
/bmx7-table
/install
157 $(INSTALL_DIR
) $(1)/usr
/lib
158 $(INSTALL_BIN
) $(PKG_BUILD_DIR
)/lib
/bmx7_table
/bmx7_table.so
$(1)/usr
/lib
/bmx7_table.so
162 $(eval
$(call BuildPackage
,bmx7
))
163 $(eval
$(call BuildPackage
,bmx7-uci-config
))
164 $(eval
$(call BuildPackage
,bmx7-json
))
165 $(eval
$(call BuildPackage
,bmx7-sms
))
166 $(eval
$(call BuildPackage
,bmx7-table
))
167 $(eval
$(call BuildPackage
,bmx7-tun
))