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.

119 lines
3.1 KiB

  1. #
  2. # Copyright (C) 2006-2014 OpenWrt.org
  3. #
  4. # This is free software, licensed under the GNU General Public License v2.
  5. # See /LICENSE for more information.
  6. #
  7. include $(TOPDIR)/rules.mk
  8. PKG_NAME:=emailrelay
  9. PKG_VERSION:=1.9
  10. PKG_RELEASE:=5
  11. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-src.tar.gz
  12. PKG_SOURCE_URL:=@SF/emailrelay/$(PKG_VERSION)
  13. PKG_HASH:=869a3e2d053237d7f63784acc25e748af2dbf2d9b9c5c48e4a5269d4e4b5bda0
  14. PKG_MAINTAINER:=Federico Di Marco <fededim@gmail.com>
  15. PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
  16. PKG_CONFIG_DEPENDS:=CONFIG_EMAILRELAY_SUPPORT_VERBOSE_DBG CONFIG_EMAILRELAY_SSL
  17. PKG_LICENSE:=GPL-3.0
  18. PKG_LICENSE_FILES:=COPYING
  19. #include $(INCLUDE_DIR)/uclibc++.mk # $(CXX_DEPENDS)
  20. include $(INCLUDE_DIR)/package.mk
  21. define Package/emailrelay
  22. SECTION:=mail
  23. CATEGORY:=Mail
  24. DEPENDS:=+EMAILRELAY_SSL:libopenssl +libstdcpp
  25. TITLE:=A simple SMTP proxy and MTA
  26. URL:=http://emailrelay.sourceforge.net/
  27. MENU:=1
  28. endef
  29. define Package/emailrelay/config
  30. config EMAILRELAY_SUPPORT_VERBOSE_DBG
  31. bool "Enable support for extended logging"
  32. depends on PACKAGE_emailrelay
  33. default n
  34. help
  35. Enables support for extended logging (must also be explicitely enabled by using command line switch --debug when starting emailrelay)
  36. config EMAILRELAY_SSL
  37. bool "Enable support for OpenSSL"
  38. depends on PACKAGE_emailrelay
  39. default y
  40. select PACKAGE_libopenssl
  41. help
  42. Builds the package with OpenSSL support (SSMTP is supported).
  43. endef
  44. define Package/emailrelay/description
  45. Emailrelay is a simple SMTP proxy and store-and-forward message transfer agent (MTA).
  46. When running as a proxy all e-mail messages can be passed through
  47. a user-defined program, such as a spam filter, which can drop,
  48. re-address or edit messages as they pass through. When running
  49. as a store-and-forward MTA incoming messages are stored in a
  50. local spool directory, and then forwarded to the next SMTP
  51. server on request.
  52. endef
  53. define Package/emailrelay/conffiles
  54. /etc/config/emailrelay
  55. /etc/emailrelay.auth
  56. endef
  57. CONFIGURE_ARGS += \
  58. --with-pam=no \
  59. --enable-testing=no
  60. CONFIGURE_VARS += \
  61. CXXFLAGS="$$$$CXXFLAGS -fno-rtti"
  62. ifeq ($(CONFIG_EMAILRELAY_SSL),y)
  63. CONFIGURE_ARGS += \
  64. --with-openssl
  65. else
  66. CONFIGURE_ARGS += \
  67. --with-openssl=no
  68. endif
  69. ifeq ($(CONFIG_EMAILRELAY_SUPPORT_VERBOSE_DBG),y)
  70. CONFIGURE_ARGS += \
  71. --enable-debug=yes
  72. endif
  73. ifeq ($(CONFIG_OPENSSL_WITH_SSL3),y)
  74. CONFIGURE_VARS += \
  75. CXXFLAGS="$$$$CXXFLAGS -DSSL3_SUPPORT"
  76. endif
  77. define Package/emailrelay/install
  78. $(INSTALL_DIR) $(1)/usr/bin
  79. $(INSTALL_BIN) $(PKG_BUILD_DIR)/src/main/emailrelay $(1)/usr/bin/
  80. $(INSTALL_BIN) $(PKG_BUILD_DIR)/src/main/emailrelay-filter-copy $(1)/usr/bin/
  81. $(INSTALL_BIN) $(PKG_BUILD_DIR)/src/main/emailrelay-passwd $(1)/usr/bin/
  82. $(INSTALL_BIN) $(PKG_BUILD_DIR)/src/main/emailrelay-poke $(1)/usr/bin/
  83. $(INSTALL_BIN) $(PKG_BUILD_DIR)/src/main/emailrelay-submit $(1)/usr/bin/
  84. $(INSTALL_DIR) $(1)/etc
  85. $(INSTALL_DATA) files/$(PKG_NAME).auth $(1)/etc/
  86. $(INSTALL_DIR) $(1)/etc/config
  87. $(INSTALL_CONF) files/$(PKG_NAME).config $(1)/etc/config/$(PKG_NAME)
  88. $(INSTALL_DIR) $(1)/etc/init.d
  89. $(INSTALL_BIN) files/$(PKG_NAME).init $(1)/etc/init.d/$(PKG_NAME)
  90. endef
  91. $(eval $(call BuildPackage,emailrelay))