summaryrefslogtreecommitdiff
path: root/luci2/Makefile
diff options
context:
space:
mode:
authorJo-Philipp Wich <jow@openwrt.org>2013-09-09 17:01:22 +0200
committerJo-Philipp Wich <jow@openwrt.org>2013-09-09 17:01:22 +0200
commit2f0e65dd27549ef4fde5b18588083968a59b66bd (patch)
tree371bf5fd09ddf206442848a95796d41bf81f95b8 /luci2/Makefile
downloadluci2-ui-2f0e65dd27549ef4fde5b18588083968a59b66bd.tar.gz
Initial commit of LuCI2
Diffstat (limited to 'luci2/Makefile')
-rw-r--r--luci2/Makefile62
1 files changed, 62 insertions, 0 deletions
diff --git a/luci2/Makefile b/luci2/Makefile
new file mode 100644
index 0000000..bdd4ac2
--- /dev/null
+++ b/luci2/Makefile
@@ -0,0 +1,62 @@
+#
+# Copyright (C) 2013 Jo-Philipp Wich <jow@openwrt.org>
+#
+# Licensed under the Apache License, Version 2.0.
+#
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=luci2
+PKG_VERSION:=$(shell git --git-dir=$(CURDIR)/../.git log -1 --pretty="%ci %h" | awk '{ print $$1 "-" $$4 }')
+PKG_MAINTAINER:=Jo-Philipp Wich <jow@openwrt.org>
+
+PKG_LICENSE:=Apache-2.0
+PKG_LICENSE_FILES:=
+
+PKG_BUILD_PARALLEL:=1
+
+include $(INCLUDE_DIR)/package.mk
+include $(INCLUDE_DIR)/cmake.mk
+
+define Build/Prepare
+ $(INSTALL_DIR) $(PKG_BUILD_DIR)
+ $(CP) ./src/* $(PKG_BUILD_DIR)/
+endef
+
+define Package/luci2
+ SECTION:=luci2
+ CATEGORY:=LuCI2
+ TITLE:=LuCI2 UI
+ DEPENDS:=+rpcd +rpcd-mod-iwinfo +uhttpd +uhttpd-mod-ubus
+endef
+
+define Package/luci2/description
+ Provides the LuCI2 web interface with standard functionality.
+endef
+
+define Package/luci2/install
+ $(INSTALL_DIR) $(1)/www
+ $(CP) ./htdocs/* $(1)/www/
+ $(INSTALL_DIR) $(1)/usr/share/luci2
+ $(CP) ./share/* $(1)/usr/share/luci2/
+ $(INSTALL_DIR) $(1)/usr/lib/rpcd
+ $(INSTALL_BIN) $(PKG_BUILD_DIR)/rpcd/luci2.so $(1)/usr/lib/rpcd/
+ $(INSTALL_DIR) $(1)/usr/libexec $(1)/www/cgi-bin
+ $(INSTALL_BIN) $(PKG_BUILD_DIR)/io/luci2-io $(1)/usr/libexec/
+ $(LN) /usr/libexec/luci2-io $(1)/www/cgi-bin/luci-upload
+ $(LN) /usr/libexec/luci2-io $(1)/www/cgi-bin/luci-backup
+ $(LN) /usr/libexec/luci2-io $(1)/www/cgi-bin/luci-login
+endef
+
+define Package/luci2/postinst
+#!/bin/sh
+
+if [ "$$(uci -q get uhttpd.main.ubus_prefix)" != "/ubus" ]; then
+ uci set uhttpd.main.ubus_prefix="/ubus"
+ uci commit uhttpd
+fi
+
+exit 0
+endef
+
+$(eval $(call BuildPackage,luci2))