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.

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