Merge pull request #186 from stintel/bird
[feed/routing.git] / bird / Makefile
1 #
2 # Copyright (C) 2009-2016 OpenWrt.org
3 #
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
6
7 include $(TOPDIR)/rules.mk
8
9 PKG_NAME:=bird
10 PKG_VERSION:=1.6.0
11 PKG_RELEASE:=1
12
13 PKG_SOURCE:=bird-$(PKG_VERSION).tar.gz
14 PKG_SOURCE_URL:=ftp://bird.network.cz/pub/bird
15 PKG_MD5SUM:=4c92ec3548a2a120243879b6ef7046dd
16 PKG_BUILD_DEPENDS:=libncurses libreadline
17 PKG_MAINTAINER:=Álvaro Fernández Rojas <noltari@gmail.com>
18
19 PKG_LICENSE:=GPL-2.0
20
21 include $(INCLUDE_DIR)/package.mk
22
23 define Package/bird/Default
24 TITLE:=The BIRD Internet Routing Daemon
25 URL:=http://bird.network.cz/
26 DEPENDS:=+libpthread
27 endef
28
29 define Package/birdc/Default
30 TITLE:=The BIRD command-line client
31 URL:=http://bird.network.cz/
32 DEPENDS:= +libreadline +libncurses
33 endef
34
35 define Package/birdcl/Default
36 TITLE:=The BIRD lightweight command-line client
37 URL:=http://bird.network.cz/
38 endef
39
40 define Package/bird/Default/description1
41 BIRD is an internet routing daemon which manages TCP/IP routing tables
42 with support of modern routing protocols, easy to use configuration
43 interface and powerful route filtering language. It is lightweight and
44 efficient and therefore appropriate for small embedded routers.
45
46 endef
47
48 define Package/bird/Default/description2
49 In BGP, BIRD supports communities, multiprotocol extensions, MD5
50 authentication, 32bit AS numbers and could act as a route server or a
51 route reflector. BIRD also supports multiple RIBs, multiple kernel
52 routing tables and redistribution between the protocols with a powerful
53 configuration syntax.
54
55 endef
56
57 define Package/bird/Default/description3
58 This is a BIRD command-line client. It is used to send commands to BIRD,
59 commands can perform simple actions such as enabling/disabling of
60 protocols, telling BIRD to show various information, telling it to show
61 a routing table filtered by a filter, or asking BIRD to reconfigure.
62
63 Unless you can't afford dependency on ncurses and readline, you
64 should install BIRD command-line client together with BIRD.
65
66 endef
67
68 define Package/bird/Default/description4
69 This is a BIRD lightweight command-line client. It is used to send commands to BIRD,
70 commands can perform simple actions such as enabling/disabling of
71 protocols, telling BIRD to show various information, telling it to show
72 a routing table filtered by a filter, or asking BIRD to reconfigure.
73
74 endef
75
76 define Package/bird4
77 $(call Package/bird/Default)
78 SECTION:=net
79 CATEGORY:=Network
80 SUBMENU:=Routing and Redirection
81 TITLE+= (IPv4)
82 endef
83
84 define Package/birdc4
85 $(call Package/birdc/Default)
86 SECTION:=net
87 CATEGORY:=Network
88 SUBMENU:=Routing and Redirection
89 TITLE+= (IPv4)
90 DEPENDS+= +bird4
91 endef
92
93 define Package/birdcl4
94 $(call Package/birdcl/Default)
95 SECTION:=net
96 CATEGORY:=Network
97 SUBMENU:=Routing and Redirection
98 TITLE+= (IPv4)
99 DEPENDS+= +bird4
100 endef
101
102 define Package/bird6
103 $(call Package/bird/Default)
104 SECTION:=net
105 CATEGORY:=Network
106 SUBMENU:=Routing and Redirection
107 TITLE+= (IPv6)
108 endef
109
110 define Package/birdc6
111 $(call Package/birdc/Default)
112 SECTION:=net
113 CATEGORY:=Network
114 SUBMENU:=Routing and Redirection
115 TITLE+= (IPv6)
116 DEPENDS+= +bird6
117 endef
118
119 define Package/birdcl6
120 $(call Package/birdcl/Default)
121 SECTION:=net
122 CATEGORY:=Network
123 SUBMENU:=Routing and Redirection
124 TITLE+= (IPv6)
125 DEPENDS+= +bird6
126 endef
127
128 define Package/bird4/description
129 $(call Package/bird/Default/description1)
130 This is IPv4 version of BIRD, it supports OSPFv2, RIPv2 and BGP
131 protocols.
132
133 $(call Package/bird/Default/description2)
134 endef
135
136 define Package/birdc4/description
137 $(call Package/bird/Default/description1)
138 $(call Package/bird/Default/description3)
139 endef
140
141 define Package/birdcl4/description
142 $(call Package/bird/Default/description1)
143 $(call Package/bird/Default/description4)
144 endef
145
146 define Package/bird6/description
147 $(call Package/bird/Default/description1)
148 This is IPv6 version of BIRD, it supports OSPFv3, RIPng and BGP
149 protocols.
150
151 $(call Package/bird/Default/description2)
152 endef
153
154 define Package/birdc6/description
155 $(call Package/bird/Default/description1)
156 $(call Package/bird/Default/description3)
157 endef
158
159 define Package/birdcl6/description
160 $(call Package/bird/Default/description1)
161 $(call Package/bird/Default/description4)
162 endef
163
164 CONFIGURE_ARGS += --with-linux-headers="$(LINUX_DIR)"
165
166 TARGET_CFLAGS+=-std=gnu89
167
168 define Build/Template
169
170 $(STAMP_BUILT)-$(2): $(STAMP_PREPARED)
171 $(call Build/Configure/Default,$(3))
172 $(call Build/Compile/Default,)
173 ( cd $(PKG_BUILD_DIR); mv -f bird bird$(2); mv -f birdc birdc$(2); mv -f birdcl birdcl$(2) )
174 -$(MAKE) -C $(PKG_BUILD_DIR) clean
175 touch $$@
176
177 $(STAMP_BUILT): $(STAMP_BUILT)-$(2)
178
179 define Package/bird$(2)/install
180 $(INSTALL_DIR) $$(1)/usr/sbin
181 $(INSTALL_BIN) $$(PKG_BUILD_DIR)/bird$(2) $$(1)/usr/sbin/
182 $(INSTALL_DIR) $$(1)/etc
183 $(INSTALL_DATA) ./files/bird$(2).conf $$(1)/etc/
184 $(INSTALL_DIR) $$(1)/etc/init.d
185 $(INSTALL_BIN) ./files/bird$(2).init $$(1)/etc/init.d/bird$(2)
186
187 endef
188
189 define Package/bird$(2)/conffiles
190 /etc/bird$(2).conf
191 endef
192
193 define Package/birdc$(2)/install
194 $(INSTALL_DIR) $$(1)/usr/sbin
195 $(INSTALL_BIN) $$(PKG_BUILD_DIR)/birdc$(2) $$(1)/usr/sbin/
196 endef
197
198 define Package/birdcl$(2)/install
199 $(INSTALL_DIR) $$(1)/usr/sbin
200 $(INSTALL_BIN) $$(PKG_BUILD_DIR)/birdcl$(2) $$(1)/usr/sbin/
201 endef
202
203 endef
204
205
206 $(eval $(call Build/Template,bird4,4, --disable-ipv6))
207 $(eval $(call Build/Template,bird6,6, --enable-ipv6))
208
209 $(eval $(call BuildPackage,bird4))
210 $(eval $(call BuildPackage,birdc4))
211 $(eval $(call BuildPackage,birdcl4))
212 $(eval $(call BuildPackage,bird6))
213 $(eval $(call BuildPackage,birdc6))
214 $(eval $(call BuildPackage,birdcl6))