1 # Copyright (C) 2014 - Eloi Carbó Solé (GSoC2014)
2 # BGP/Bird integration with OpenWRT and QMP
4 # This program is free software: you can redistribute it and/or modify
5 # it under the terms of the GNU General Public License as published by
6 # the Free Software Foundation, either version 3 of the License, or
7 # (at your option) any later version.
9 # This program is distributed in the hope that it will be useful,
10 # but WITHOUT ANY WARRANTY; without even the implied warranty of
11 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 # GNU General Public License for more details.
14 # You should have received a copy of the GNU General Public License
15 # along with this program. If not, see <http://www.gnu.org/licenses/>.
18 include $(TOPDIR
)/rules.mk
19 include $(INCLUDE_DIR
)/kernel.mk
22 PKG_NAME
:=$(BIRD
)-openwrt
24 PKG_BUILD_DIR
:= $(BUILD_DIR
)/$(PKG_NAME
)
27 luci
:=luci-app-
$(BIRD
)
30 include $(INCLUDE_DIR
)/package.mk
38 TITLE
:=The BIRD UCI module
41 SUBMENU
:=Routing and Redirection
42 MAINTAINER
:=Eloi Carbo
<eloicaso@openmailbox.org
>
43 URL
:=https
://github.com
/eloicaso
/bird4-openwrt
/
44 DEPENDS
:=+$(BIRD
) +libuci
+uci
47 define Package
/$(uci
)/description
48 $(BIRD
) UCI integration module
51 define Package
/$(uci
)/install
52 $(INSTALL_DIR
) $(1)/etc
/$(BIRD
)/init.d
53 $(INSTALL_DIR
) $(1)/etc
/config
54 $(INSTALL_BIN
) .
/src
/init.d
/$(BIRD
) $(1)/etc
/$(BIRD
)/init.d
/
55 $(CP
) .
/src
/uci-defaults
/$(uci
)-install-init.d
$(1)/etc
/$(BIRD
)/init.d
/
56 $(CP
) .
/src
/config
/$(BIRD
) $(1)/etc
/config
/
59 define Package
/$(uci
)/postinst
61 if
[ -z
$${IPKG_INSTROOT} ]; then
62 ( .
/etc
/bird4
/init.d
/bird4-uci-install-init.d
) && rm -f
/etc
/bird4
/init.d
/bird4-uci-install-init.d
66 $(eval
$(call BuildPackage
,$(uci
)))
70 define Package
/$(luci
)
71 TITLE
:=LuCI support for
$(BIRD
)
74 SUBMENU
:=3. Applications
75 MAINTAINER
:=Eloi Carbo
<eloicaso@openmailbox.org
>
76 URL
:=https
://github.com
/eloicaso
/bird4-openwrt
/
77 DEPENDS
:=+$(BIRD
)-uci
+luci-base
80 define Package
/$(luci
)/description
81 $(BIRD
) application for LuCI
84 define Package
/$(luci
)/install
85 $(INSTALL_DIR
) $(1)/usr
/lib
/lua
/luci
/controller
/
86 $(INSTALL_DIR
) $(1)/usr
/lib
/lua
/luci
/model
/cbi
/$(BIRD
)/
87 $(CP
) .
/src
/model
/* $(1)/usr
/lib
/lua
/luci
/model
/cbi
/$(BIRD
)/
88 $(CP
) .
/src
/controller
/* $(1)/usr
/lib
/lua
/luci
/controller
/
91 $(eval
$(call BuildPackage
,$(luci
)))