1include $(TOPDIR)/rules.mk 2 3# Build package version from git sha-1 4PKG_NAME:=luci-app-streamboost 5PKG_SOURCE_PROTO:=git 6PKG_SOURCE_URL:=ssh://qca-git01.qualcomm.com:29418/streamboost/luci-app-streamboost 7PKG_BRANCH:=banana 8PKG_RELEASE:=2 9 10include $(INCLUDE_DIR)/local-development.mk 11ifeq ($(DUMP)$(PKG_VERSION),) 12PKG_REV:=9b80471 13PKG_VERSION:=g9b80471 14endif 15PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz 16PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION) 17PKG_SOURCE_VERSION:=$(PKG_REV) 18PKG_SOURCE_MIRROR:=none 19 20include $(INCLUDE_DIR)/package.mk 21 22define Package/$(PKG_NAME)/Default 23 SECTION:=luci 24 CATEGORY:=LuCI 25 TITLE:=Luci Application for Streamboost 26 DEPENDS:=luci +flux +background-size-polyfill 27 MAINTAINER:=Earl Manning <earl.manning@qca.qualcomm.com> 28 SUBMENU:=3. Applications 29 MENU:=1 30endef 31 32define Package/$(PKG_NAME) 33 $(call Package/$(PKG_NAME)/Default) 34 VARIANT:=premium 35endef 36 37define Package/$(PKG_NAME)-mainstream 38 $(call Package/$(PKG_NAME)/Default) 39 TITLE += ( Mainstream) 40 VARIANT:=mainstream 41endef 42 43define Package/$(PKG_NAME)-assets 44 SECTION:=luci 45 CATEGORY:=LuCI 46 TITLE:=Static assets for Streamboost Luci Application 47 DEPENDS:=luci +luci-app-streamboost 48 MAINTAINER:=Earl Manning <earl.manning@qca.qualcomm.com> 49 SUBMENU:=3. Applications 50endef 51 52define Package/$(PKG_NAME)/description 53Luci Application for Monitoring and Management of Streamboost 54endef 55 56define Package/$(PKG_NAME)-mainstream/description 57Luci Application for Streamboost Mainstream 58endef 59 60define Package/$(PKG_NAME)-assets/description 61Static assets for the Streamboost Luci Application. 62endef 63 64include $(INCLUDE_DIR)/package-version-override.mk 65 66define Build/Configure 67endef 68 69define Build/Compile 70 ## This will run the JSON files through the packager to make JSONp files. 71 make -C $(PKG_BUILD_DIR)/htdocs/luci-static/resources/streamboost/trans all 72endef 73 74 75## don't use '$(INSTALL_DATA)' because that doesn't do recursive 76define Package/$(PKG_NAME)/Default/install 77 $(INSTALL_DIR) $(1)/usr 78 $(INSTALL_DIR) $(1)/usr/lib/ 79 $(INSTALL_DIR) $(1)/usr/lib/lua 80 $(INSTALL_DIR) $(1)/usr/lib/lua/luci 81 $(CP) -aR $(PKG_BUILD_DIR)/luasrc/* $(1)/usr/lib/lua/luci 82 83 $(INSTALL_DIR) $(1)/www 84 $(CP) -a $(PKG_BUILD_DIR)/htdocs/debug.html $(1)/www 85 $(INSTALL_DIR) $(1)/www/js 86 $(CP) $(PKG_BUILD_DIR)/htdocs/js/* $(1)/www/js 87 88 $(INSTALL_DIR) $(1)/www/luci-static 89 $(INSTALL_DIR) $(1)/www/luci-static/resources 90 $(INSTALL_DIR) $(1)/www/luci-static/resources/streamboost 91 $(INSTALL_DIR) $(1)/www/luci-static/resources/streamboost/js 92 echo 'var g_strManufacturer=$(CONFIG_KROUTER_CUSTOMER);' \ 93 > $(1)/www/luci-static/resources/streamboost/js/ident.js 94 echo 'var g_strBoard=$(CONFIG_KROUTER_BOARD);' \ 95 >> $(1)/www/luci-static/resources/streamboost/js/ident.js 96 97 $(INSTALL_DIR) $(1)/www/luci-static/resources/streamboost/css 98 $(CP) -aR $(PKG_BUILD_DIR)/htdocs/luci-static/resources/streamboost/css/* $(1)/www/luci-static/resources/streamboost/css 99 100 $(INSTALL_DIR) $(1)/www/luci-static/resources/streamboost/images 101 $(CP) -aR $(PKG_BUILD_DIR)/htdocs/luci-static/resources/streamboost/images/* $(1)/www/luci-static/resources/streamboost/images 102 cd $(1)/www/; ln -s luci-static/resources/streamboost/images images 103 104 $(INSTALL_DIR) $(1)/etc/uci-defaults 105 $(CP) -a ./files/etc/uci-defaults/* $(1)/etc/uci-defaults/ 106endef 107 108define Package/$(PKG_NAME)/install 109 $(call Package/$(PKG_NAME)/Default/install,$(1)) 110 rm $(1)/usr/lib/lua/luci/controller/streamboost/sbmainstream.lua 111 rm $(1)/usr/lib/lua/luci/controller/streamboost/nostreamboost.lua 112endef 113 114define Package/$(PKG_NAME)-mainstream/install 115 $(call Package/$(PKG_NAME)/Default/install,$(1)) 116 rm $(1)/usr/lib/lua/luci/controller/streamboost/streamboost.lua 117 rm $(1)/usr/lib/lua/luci/controller/streamboost/nostreamboost.lua 118 $(CP) $(PKG_BUILD_DIR)/luasrc/controller/streamboost/sbmainstream.lua $(1)/usr/lib/lua/luci/controller/streamboost/streamboost.lua 119endef 120 121 122## don't use '$(INSTALL_DATA)' because that doesn't do recursive 123define Package/$(PKG_NAME)-assets/install 124 $(INSTALL_DIR) $(1)/www 125 $(INSTALL_DIR) $(1)/www/luci-static 126 $(INSTALL_DIR) $(1)/www/luci-static/resources 127 $(INSTALL_DIR) $(1)/www/luci-static/resources/streamboost 128 129 ## Note, this is copying from the icons directory to the images directory 130 $(INSTALL_DIR) $(1)/www/luci-static/resources/streamboost/images 131 $(CP) -aR $(PKG_BUILD_DIR)/htdocs/luci-static/resources/streamboost/icons/* $(1)/www/luci-static/resources/streamboost/images 132 133 $(INSTALL_DIR) $(1)/www/luci-static/resources/streamboost/trans 134 $(CP) -aR $(PKG_BUILD_DIR)/htdocs/luci-static/resources/streamboost/trans/*.{js,json} $(1)/www/luci-static/resources/streamboost/trans 135endef 136 137$(eval $(call BuildPackage,$(PKG_NAME))) 138$(eval $(call BuildPackage,$(PKG_NAME)-mainstream)) 139$(eval $(call BuildPackage,$(PKG_NAME)-assets)) 140