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