Makefile 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. include $(TOPDIR)/rules.mk
  2. PKG_NAME:=ffho-site-auto-select
  3. PKG_VERSION:=1
  4. PKG_RELEASE:=$(GLUON_VERSION).$(GLUON_SITE_CODE)-$(GLUON_RELEASE).$(GLUON_CONFIG_VERSION)
  5. PFG_BUILD_DEPENDS := lua-cjson/host
  6. PKG_BUILD_DIR := $(BUILD_DIR)/$(PKG_NAME)
  7. include $(INCLUDE_DIR)/package.mk
  8. define Package/ffho-site-auto-select
  9. SECTION:=ffho
  10. CATEGORY:=Gluon
  11. TITLE:=Toolset to autodetect the site.
  12. DEPENDS:=+gluon-core +gluon-cron +gluon-neighbour-info +ffho-site-generate
  13. MAINTAINER:=Freifunk Hochstift <maschinenraum@paderborn.freifunk.net>
  14. URL:=https://git.c3pb.de/freifunk-pb/ffho-packages
  15. SOURCE:=git@git.c3pb.de:freifunk-pb/ffho-packages.git
  16. endef
  17. define Package/ffho-site-auto-select/description
  18. Toolset to autodetect the site by geo and gluon-neighbour-info.
  19. endef
  20. define Build/Prepare
  21. mkdir -p $(PKG_BUILD_DIR)
  22. endef
  23. define Build/Configure
  24. endef
  25. define Build/Compile
  26. endef
  27. define Package/ffho-site-auto-select/preinst
  28. endef
  29. define Package/ffho-site-auto-select/install
  30. $(CP) ./files/* $(1)/
  31. $(INSTALL_DIR) $(1)/lib/gluon/site-select
  32. lua -e 'print(require("cjson").encode(require("cjson").decode(io.open("$(GLUON_SITEDIR)/extra/geo.json"):read("*a"))))' > $(1)/lib/gluon/site-select/geo.json
  33. endef
  34. $(eval $(call BuildPackage,ffho-site-auto-select))