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