gluon/package/gluon-status-page/Makefile

68 lines
1.7 KiB
Makefile
Raw Normal View History

2014-01-29 16:17:49 +00:00
include $(TOPDIR)/rules.mk
PKG_NAME:=gluon-status-page
PKG_VERSION:=1
PKG_RELEASE:=1
2014-08-18 12:58:16 +00:00
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)
PKG_BUILD_DEPENDS:=node/host
2014-01-29 16:17:49 +00:00
include $(INCLUDE_DIR)/package.mk
2014-08-18 12:58:16 +00:00
define Download/rjs
FILE:=r.js
URL:=http://requirejs.org/docs/release/2.1.10
MD5SUM:=270154b3f5d417c3a42f1e58d03e6607
endef
define Download/Bacon
FILE:=Bacon.js
URL:=http://cdnjs.cloudflare.com/ajax/libs/bacon.js/0.7.71
MD5SUM:=4600a60e1d7ffdb2259dfcce97c860ed
endef
define Download/almond
FILE:=almond.js
URL:=https://raw.githubusercontent.com/jrburke/almond/0.3.1
MD5SUM:=aa66c0c0cb55a4627bb706df73f3aff5
endef
$(eval $(call Download,rjs))
$(eval $(call Download,Bacon))
$(eval $(call Download,almond))
2014-01-29 16:17:49 +00:00
define Package/gluon-status-page
SECTION:=gluon
CATEGORY:=Gluon
TITLE:=Adds a status page showing information about the node.
DEPENDS:=+gluon-core +uhttpd +gluon-neighbour-info +gluon-announce +libiwinfo-lua +luci-lib-jsonc
2014-01-29 16:17:49 +00:00
endef
define Package/gluon-status-page/description
Adds a status page showing information about the node.
Especially useful in combination with the next-node feature.
endef
define Build/Prepare
mkdir -p $(PKG_BUILD_DIR)
2014-08-18 12:58:16 +00:00
$(CP) -t $(PKG_BUILD_DIR) $(DL_DIR)/r.js $(DL_DIR)/Bacon.js $(DL_DIR)/almond.js
2014-01-29 16:17:49 +00:00
endef
define Build/Configure
2014-08-18 12:58:16 +00:00
$(CP) ./src/* $(PKG_BUILD_DIR)/
2014-01-29 16:17:49 +00:00
endef
define Build/Compile
2014-08-18 12:58:16 +00:00
cd $(PKG_BUILD_DIR) && \
node r.js -o build.js && \
node r.js -o cssIn=css/main.css out=style.css && \
$(M4) index.html.m4 > index.html
2014-01-29 16:17:49 +00:00
endef
define Package/gluon-status-page/install
2014-08-18 12:58:16 +00:00
$(INSTALL_DIR) $(1)/lib/gluon/status-page/www/
$(INSTALL_DATA) $(PKG_BUILD_DIR)/index.html $(1)/lib/gluon/status-page/www/
2014-01-29 16:17:49 +00:00
endef
$(eval $(call BuildPackage,gluon-status-page))