You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

110 lines
3.4 KiB

  1. # openwisp.org
  2. #
  3. # This is free software, licensed under the GNU General Public License v3.
  4. # See /LICENSE for more information.
  5. include $(TOPDIR)/rules.mk
  6. PKG_NAME:=openwisp-config
  7. PKG_SOURCE_VERSION:=0.5.0
  8. PKG_RELEASE:=1
  9. PKG_SOURCE_PROTO:=git
  10. PKG_SOURCE_URL:=https://github.com/openwisp/openwisp-config.git
  11. PKG_MIRROR_HASH:=337a3a9542a0898da9f951256b0d19b6bc87ced98f4ec6dc9646172b551880ef
  12. PKG_MAINTAINER:=Federico Capoano <f.capoano@openwisp.io>
  13. PKG_LICENSE:=GPL3.0-or-later
  14. PKGARCH:=all
  15. include $(INCLUDE_DIR)/package.mk
  16. define Package/openwisp-config/default
  17. TITLE:=Remote configuration management agent ($(2) variant)
  18. CATEGORY:=Administration
  19. SECTION:=admin
  20. SUBMENU:=openwisp
  21. DEPENDS:=+curl +lua +libuci-lua +luafilesystem +luci-lib-nixio $(3)
  22. VARIANT:=$(1)
  23. PKGARCH:=all
  24. URL:=http://openwisp.org
  25. endef
  26. Package/openwisp-config-openssl=$(call Package/openwisp-config/default,openssl,OpenSSL,+ca-certificates +libopenssl)
  27. Package/openwisp-config-mbedtls=$(call Package/openwisp-config/default,mbedtls,mbedTLS,+ca-certificates +libmbedtls)
  28. Package/openwisp-config-wolfssl=$(call Package/openwisp-config/default,wolfssl,WolfSSL,+ca-certificates +libwolfssl)
  29. Package/openwisp-config-nossl=$(call Package/openwisp-config/default,nossl,No SSL)
  30. define Build/Compile
  31. endef
  32. define Package/openwisp-config-$(BUILD_VARIANT)/conffiles
  33. /etc/config/openwisp
  34. endef
  35. CONFIG_OPENWISP_UCI:=ssl
  36. ifeq ($(BUILD_VARIANT),nossl)
  37. CONFIG_OPENWISP_UCI:=nossl
  38. endif
  39. define Package/openwisp-config-$(BUILD_VARIANT)/install
  40. $(INSTALL_DIR) \
  41. $(1)/usr/sbin \
  42. $(1)/etc/init.d \
  43. $(1)/etc/config \
  44. $(1)/etc/openwisp \
  45. $(1)/usr/lib/lua/openwisp
  46. $(INSTALL_BIN) \
  47. $(PKG_BUILD_DIR)/openwisp-config/files/openwisp.agent \
  48. $(1)/usr/sbin/openwisp_config
  49. $(INSTALL_BIN) \
  50. $(PKG_BUILD_DIR)/openwisp-config/files/openwisp.init \
  51. $(1)/etc/init.d/openwisp_config
  52. $(INSTALL_CONF) $(PKG_BUILD_DIR)/openwisp-config/files/openwisp-$(CONFIG_OPENWISP_UCI).config \
  53. $(1)/etc/config/openwisp
  54. $(INSTALL_BIN) \
  55. $(PKG_BUILD_DIR)/openwisp-config/files/sbin/openwisp-reload-config \
  56. $(1)/usr/sbin/openwisp-reload-config
  57. $(INSTALL_BIN) \
  58. $(PKG_BUILD_DIR)/openwisp-config/files/lib/openwisp/utils.lua \
  59. $(1)/usr/lib/lua/openwisp/utils.lua
  60. $(INSTALL_BIN) \
  61. $(PKG_BUILD_DIR)/openwisp-config/files/lib/openwisp/net.lua \
  62. $(1)/usr/lib/lua/openwisp/net.lua
  63. $(INSTALL_BIN) \
  64. $(PKG_BUILD_DIR)/openwisp-config/files/sbin/openwisp-store-unmanaged.lua \
  65. $(1)/usr/sbin/openwisp-store-unmanaged
  66. $(INSTALL_BIN) \
  67. $(PKG_BUILD_DIR)/openwisp-config/files/sbin/openwisp-restore-unmanaged.lua \
  68. $(1)/usr/sbin/openwisp-restore-unmanaged
  69. $(INSTALL_BIN) \
  70. $(PKG_BUILD_DIR)/openwisp-config/files/sbin/openwisp-remove-default-wifi.lua \
  71. $(1)/usr/sbin/openwisp-remove-default-wifi
  72. $(INSTALL_BIN) \
  73. $(PKG_BUILD_DIR)/openwisp-config/files/sbin/openwisp-uci-autoname.lua \
  74. $(1)/usr/sbin/openwisp-uci-autoname
  75. $(INSTALL_BIN) \
  76. $(PKG_BUILD_DIR)/openwisp-config/files/sbin/openwisp-update-config.lua \
  77. $(1)/usr/sbin/openwisp-update-config
  78. $(INSTALL_BIN) \
  79. $(PKG_BUILD_DIR)/openwisp-config/files/sbin/openwisp-get-address.lua \
  80. $(1)/usr/sbin/openwisp-get-address
  81. $(CP) $(PKG_BUILD_DIR)/VERSION $(1)/etc/openwisp/
  82. endef
  83. $(eval $(call BuildPackage,openwisp-config-openssl))
  84. $(eval $(call BuildPackage,openwisp-config-mbedtls))
  85. $(eval $(call BuildPackage,openwisp-config-wolfssl))
  86. $(eval $(call BuildPackage,openwisp-config-nossl))