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