Merge branch 'master' into bmx6_testing
[feed/routing.git] / bird / Makefile
1 #
2 # Copyright (C) 2009-2012 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.3.11
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:=8ad2eb997fb8251bc5b24cf32619571b
16 PKG_BUILD_DEPENDS:=libncurses libreadline
17
18 include $(INCLUDE_DIR)/package.mk
19
20 define Package/bird/Default
21 TITLE:=The BIRD Internet Routing Daemon
22 URL:=http://bird.network.cz/
23 DEPENDS:=
24 endef
25
26 define Package/birdc/Default
27 TITLE:=The BIRD command-line client
28 URL:=http://bird.network.cz/
29 DEPENDS:= +libreadline +libncurses
30 endef
31
32 define Package/bird/Default/description1
33 BIRD is an internet routing daemon which manages TCP/IP routing tables
34 with support of modern routing protocols, easy to use configuration
35 interface and powerful route filtering language. It is lightweight and
36 efficient and therefore appropriate for small embedded routers.
37
38 endef
39
40 define Package/bird/Default/description2
41 In BGP, BIRD supports communities, multiprotocol extensions, MD5
42 authentication, 32bit AS numbers and could act as a route server or a
43 route reflector. BIRD also supports multiple RIBs, multiple kernel
44 routing tables and redistribution between the protocols with a powerful
45 configuration syntax.
46
47 endef
48
49 define Package/bird/Default/description3
50 This is a BIRD command-line client. It is used to send commands to BIRD,
51 commands can perform simple actions such as enabling/disabling of
52 protocols, telling BIRD to show various information, telling it to show
53 a routing table filtered by a filter, or asking BIRD to reconfigure.
54
55 Unless you can't afford dependency on ncurses and readline, you
56 should install BIRD command-line client together with BIRD.
57
58 endef
59
60 define Package/bird4
61 $(call Package/bird/Default)
62 SECTION:=net
63 CATEGORY:=Network
64 SUBMENU:=Routing and Redirection
65 TITLE+= (IPv4)
66 endef
67
68 define Package/birdc4
69 $(call Package/birdc/Default)
70 SECTION:=net
71 CATEGORY:=Network
72 SUBMENU:=Routing and Redirection
73 TITLE+= (IPv4)
74 DEPENDS+= +bird4
75 endef
76
77 define Package/bird6
78 $(call Package/bird/Default)
79 SECTION:=net
80 CATEGORY:=Network
81 TITLE+= (IPv6)
82 endef
83
84 define Package/birdc6
85 $(call Package/birdc/Default)
86 SECTION:=net
87 CATEGORY:=Network
88 TITLE+= (IPv6)
89 DEPENDS+= +bird6
90 endef
91
92 define Package/bird4/description
93 $(call Package/bird/Default/description1)
94 This is IPv4 version of BIRD, it supports OSPFv2, RIPv2 and BGP
95 protocols.
96
97 $(call Package/bird/Default/description2)
98 endef
99
100 define Package/birdc4/description
101 $(call Package/bird/Default/description1)
102 $(call Package/bird/Default/description3)
103 endef
104
105 define Package/bird6/description
106 $(call Package/bird/Default/description1)
107 This is IPv6 version of BIRD, it supports OSPFv3, RIPng and BGP
108 protocols.
109
110 $(call Package/bird/Default/description2)
111 endef
112
113 define Package/birdc6/description
114 $(call Package/bird/Default/description1)
115 $(call Package/bird/Default/description3)
116 endef
117
118 CONFIGURE_ARGS += --with-linux-headers="$(LINUX_DIR)"
119
120 define Build/Template
121
122 $(STAMP_BUILT)-$(2): $(STAMP_PREPARED)
123 $(call Build/Configure/Default,$(3))
124 $(call Build/Compile/Default,)
125 ( cd $(PKG_BUILD_DIR); mv -f bird bird$(2); mv -f birdc birdc$(2) )
126 -$(MAKE) -C $(PKG_BUILD_DIR) clean
127 touch $$@
128
129 $(STAMP_BUILT): $(STAMP_BUILT)-$(2)
130
131 define Package/bird$(2)/install
132 $(INSTALL_DIR) $$(1)/usr/sbin
133 $(INSTALL_BIN) $$(PKG_BUILD_DIR)/bird$(2) $$(1)/usr/sbin/
134 $(INSTALL_BIN) ./files/bird$(2)loop $$(1)/usr/sbin/
135 $(INSTALL_DIR) $$(1)/etc
136 $(INSTALL_DATA) ./files/bird$(2).conf $$(1)/etc/
137 $(INSTALL_DIR) $$(1)/etc/init.d
138 $(INSTALL_BIN) ./files/bird$(2).init $$(1)/etc/init.d/bird$(2)
139
140 endef
141
142 define Package/bird$(2)/conffiles
143 /etc/bird$(2).conf
144 endef
145
146 define Package/birdc$(2)/install
147 $(INSTALL_DIR) $$(1)/usr/sbin
148 $(INSTALL_BIN) $$(PKG_BUILD_DIR)/birdc$(2) $$(1)/usr/sbin/
149 endef
150
151 endef
152
153
154 $(eval $(call Build/Template,bird4,4, --disable-ipv6))
155 $(eval $(call Build/Template,bird6,6, --enable-ipv6))
156
157 $(eval $(call BuildPackage,bird4))
158 $(eval $(call BuildPackage,birdc4))
159 $(eval $(call BuildPackage,bird6))
160 $(eval $(call BuildPackage,birdc6))