emailrelay: added configuration options
- moved from net to mail category - removed no-ssl package and added ssl support as configuration option (default enabled) - added configuration option to support extended logging (default disabled) - disabled build of test tools - added LEDE compatibility (support for openssl without SSL3) Signed-off-by: Federico Di Marco <fededim@gmail.com>
This commit is contained in:
parent
e1aa1994ce
commit
5758939831
4 changed files with 53 additions and 42 deletions
|
@ -9,45 +9,51 @@ include $(TOPDIR)/rules.mk
|
|||
|
||||
PKG_NAME:=emailrelay
|
||||
PKG_VERSION:=1.9
|
||||
PKG_RELEASE:=2
|
||||
PKG_RELEASE:=3
|
||||
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-src.tar.gz
|
||||
PKG_SOURCE_URL:=@SF/emailrelay/$(PKG_VERSION)
|
||||
PKG_MD5SUM:=0892fbf993407c6b5a16f96e23299b62
|
||||
|
||||
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(BUILD_VARIANT)/$(PKG_NAME)-$(PKG_VERSION)
|
||||
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
|
||||
|
||||
PKG_CONFIG_DEPENDS:=CONFIG_EMAILRELAY_SUPPORT_VERBOSE_DBG CONFIG_EMAILRELAY_SSL
|
||||
|
||||
|
||||
include $(INCLUDE_DIR)/uclibc++.mk
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
|
||||
define Package/emailrelay/Default
|
||||
SECTION:=net
|
||||
SUBMENU:=Web Servers/Proxies
|
||||
CATEGORY:=Network
|
||||
DEPENDS:=$(CXX_DEPENDS)
|
||||
define Package/emailrelay
|
||||
SECTION:=mail
|
||||
CATEGORY:=Mail
|
||||
DEPENDS:=$(CXX_DEPENDS) +EMAILRELAY_SSL:libopenssl
|
||||
TITLE:=A simple SMTP proxy and MTA
|
||||
URL:=http://emailrelay.sourceforge.net/
|
||||
MAINTAINER:=Federico Di Marco <fededim@gmail.com>
|
||||
MENU:=1
|
||||
endef
|
||||
|
||||
|
||||
define Package/emailrelay
|
||||
$(call Package/emailrelay/Default)
|
||||
TITLE+= (with OpenSSL support)
|
||||
DEPENDS+=+libopenssl
|
||||
VARIANT:=ssl
|
||||
endef
|
||||
define Package/emailrelay/config
|
||||
config EMAILRELAY_SUPPORT_VERBOSE_DBG
|
||||
bool "Enable support for extended logging"
|
||||
depends on PACKAGE_emailrelay
|
||||
default n
|
||||
help
|
||||
Enables support for extended logging (must also be explicitely enabled by using command line switch --debug when starting emailrelay)
|
||||
|
||||
define Package/emailrelay-nossl
|
||||
$(call Package/emailrelay/Default)
|
||||
TITLE+= (no SSL support)
|
||||
VARIANT:=nossl
|
||||
config EMAILRELAY_SSL
|
||||
bool "Enable support for OpenSSL"
|
||||
depends on PACKAGE_emailrelay
|
||||
default y
|
||||
select PACKAGE_libopenssl
|
||||
help
|
||||
Builds the package with OpenSSL support (SSMTP is supported).
|
||||
endef
|
||||
|
||||
|
||||
|
||||
define Package/emailrelay/Default/description
|
||||
define Package/emailrelay/description
|
||||
Emailrelay is a simple SMTP proxy and store-and-forward message transfer agent (MTA).
|
||||
|
||||
When running as a proxy all e-mail messages can be passed through
|
||||
|
@ -59,43 +65,38 @@ define Package/emailrelay/Default/description
|
|||
endef
|
||||
|
||||
|
||||
define Package/emailrelay/description
|
||||
$(call Package/emailrelay/Default/description)
|
||||
|
||||
This package is built with OpenSSL support (SSMTP is supported).
|
||||
endef
|
||||
|
||||
define Package/emailrelay-nossl/description
|
||||
$(call Package/emailrelay/Default/description)
|
||||
|
||||
This package is built without SSL support (no SSMTP)
|
||||
endef
|
||||
|
||||
|
||||
define Package/emailrelay/conffiles
|
||||
/etc/emailrelay.auth
|
||||
endef
|
||||
|
||||
define Package/emailrelay-nossl/conffiles
|
||||
/etc/emailrelay.auth
|
||||
endef
|
||||
|
||||
CONFIGURE_ARGS += \
|
||||
--with-pam=no
|
||||
--with-pam=no \
|
||||
--enable-testing=no
|
||||
|
||||
CONFIGURE_VARS += \
|
||||
CXXFLAGS="$$$$CXXFLAGS -fno-rtti"
|
||||
|
||||
ifeq ($(BUILD_VARIANT),ssl)
|
||||
|
||||
ifeq ($(CONFIG_EMAILRELAY_SSL),y)
|
||||
CONFIGURE_ARGS += \
|
||||
--with-openssl
|
||||
endif
|
||||
|
||||
ifeq ($(BUILD_VARIANT),nossl)
|
||||
else
|
||||
CONFIGURE_ARGS += \
|
||||
--with-openssl=no
|
||||
endif
|
||||
|
||||
|
||||
ifeq ($(CONFIG_EMAILRELAY_SUPPORT_VERBOSE_DBG),y)
|
||||
CONFIGURE_ARGS += \
|
||||
--enable-debug=yes
|
||||
endif
|
||||
|
||||
ifeq ($(CONFIG_OPENSSL_WITH_SSL3),y)
|
||||
CONFIGURE_VARS += \
|
||||
CXXFLAGS="$$$$CXXFLAGS -DSSL3_SUPPORT"
|
||||
endif
|
||||
|
||||
define Package/emailrelay/install
|
||||
$(INSTALL_DIR) $(1)/usr/bin
|
||||
$(INSTALL_BIN) $(PKG_BUILD_DIR)/src/main/emailrelay $(1)/usr/bin/
|
||||
|
@ -109,8 +110,5 @@ define Package/emailrelay/install
|
|||
$(INSTALL_BIN) files/$(PKG_NAME).init $(1)/etc/init.d/$(PKG_NAME)
|
||||
endef
|
||||
|
||||
Package/emailrelay-nossl/install = $(Package/emailrelay/install)
|
||||
|
||||
|
||||
$(eval $(call BuildPackage,emailrelay))
|
||||
$(eval $(call BuildPackage,emailrelay-nossl))
|
13
mail/emailrelay/patches/010-ssl3-fix.patch
Normal file
13
mail/emailrelay/patches/010-ssl3-fix.patch
Normal file
|
@ -0,0 +1,13 @@
|
|||
--- a/src/gssl/gssl_openssl.cpp
|
||||
+++ b/src/gssl/gssl_openssl.cpp
|
||||
@@ -292,8 +292,10 @@ GSsl::Context::Context( const std::strin
|
||||
{
|
||||
if( (flags&3U) == 2U )
|
||||
m_ssl_ctx = SSL_CTX_new(SSLv23_method()) ;
|
||||
+#ifdef SSL3_SUPPORT
|
||||
else if( (flags&3U) == 3U )
|
||||
m_ssl_ctx = SSL_CTX_new(SSLv3_method()) ;
|
||||
+#endif
|
||||
else
|
||||
m_ssl_ctx = SSL_CTX_new(TLSv1_method()) ;
|
||||
|
Loading…
Reference in a new issue