Makefile 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. include $(TOPDIR)/rules.mk
  2. PKG_NAME:=gluon-status-page
  3. PKG_VERSION:=2
  4. PKG_RELEASE:=1
  5. PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)
  6. PKG_BUILD_DEPENDS:=node/host
  7. include $(INCLUDE_DIR)/package.mk
  8. define Download/rjs
  9. FILE:=r.js
  10. URL:=http://requirejs.org/docs/release/2.1.10
  11. MD5SUM:=270154b3f5d417c3a42f1e58d03e6607
  12. endef
  13. define Download/Bacon
  14. FILE:=Bacon.js
  15. URL:=http://cdnjs.cloudflare.com/ajax/libs/bacon.js/0.7.71
  16. MD5SUM:=4600a60e1d7ffdb2259dfcce97c860ed
  17. endef
  18. define Download/almond
  19. FILE:=almond.js
  20. URL:=https://raw.githubusercontent.com/jrburke/almond/0.3.1
  21. MD5SUM:=aa66c0c0cb55a4627bb706df73f3aff5
  22. endef
  23. $(eval $(call Download,rjs))
  24. $(eval $(call Download,Bacon))
  25. $(eval $(call Download,almond))
  26. define Package/gluon-status-page
  27. SECTION:=gluon
  28. CATEGORY:=Gluon
  29. TITLE:=Adds a status page showing information about the node.
  30. DEPENDS:=+gluon-status-page-api
  31. endef
  32. define Package/gluon-status-page/description
  33. Adds a status page showing information about the node.
  34. Especially useful in combination with the next-node feature.
  35. endef
  36. define Build/Prepare
  37. mkdir -p $(PKG_BUILD_DIR)
  38. $(CP) -t $(PKG_BUILD_DIR) $(DL_DIR)/r.js $(DL_DIR)/Bacon.js $(DL_DIR)/almond.js
  39. endef
  40. define Build/Configure
  41. $(CP) ./src/* $(PKG_BUILD_DIR)/
  42. endef
  43. define Build/Compile
  44. cd $(PKG_BUILD_DIR) && \
  45. node r.js -o build.js && \
  46. node r.js -o cssIn=css/main.css out=style.css && \
  47. $(M4) index.html.m4 > index.html
  48. endef
  49. define Package/gluon-status-page/install
  50. $(INSTALL_DIR) $(1)/lib/gluon/status-page/www/
  51. $(INSTALL_DATA) $(PKG_BUILD_DIR)/index.html $(1)/lib/gluon/status-page/www/
  52. endef
  53. $(eval $(call BuildPackage,gluon-status-page))