Merge pull request #15 from Noltari/bird-next
[feed/routing.git] / bird / Makefile
1 #
2 # Copyright (C) 2009-2014 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.0
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:=4e5a47308335b1b0bf4691cac6c4174f
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:=+libpthread
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 SUBMENU:=Routing and Redirection
82 TITLE+= (IPv6)
83 endef
84
85 define Package/birdc6
86 $(call Package/birdc/Default)
87 SECTION:=net
88 CATEGORY:=Network
89 SUBMENU:=Routing and Redirection
90 TITLE+= (IPv6)
91 DEPENDS+= +bird6
92 endef
93
94 define Package/bird4/description
95 $(call Package/bird/Default/description1)
96 This is IPv4 version of BIRD, it supports OSPFv2, RIPv2 and BGP
97 protocols.
98
99 $(call Package/bird/Default/description2)
100 endef
101
102 define Package/birdc4/description
103 $(call Package/bird/Default/description1)
104 $(call Package/bird/Default/description3)
105 endef
106
107 define Package/bird6/description
108 $(call Package/bird/Default/description1)
109 This is IPv6 version of BIRD, it supports OSPFv3, RIPng and BGP
110 protocols.
111
112 $(call Package/bird/Default/description2)
113 endef
114
115 define Package/birdc6/description
116 $(call Package/bird/Default/description1)
117 $(call Package/bird/Default/description3)
118 endef
119
120 CONFIGURE_ARGS += --with-linux-headers="$(LINUX_DIR)"
121
122 define Build/Template
123
124 $(STAMP_BUILT)-$(2): $(STAMP_PREPARED)
125 $(call Build/Configure/Default,$(3))
126 $(call Build/Compile/Default,)
127 ( cd $(PKG_BUILD_DIR); mv -f bird bird$(2); mv -f birdc birdc$(2) )
128 -$(MAKE) -C $(PKG_BUILD_DIR) clean
129 touch $$@
130
131 $(STAMP_BUILT): $(STAMP_BUILT)-$(2)
132
133 define Package/bird$(2)/install
134 $(INSTALL_DIR) $$(1)/usr/sbin
135 $(INSTALL_BIN) $$(PKG_BUILD_DIR)/bird$(2) $$(1)/usr/sbin/
136 $(INSTALL_DIR) $$(1)/etc
137 $(INSTALL_DATA) ./files/bird$(2).conf $$(1)/etc/
138 $(INSTALL_DIR) $$(1)/etc/init.d
139 $(INSTALL_BIN) ./files/bird$(2).init $$(1)/etc/init.d/bird$(2)
140
141 endef
142
143 define Package/bird$(2)/conffiles
144 /etc/bird$(2).conf
145 endef
146
147 define Package/birdc$(2)/install
148 $(INSTALL_DIR) $$(1)/usr/sbin
149 $(INSTALL_BIN) $$(PKG_BUILD_DIR)/birdc$(2) $$(1)/usr/sbin/
150 endef
151
152 endef
153
154
155 $(eval $(call Build/Template,bird4,4, --disable-ipv6))
156 $(eval $(call Build/Template,bird6,6, --enable-ipv6))
157
158 $(eval $(call BuildPackage,bird4))
159 $(eval $(call BuildPackage,birdc4))
160 $(eval $(call BuildPackage,bird6))
161 $(eval $(call BuildPackage,birdc6))