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.

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