Welcome to mirror list, hosted at ThFree Co, Russian Federation.

Makefile « bmx6 - github.com/openwrt/routing.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 66542ef56ce61b5240de37febb154888602e9a2b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
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
141
142
143
144
145
146
147
148
149
150
#    Copyright (C) 2011 Fundacio Privada per a la Xarxa Oberta, Lliure i Neutral guifi.net
#
#    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.
#
#    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.
#
#    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".
#
# Contibutors:
#	Axel Neumann, Simó Albert i Beltran, Pau Escrich
#


include $(TOPDIR)/rules.mk

PKG_NAME:=bmx6
PKG_VERSION:=0.1-alpha
PKG_RELEASE:=$(AUTORELEASE)

PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://github.com/bmx-routing/bmx6.git
PKG_SOURCE_DATE:=2020-06-08
PKG_SOURCE_VERSION:=65cb0d542f16a4b4689f5ad2542c9f24215a6616
PKG_MIRROR_HASH:=45501cfe9f82e08e8082147f90b94ba5b6bd11771a9140412bfbf5523a796177

PKG_MAINTAINER:=Axel Neumann <neumann@cgws.de>
PKG_LICENSE:=GPL-2.0-or-later

include $(INCLUDE_DIR)/package.mk

TARGET_CFLAGS += $(FPIC)

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 " \
	GIT_REV="$(PKG_REV)" \
	CC="$(TARGET_CC)" \
	INSTALL_DIR="$(PKG_INSTALL_DIR)" \
	STRIP="/bin/false" \
	build_all

define Package/bmx6/Default
  SECTION:=net
  CATEGORY:=Network
  SUBMENU:=Routing and Redirection
  TITLE:=BMX6 layer 3 routing daemon
  URL:=https://bmx6.net/projects/bmx6
  DEPENDS:=+kmod-ip6-tunnel +kmod-iptunnel6 +kmod-tun
endef

define Package/bmx6/description
BMX6 layer 3 routing daemon supporting IPv4, IPv6, and IPv4 over IPv6
endef

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

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

define Package/bmx6-json
  $(call Package/bmx6/Default)
  DEPENDS:=bmx6 +libjson-c
  TITLE:=json plugin based on json-c
endef

define Package/bmx6-sms
  $(call Package/bmx6/Default)
  DEPENDS:=bmx6
  TITLE:=sms plugin
endef

#define Package/bmx6-quagga
#  $(call Package/bmx6/Default)
#  DEPENDS:=bmx6 +qmp-quagga @BROKEN
#  TITLE:=bmx6 quagga plugin to redistribute/export routes (needs manet/bmx6 patched quagga 0.99.21)
#endef

define Package/bmx6-table
  $(call Package/bmx6/Default)
  DEPENDS:=bmx6
  TITLE:=bmx6 table plugin to automatic announce routing-table routes via ip6ip tunnels
endef

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

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

define Package/bmx6/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-uci-config/conffiles
/etc/config/bmx6
endef

define Package/bmx6-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-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

define Package/bmx6-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

define Package/bmx6-table/install
	$(INSTALL_DIR) $(1)/usr/lib
	$(INSTALL_BIN) $(PKG_BUILD_DIR)/lib/bmx6_table/bmx6_table.so $(1)/usr/lib/bmx6_table.so
endef

#define Package/bmx6-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

$(eval $(call BuildPackage,bmx6))
$(eval $(call BuildPackage,bmx6-uci-config))
$(eval $(call BuildPackage,bmx6-json))
$(eval $(call BuildPackage,bmx6-sms))
#$(eval $(call BuildPackage,bmx6-quagga))
$(eval $(call BuildPackage,bmx6-table))