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.

120 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:=2.0
  10. PKG_RELEASE:=1
  11. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-src.tar.gz
  12. PKG_SOURCE_URL:=@SF/emailrelay/$(PKG_VERSION)
  13. PKG_HASH:=0b3a98edfdc8deaf2b3d14e2d2a7fa8402f6703d83ac7458653994124de6a587
  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. --without-doxygen \
  59. --without-man2html \
  60. --without-mbedtls \
  61. --without-pam \
  62. --disable-bsd \
  63. --disable-gui \
  64. --disable-mac \
  65. --disable-testing \
  66. --disable-windows
  67. ifeq ($(CONFIG_EMAILRELAY_SSL),y)
  68. CONFIGURE_ARGS += \
  69. --with-openssl
  70. else
  71. CONFIGURE_ARGS += \
  72. --without-openssl
  73. endif
  74. ifeq ($(CONFIG_EMAILRELAY_SUPPORT_VERBOSE_DBG),y)
  75. CONFIGURE_ARGS += \
  76. --enable-debug=yes
  77. endif
  78. ifeq ($(CONFIG_OPENSSL_WITH_SSL3),y)
  79. CONFIGURE_VARS += \
  80. CXXFLAGS="$$$$CXXFLAGS -DSSL3_SUPPORT"
  81. endif
  82. define Package/emailrelay/install
  83. $(INSTALL_DIR) $(1)/usr/bin
  84. $(INSTALL_BIN) $(PKG_BUILD_DIR)/src/main/emailrelay $(1)/usr/bin/
  85. $(INSTALL_BIN) $(PKG_BUILD_DIR)/src/main/emailrelay-filter-copy $(1)/usr/bin/
  86. $(INSTALL_BIN) $(PKG_BUILD_DIR)/src/main/emailrelay-passwd $(1)/usr/bin/
  87. $(INSTALL_BIN) $(PKG_BUILD_DIR)/src/main/emailrelay-submit $(1)/usr/bin/
  88. $(INSTALL_DIR) $(1)/etc
  89. $(INSTALL_DATA) files/$(PKG_NAME).auth $(1)/etc/
  90. $(INSTALL_DIR) $(1)/etc/config
  91. $(INSTALL_CONF) files/$(PKG_NAME).config $(1)/etc/config/$(PKG_NAME)
  92. $(INSTALL_DIR) $(1)/etc/init.d
  93. $(INSTALL_BIN) files/$(PKG_NAME).init $(1)/etc/init.d/$(PKG_NAME)
  94. endef
  95. $(eval $(call BuildPackage,emailrelay))