2 # Copyright (C) 2013 Jo-Philipp Wich <jow@openwrt.org>
4 # Licensed under the Apache License, Version 2.0.
7 include $(TOPDIR
)/rules.mk
10 PKG_VERSION
:=$(shell git
--git-dir
=$(CURDIR
)/..
/.git log
-1 --pretty
="%ci %h" | awk
'{ print $$1 "-" $$4 }')
11 PKG_MAINTAINER
:=Jo-Philipp Wich
<jow@openwrt.org
>
13 PKG_LICENSE
:=Apache-2.0
18 include $(INCLUDE_DIR
)/package.mk
19 include $(INCLUDE_DIR
)/cmake.mk
22 $(INSTALL_DIR
) $(PKG_BUILD_DIR
)
23 $(CP
) .
/src
/* $(PKG_BUILD_DIR
)/
30 DEPENDS
:=+rpcd
+rpcd-mod-iwinfo
+uhttpd
+uhttpd-mod-ubus
33 define Package
/luci2
/description
34 Provides the LuCI2 web interface with standard functionality.
37 define Package
/luci2
/install
38 $(INSTALL_DIR
) $(1)/www
39 $(CP
) .
/htdocs
/* $(1)/www
/
40 $(INSTALL_DIR
) $(1)/usr
/share
/rpcd
41 $(CP
) .
/share
/* $(1)/usr
/share
/rpcd
/
42 $(INSTALL_DIR
) $(1)/usr
/lib
/rpcd
43 $(INSTALL_BIN
) $(PKG_BUILD_DIR
)/rpcd
/luci2.so
$(1)/usr
/lib
/rpcd
/
44 $(INSTALL_BIN
) $(PKG_BUILD_DIR
)/rpcd
/bwmon.so
$(1)/usr
/lib
/rpcd
/
45 $(INSTALL_DIR
) $(1)/usr
/libexec
$(1)/www
/cgi-bin
46 $(INSTALL_BIN
) $(PKG_BUILD_DIR
)/io
/luci2-io
$(1)/usr
/libexec
/
47 $(LN
) /usr
/libexec
/luci2-io
$(1)/www
/cgi-bin
/luci-upload
48 $(LN
) /usr
/libexec
/luci2-io
$(1)/www
/cgi-bin
/luci-backup
51 define Package
/luci2
/postinst
54 if
[ "$$(uci -q get uhttpd.main.ubus_prefix)" != "/ubus" ]; then
55 uci set uhttpd.main.ubus_prefix
="/ubus"
62 $(eval
$(call BuildPackage
,luci2
))