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.

113 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_VERSION:=0.4.5
  8. PKG_RELEASE:=2
  9. PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
  10. PKG_SOURCE_PROTO:=git
  11. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
  12. PKG_SOURCE_URL:=https://github.com/openwisp/openwisp-config.git
  13. PKG_SOURCE_VERSION:=0.4.5
  14. PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_SOURCE_VERSION)
  15. PKG_MIRROR_HASH:=017a8ed35ebfda2805426e7da02559d5cc2845ee9ded60fdae8e848d377424fb
  16. PKG_LICENSE:=GPL-3.0
  17. PKGARCH:=all
  18. include $(INCLUDE_DIR)/package.mk
  19. define Package/openwisp-config/default
  20. TITLE:=Remote configuration management agent ($(2) variant)
  21. CATEGORY:=Administration
  22. SECTION:=admin
  23. SUBMENU:=openwisp
  24. DEPENDS:=+curl +lua +libuci-lua +luafilesystem $(3)
  25. VARIANT:=$(1)
  26. MAINTAINER:=Federico Capoano <f.capoano@cineca.it>
  27. URL:=http://openwisp.org
  28. endef
  29. Package/openwisp-config-openssl=$(call Package/openwisp-config/default,openssl,OpenSSL,+ca-certificates +libopenssl)
  30. Package/openwisp-config-mbedtls=$(call Package/openwisp-config/default,mbedtls,mbedTLS,+ca-certificates +libmbedtls)
  31. Package/openwisp-config-cyassl=$(call Package/openwisp-config/default,cyassl,CyaSSL,+ca-certificates +libcyassl)
  32. Package/openwisp-config-nossl=$(call Package/openwisp-config/default,nossl,No SSL)
  33. define Build/Compile
  34. endef
  35. define Package/openwisp-config-$(BUILD_VARIANT)/conffiles
  36. /etc/config/openwisp
  37. endef
  38. ifeq ($(BUILD_VARIANT),openssl)
  39. CONFIG_OPENWISP_UCI:=ssl
  40. endif
  41. ifeq ($(BUILD_VARIANT),mbedtls)
  42. CONFIG_OPENWISP_UCI:=ssl
  43. endif
  44. ifeq ($(BUILD_VARIANT),cyassl)
  45. CONFIG_OPENWISP_UCI:=ssl
  46. endif
  47. ifeq ($(BUILD_VARIANT),nossl)
  48. CONFIG_OPENWISP_UCI:=nossl
  49. endif
  50. define Package/openwisp-config-$(BUILD_VARIANT)/install
  51. $(INSTALL_DIR) \
  52. $(1)/usr/sbin \
  53. $(1)/etc/init.d \
  54. $(1)/etc/config \
  55. $(1)/etc/openwisp \
  56. $(1)/usr/lib/lua/openwisp
  57. $(INSTALL_BIN) \
  58. $(PKG_BUILD_DIR)/openwisp-config/files/openwisp.agent \
  59. $(1)/usr/sbin/openwisp_config
  60. $(INSTALL_BIN) \
  61. $(PKG_BUILD_DIR)/openwisp-config/files/openwisp.init \
  62. $(1)/etc/init.d/openwisp_config
  63. $(INSTALL_CONF) $(PKG_BUILD_DIR)/openwisp-config/files/openwisp-$(CONFIG_OPENWISP_UCI).config \
  64. $(1)/etc/config/openwisp
  65. $(INSTALL_BIN) \
  66. $(PKG_BUILD_DIR)/openwisp-config/files/sbin/openwisp-reload-config \
  67. $(1)/usr/sbin/openwisp-reload-config
  68. $(INSTALL_BIN) \
  69. $(PKG_BUILD_DIR)/openwisp-config/files/lib/openwisp/utils.lua \
  70. $(1)/usr/lib/lua/openwisp/utils.lua
  71. $(INSTALL_BIN) \
  72. $(PKG_BUILD_DIR)/openwisp-config/files/sbin/openwisp-store-unmanaged.lua \
  73. $(1)/usr/sbin/openwisp-store-unmanaged
  74. $(INSTALL_BIN) \
  75. $(PKG_BUILD_DIR)/openwisp-config/files/sbin/openwisp-restore-unmanaged.lua \
  76. $(1)/usr/sbin/openwisp-restore-unmanaged
  77. $(INSTALL_BIN) \
  78. $(PKG_BUILD_DIR)/openwisp-config/files/sbin/openwisp-remove-default-wifi.lua \
  79. $(1)/usr/sbin/openwisp-remove-default-wifi
  80. $(INSTALL_BIN) \
  81. $(PKG_BUILD_DIR)/openwisp-config/files/sbin/openwisp-uci-autoname.lua \
  82. $(1)/usr/sbin/openwisp-uci-autoname
  83. $(INSTALL_BIN) \
  84. $(PKG_BUILD_DIR)/openwisp-config/files/sbin/openwisp-update-config.lua \
  85. $(1)/usr/sbin/openwisp-update-config
  86. $(CP) $(PKG_BUILD_DIR)/VERSION $(1)/etc/openwisp/
  87. endef
  88. $(eval $(call BuildPackage,openwisp-config-openssl))
  89. $(eval $(call BuildPackage,openwisp-config-mbedtls))
  90. $(eval $(call BuildPackage,openwisp-config-cyassl))
  91. $(eval $(call BuildPackage,openwisp-config-nossl))