• source navigation  • diff markup  • identifier search  • freetext search  • 

Sources/luci2-ui/luci2/Makefile

  1 #
  2 # Copyright (C) 2013 Jo-Philipp Wich <jow@openwrt.org>
  3 #
  4 # Licensed under the Apache License, Version 2.0.
  5 #
  6 
  7 include $(TOPDIR)/rules.mk
  8 
  9 PKG_NAME:=luci2
 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>
 12 
 13 PKG_LICENSE:=Apache-2.0
 14 PKG_LICENSE_FILES:=
 15 
 16 PKG_BUILD_PARALLEL:=1
 17 
 18 include $(INCLUDE_DIR)/package.mk
 19 include $(INCLUDE_DIR)/cmake.mk
 20 
 21 define Build/Prepare
 22         $(INSTALL_DIR) $(PKG_BUILD_DIR)
 23         $(CP) ./src/* $(PKG_BUILD_DIR)/
 24 endef
 25 
 26 define Package/luci2
 27   SECTION:=luci2
 28   CATEGORY:=LuCI2
 29   TITLE:=LuCI2 UI
 30   DEPENDS:=+rpcd +rpcd-mod-iwinfo +uhttpd +uhttpd-mod-ubus +libubox +libubus
 31 endef
 32 
 33 define Package/luci2/description
 34  Provides the LuCI2 web interface with standard functionality.
 35 endef
 36 
 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
 49 endef
 50 
 51 define Package/luci2/postinst
 52 #!/bin/sh
 53 
 54 if [ "$$(uci -q get uhttpd.main.ubus_prefix)" != "/ubus" ]; then
 55         uci set uhttpd.main.ubus_prefix="/ubus"
 56         uci commit uhttpd
 57 fi
 58 
 59 exit 0
 60 endef
 61 
 62 $(eval $(call BuildPackage,luci2))

This page was automatically generated by LXR 0.3.1.  •  OpenWrt