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.

118 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:=4
  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_CONFIG_DEPENDS:=CONFIG_EMAILRELAY_SUPPORT_VERBOSE_DBG CONFIG_EMAILRELAY_SSL
  16. PKG_LICENSE:=GPL-3.0
  17. PKG_LICENSE_FILES:=COPYING
  18. #include $(INCLUDE_DIR)/uclibc++.mk # $(CXX_DEPENDS)
  19. include $(INCLUDE_DIR)/package.mk
  20. define Package/emailrelay
  21. SECTION:=mail
  22. CATEGORY:=Mail
  23. DEPENDS:=+EMAILRELAY_SSL:libopenssl +libstdcpp
  24. TITLE:=A simple SMTP proxy and MTA
  25. URL:=http://emailrelay.sourceforge.net/
  26. MENU:=1
  27. endef
  28. define Package/emailrelay/config
  29. config EMAILRELAY_SUPPORT_VERBOSE_DBG
  30. bool "Enable support for extended logging"
  31. depends on PACKAGE_emailrelay
  32. default n
  33. help
  34. Enables support for extended logging (must also be explicitely enabled by using command line switch --debug when starting emailrelay)
  35. config EMAILRELAY_SSL
  36. bool "Enable support for OpenSSL"
  37. depends on PACKAGE_emailrelay
  38. default y
  39. select PACKAGE_libopenssl
  40. help
  41. Builds the package with OpenSSL support (SSMTP is supported).
  42. endef
  43. define Package/emailrelay/description
  44. Emailrelay is a simple SMTP proxy and store-and-forward message transfer agent (MTA).
  45. When running as a proxy all e-mail messages can be passed through
  46. a user-defined program, such as a spam filter, which can drop,
  47. re-address or edit messages as they pass through. When running
  48. as a store-and-forward MTA incoming messages are stored in a
  49. local spool directory, and then forwarded to the next SMTP
  50. server on request.
  51. endef
  52. define Package/emailrelay/conffiles
  53. /etc/config/emailrelay
  54. /etc/emailrelay.auth
  55. endef
  56. CONFIGURE_ARGS += \
  57. --without-doxygen \
  58. --without-man2html \
  59. --without-mbedtls \
  60. --without-pam \
  61. --disable-bsd \
  62. --disable-gui \
  63. --disable-mac \
  64. --disable-testing \
  65. --disable-windows
  66. # Workaround for https://sourceforge.net/p/emailrelay/bugs/38/
  67. # This should be fixed in the next release.
  68. CONFIGURE_VARS += \
  69. ac_cv_search_pam_end=no
  70. ifeq ($(CONFIG_EMAILRELAY_SSL),y)
  71. CONFIGURE_ARGS += \
  72. --with-openssl
  73. else
  74. CONFIGURE_ARGS += \
  75. --without-openssl
  76. endif
  77. ifeq ($(CONFIG_EMAILRELAY_SUPPORT_VERBOSE_DBG),y)
  78. CONFIGURE_ARGS += \
  79. --enable-debug=yes
  80. endif
  81. define Package/emailrelay/install
  82. $(INSTALL_DIR) $(1)/usr/bin
  83. $(INSTALL_BIN) $(PKG_BUILD_DIR)/src/main/emailrelay $(1)/usr/bin/
  84. $(INSTALL_BIN) $(PKG_BUILD_DIR)/src/main/emailrelay-filter-copy $(1)/usr/bin/
  85. $(INSTALL_BIN) $(PKG_BUILD_DIR)/src/main/emailrelay-passwd $(1)/usr/bin/
  86. $(INSTALL_BIN) $(PKG_BUILD_DIR)/src/main/emailrelay-submit $(1)/usr/bin/
  87. $(INSTALL_DIR) $(1)/etc
  88. $(INSTALL_DATA) files/$(PKG_NAME).auth $(1)/etc/
  89. $(INSTALL_DIR) $(1)/etc/config
  90. $(INSTALL_CONF) files/$(PKG_NAME).config $(1)/etc/config/$(PKG_NAME)
  91. $(INSTALL_DIR) $(1)/etc/init.d
  92. $(INSTALL_BIN) files/$(PKG_NAME).init $(1)/etc/init.d/$(PKG_NAME)
  93. endef
  94. $(eval $(call BuildPackage,emailrelay))