source: packages/net/bird/Makefile @ 20780

Last change on this file since 20780 was 20780, checked in by florian, 7 years ago

[package] add package for BIRD Internet Routing Daemon

Here is the patch that adds a package for The BIRD Internet Routing
Daemon. It is updated to the current version of BIRD (v 1.2.2).

BIRD is an internet routing daemon that implements OSPF, RIP and BGP.
It is fast, lightweight and small (cca 300 kB), therefore ideal for
OpenWRT based routers.

The makefile is rather tricky, as BIRD have to be built two times (for
IPv4 and IPv6 versions) and there are separate packages for BIRD daemon
and BIRD client, because client depends on libreadline and is not
strictly necessary.

Signed-off-by: Ondrej Zajicek <santiago@…>

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