Skip to content

Commit

Permalink
[Makefile] Improved build options (ssl, category, maintainer)
Browse files Browse the repository at this point in the history
- switched category to Administration
- explicit maintainer
- different ssl options: openssl, polarssl, cyassl, nossl
- different config file if using nossl variant
  • Loading branch information
nemesifier committed Jun 22, 2016
1 parent e4cce77 commit bd8ad3b
Show file tree
Hide file tree
Showing 4 changed files with 57 additions and 24 deletions.
4 changes: 0 additions & 4 deletions openwisp-config/Config.in

This file was deleted.

55 changes: 35 additions & 20 deletions openwisp-config/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -5,39 +5,51 @@

include $(TOPDIR)/rules.mk

PKG_NAME:=openwisp
PKG_NAME:=openwisp-config
PKG_VERSION:=$(shell cat ../VERSION)
PKG_RELEASE:=1
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(BUILD_VARIANT)/$(PKG_SOURCE_SUBDIR)
PKG_LICENSE:=GPL-3.0

include $(INCLUDE_DIR)/package.mk

define Package/openwisp-config
SECTION:=openwisp
CATEGORY:=OpenWISP
TITLE:=OpenWISP Configuration Agent
MAINTAINER:=OpenWISP Project [email protected]
PKG_ARCH:=all
DEPENDS:=+libpolarssl +curl +ca-certificates \
+lua +libuci-lua +luafilesystem
define Package/openwisp-config/default
TITLE:=Remote configuration management agent ($(2) variant)
CATEGORY:=Administration
SECTION:=admin
SUBMENU:=openwisp
DEPENDS:=+curl +lua +libuci-lua +luafilesystem $(3)
VARIANT:=$(1)
MAINTAINER:=Federico Capoano <[email protected]>
URL:=http://openwisp.org
endef

define Package/openwisp-config/description
OpenWISP controller agent, updates configuration via HTTP
endef

define Package/openwisp-config/config
source "$(SOURCE)/Config.in"
endef
Package/openwisp-config-openssl=$(call Package/openwisp-config/default,openssl,OpenSSL,+ca-certificates +libopenssl)
Package/openwisp-config-polarssl=$(call Package/openwisp-config/default,polarssl,PolarSSL,+ca-certificates +libpolarssl)
Package/openwisp-config-cyassl=$(call Package/openwisp-config/default,cyassl,CyaSSL,+ca-certificates +libcyassl)
Package/openwisp-config-nossl=$(call Package/openwisp-config/default,nossl,No SSL)

define Build/Compile
endef

define Package/openwisp-config/conffiles
define Package/openwisp-config-$(BUILD_VARIANT)/conffiles
/etc/config/openwisp
endef

define Package/openwisp-config/install
ifeq ($(BUILD_VARIANT),openssl)
CONFIG_OPENWISP_UCI:=ssl
endif
ifeq ($(BUILD_VARIANT),polarssl)
CONFIG_OPENWISP_UCI:=ssl
endif
ifeq ($(BUILD_VARIANT),cyassl)
CONFIG_OPENWISP_UCI:=ssl
endif
ifeq ($(BUILD_VARIANT),nossl)
CONFIG_OPENWISP_UCI:=nossl
endif

define Package/openwisp-config-$(BUILD_VARIANT)/install
$(INSTALL_DIR) \
$(1)/usr/sbin \
$(1)/etc/init.d \
Expand All @@ -53,7 +65,7 @@ define Package/openwisp-config/install
files/openwisp.init \
$(1)/etc/init.d/openwisp_config

$(INSTALL_CONF) files/openwisp.config \
$(INSTALL_CONF) files/openwisp-$(CONFIG_OPENWISP_UCI).config \
$(1)/etc/config/openwisp

$(INSTALL_BIN) \
Expand Down Expand Up @@ -87,4 +99,7 @@ define Package/openwisp-config/install
$(CP) ../VERSION $(1)/etc/openwisp/
endef

$(eval $(call BuildPackage,openwisp-config))
$(eval $(call BuildPackage,openwisp-config-openssl))
$(eval $(call BuildPackage,openwisp-config-polarssl))
$(eval $(call BuildPackage,openwisp-config-cyassl))
$(eval $(call BuildPackage,openwisp-config-nossl))
22 changes: 22 additions & 0 deletions openwisp-config/files/openwisp-nossl.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# For more information about these config options please see the README
# or https://github.com/openwisp/openwisp-config#configuration-options

config controller 'http'
option url ''
#option interval '120'
option verify_ssl '0'
#option shared_secret ''
#option consistent_key '1'
#option merge_config '1'
#option test_config '1'
#option test_script '/usr/sbin/mytest'
option uuid ''
option key ''
list unmanaged 'system.@led'
list unmanaged 'network.loopback'
list unmanaged 'network.@switch'
list unmanaged 'network.@switch_vlan'
# curl options
#option connect_timeout '15'
#option max_time '30'
#option capath '/etc/ssl/certs'
File renamed without changes.

0 comments on commit bd8ad3b

Please sign in to comment.