1 # Copyright (C) 2014-2017 Eloi Carbo <eloicaso@openmailbox.org>
3 # This program is free software: you can redistribute it and/or modify
4 # it under the terms of the GNU General Public License as published by
5 # the Free Software Foundation, either version 3 of the License, or
6 # (at your option) any later version.
8 # This program is distributed in the hope that it will be useful,
9 # but WITHOUT ANY WARRANTY; without even the implied warranty of
10 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 # GNU General Public License for more details.
13 # You should have received a copy of the GNU General Public License
14 # along with this program. If not, see <http://www.gnu.org/licenses/>.
17 include $(TOPDIR
)/rules.mk
18 include $(INCLUDE_DIR
)/kernel.mk
21 PKG_NAME
:= $(BIRD
)-openwrt
24 PKG_BUILD_DIR
:= $(BUILD_DIR
)/$(PKG_NAME
)
25 PKG_LICENSE
:= GPL-3.0
+
27 luci
:= luci-app-
$(BIRD
)
29 include $(INCLUDE_DIR
)/package.mk
37 TITLE
:=The BIRD UCI module
40 SUBMENU
:=Routing and Redirection
41 MAINTAINER
:=Eloi Carbo
<eloicaso@openmailbox.org
>
42 URL
:=https
://github.com
/eloicaso
/bird-openwrt
/
43 DEPENDS
:=+$(BIRD
) +libuci
+uci
46 define Package
/$(uci
)/description
47 $(BIRD
) UCI integration module
50 define Package
/$(uci
)/conffiles
54 define Package
/$(uci
)/install
55 $(INSTALL_DIR
) $(1)/etc
/$(BIRD
)/init.d
56 $(INSTALL_DIR
) $(1)/etc
/config
57 $(INSTALL_DIR
) $(1)/etc
/$(BIRD
)/filters
58 $(INSTALL_DIR
) $(1)/etc
/$(BIRD
)/functions
59 $(INSTALL_BIN
) .
/src
/init.d
/$(BIRD
)* $(1)/etc
/$(BIRD
)/init.d
/
60 $(CP
) .
/src
/uci-defaults
/* $(1)/etc
/$(BIRD
)/init.d
/
61 $(INSTALL_CONF
) .
/src
/config
/$(BIRD
) $(1)/etc
/config
/
64 define Package
/$(uci
)/postinst
66 if
[ -z
"$${IPKG_INSTROOT}" ]; then
67 ( .
/etc
/$(BIRD
)/init.d
/bird-uci-install-init.d
$(BIRD
) ) && rm -f
/etc
/$(BIRD
)/init.d
/bird-uci-install-init.d
68 ( .
/etc
/$(BIRD
)/init.d
/99-relocate-filters
$(BIRD
) ) && rm -f
/etc
/$(BIRD
)/init.d
/99-relocate-filters
69 if
[ -f
/etc
/sysupgrade.conf
] && ! grep
$(BIRD
) /etc
/sysupgrade.conf
; then
70 echo
/etc
/config
/$(BIRD
) >> /etc
/sysupgrade.conf
71 echo
/etc
/$(BIRD
)/filters
/ >> /etc
/sysupgrade.conf
72 echo
/etc
/$(BIRD
)/functions
/ >> /etc
/sysupgrade.conf
77 $(eval
$(call BuildPackage
,$(uci
)))
79 define Package
/$(luci
)
80 TITLE
:=LuCI support for
$(BIRD
)
83 SUBMENU
:=3. Applications
84 MAINTAINER
:=Eloi Carbo
<eloicaso@openmailbox.org
>
85 URL
:=https
://github.com
/eloicaso
/bird-openwrt
/
86 DEPENDS
:=+$(BIRD
)-uci
+luci-base
89 define Package
/$(luci
)/description
90 $(BIRD
) application for LuCI
93 define Package
/$(luci
)/install
94 $(INSTALL_DIR
) $(1)/usr
/lib
/lua
/luci
/controller
/
95 $(INSTALL_DIR
) $(1)/usr
/lib
/lua
/luci
/model
/cbi
/$(BIRD
)/
96 $(INSTALL_DIR
) $(1)/usr
/lib
/lua
/luci
/view
/$(BIRD
)/
97 $(CP
) .
/src
/model
/* $(1)/usr
/lib
/lua
/luci
/model
/cbi
/$(BIRD
)/
98 $(CP
) .
/src
/controller
/* $(1)/usr
/lib
/lua
/luci
/controller
/
99 $(CP
) .
/src
/view
/* $(1)/usr
/lib
/lua
/luci
/view
/$(BIRD
)/
102 $(eval
$(call BuildPackage
,$(luci
)))