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