b080d6555e3b9e34819e15d4223c5ac459a8fa3a
[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 SECTION:=net
22 CATEGORY:=Network
23 TITLE:=The BIRD Internet Routing Daemon
24 URL:=http://bird.network.cz/
25 endef
26
27 define 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
33 endef
34
35 define Package/bird/Default/description1
36 BIRD is an internet routing daemon which manages TCP/IP routing tables
37 with support of modern routing protocols, easy to use configuration
38 interface and powerful route filtering language. It is lightweight and
39 efficient and therefore appropriate for small embedded routers.
40
41 endef
42
43 define Package/bird/Default/description2
44 In BGP, BIRD supports communities, multiprotocol extensions, MD5
45 authentication, 32bit AS numbers and could act as a route server or a
46 route reflector. BIRD also supports multiple RIBs, multiple kernel
47 routing tables and redistribution between the protocols with a powerful
48 configuration syntax.
49
50 endef
51
52 define Package/bird/Default/description3
53 This is a BIRD command-line client. It is used to send commands to BIRD,
54 commands can perform simple actions such as enabling/disabling of
55 protocols, telling BIRD to show various information, telling it to show
56 a routing table filtered by a filter, or asking BIRD to reconfigure.
57
58 Unless you can't afford dependency on ncurses and readline, you
59 should install BIRD command-line client together with BIRD.
60
61 endef
62
63 define Package/bird4
64 $(call Package/bird/Default)
65 TITLE+= (IPv4)
66 endef
67
68 define Package/birdc4
69 $(call Package/birdc/Default)
70 TITLE+= (IPv4)
71 DEPENDS+= +bird4
72 endef
73
74 define Package/bird6
75 $(call Package/bird/Default)
76 TITLE+= (IPv6)
77 endef
78
79 define Package/birdc6
80 $(call Package/birdc/Default)
81 TITLE+= (IPv6)
82 DEPENDS+= +bird6
83 endef
84
85 define Package/bird4/description
86 $(call Package/bird/Default/description1)
87 This is IPv4 version of BIRD, it supports OSPFv2, RIPv2 and BGP
88 protocols.
89
90 $(call Package/bird/Default/description2)
91 endef
92
93 define Package/birdc4/description
94 $(call Package/bird/Default/description1)
95 $(call Package/bird/Default/description3)
96 endef
97
98 define Package/bird6/description
99 $(call Package/bird/Default/description1)
100 This is IPv6 version of BIRD, it supports OSPFv3, RIPng and BGP
101 protocols.
102
103 $(call Package/bird/Default/description2)
104 endef
105
106 define Package/birdc6/description
107 $(call Package/bird/Default/description1)
108 $(call Package/bird/Default/description3)
109 endef
110
111 CONFIGURE_ARGS += --with-linux-headers="$(LINUX_DIR)"
112
113 define 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
124 define 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
133 endef
134
135 define Package/birdc$(2)/install
136 $(INSTALL_DIR) $$(1)/usr/sbin
137 $(INSTALL_BIN) $$(PKG_BUILD_DIR)/birdc$(2) $$(1)/usr/sbin/
138 endef
139
140 endef
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))