Makefile 803 B

1234567891011121314151617181920212223242526272829303132333435363738
  1. include $(TOPDIR)/rules.mk
  2. PKG_NAME:=ffnw-hoods
  3. PKG_VERSION:=1
  4. PKG_RELEASE:=1
  5. PKG_BUILD_DEPENDS := luci-base/host lua-cjson/host
  6. PKG_BUILD_DIR := $(BUILD_DIR)/$(PKG_NAME)
  7. include $(GLUONDIR)/include/package.mk
  8. define Package/ffnw-hoods
  9. SECTION:=networke
  10. CATEGORY:=Freifunk Nordwest
  11. TITLE:=Hoodjson file
  12. endef
  13. define Package/ffnw-hoods/description
  14. Hoodjson file for defined hoods
  15. endef
  16. define Build/Prepare
  17. mkdir -p $(PKG_BUILD_DIR)
  18. endef
  19. define Build/Configure
  20. endef
  21. define Build/Compile
  22. endef
  23. define Package/ffnw-hoods/install
  24. $(INSTALL_DIR) $(1)/lib/ffnw/hoods
  25. lua -e 'local cjson = require("cjson"); print(cjson.encode(cjson.decode(assert(io.open("./files/lib/ffnw/hoods/hoods.json"):read("*a")))))' > $(1)/lib/ffnw/hoods/hoods.json
  26. endef
  27. $(eval $(call BuildPackage,ffnw-hoods))