add PKG Makefile for hoodfile #789
This commit is contained in:
parent
4e7878c228
commit
16d7eafdf3
38
package/ffnw-hoods/Makefile
Normal file
38
package/ffnw-hoods/Makefile
Normal file
@ -0,0 +1,38 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=ffnw-hoods
|
||||
PKG_VERSION:=1
|
||||
PKG_RELEASE:=1
|
||||
|
||||
PKG_BUILD_DEPENDS := luci-base/host lua-cjson/host
|
||||
|
||||
PKG_BUILD_DIR := $(BUILD_DIR)/$(PKG_NAME)
|
||||
|
||||
include $(GLUONDIR)/include/package.mk
|
||||
|
||||
define Package/ffnw-hoods
|
||||
SECTION:=networke
|
||||
CATEGORY:=Freifunk Nordwest
|
||||
TITLE:=Hoodjson file
|
||||
endef
|
||||
|
||||
define Package/ffnw-hoods/description
|
||||
Hoodjson file for defined hoods
|
||||
endef
|
||||
|
||||
define Build/Prepare
|
||||
mkdir -p $(PKG_BUILD_DIR)
|
||||
endef
|
||||
|
||||
define Build/Configure
|
||||
endef
|
||||
|
||||
define Build/Compile
|
||||
endef
|
||||
|
||||
define Package/ffnw-hoods/install
|
||||
$(INSTALL_DIR) $(1)/lib/ffnw/hoods
|
||||
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
|
||||
endef
|
||||
|
||||
$(eval $(call BuildPackage,ffnw-hoods))
|
Loading…
Reference in New Issue
Block a user