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.

116 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:=2
  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)-$(BUILD_VARIANT)/$(PKG_NAME)-$(PKG_VERSION)
  15. include $(INCLUDE_DIR)/uclibc++.mk
  16. include $(INCLUDE_DIR)/package.mk
  17. define Package/emailrelay/Default
  18. SECTION:=net
  19. SUBMENU:=Web Servers/Proxies
  20. CATEGORY:=Network
  21. DEPENDS:=$(CXX_DEPENDS)
  22. TITLE:=A simple SMTP proxy and MTA
  23. URL:=http://emailrelay.sourceforge.net/
  24. MAINTAINER := Federico Di Marco <fededim@gmail.com>
  25. endef
  26. define Package/emailrelay
  27. $(call Package/emailrelay/Default)
  28. TITLE+= (with OpenSSL support)
  29. DEPENDS+=+libopenssl
  30. VARIANT:=ssl
  31. endef
  32. define Package/emailrelay-nossl
  33. $(call Package/emailrelay/Default)
  34. TITLE+= (no SSL support)
  35. VARIANT:=nossl
  36. endef
  37. define Package/emailrelay/Default/description
  38. Emailrelay is a simple SMTP proxy and store-and-forward message transfer agent (MTA).
  39. When running as a proxy all e-mail messages can be passed through
  40. a user-defined program, such as a spam filter, which can drop,
  41. re-address or edit messages as they pass through. When running
  42. as a store-and-forward MTA incoming messages are stored in a
  43. local spool directory, and then forwarded to the next SMTP
  44. server on request.
  45. endef
  46. define Package/emailrelay/description
  47. $(call Package/emailrelay/Default/description)
  48. This package is built with OpenSSL support (SSMTP is supported).
  49. endef
  50. define Package/emailrelay-nossl/description
  51. $(call Package/emailrelay/Default/description)
  52. This package is built without SSL support (no SSMTP)
  53. endef
  54. define Package/emailrelay/conffiles
  55. /etc/emailrelay.auth
  56. endef
  57. define Package/emailrelay-nossl/conffiles
  58. /etc/emailrelay.auth
  59. endef
  60. CONFIGURE_ARGS += \
  61. --with-pam=no
  62. CONFIGURE_VARS += \
  63. CXXFLAGS="$$$$CXXFLAGS -fno-rtti"
  64. ifeq ($(BUILD_VARIANT),ssl)
  65. CONFIGURE_ARGS += \
  66. --with-openssl
  67. endif
  68. ifeq ($(BUILD_VARIANT),nossl)
  69. CONFIGURE_ARGS += \
  70. --with-openssl=no
  71. endif
  72. define Package/emailrelay/install
  73. $(INSTALL_DIR) $(1)/usr/bin
  74. $(INSTALL_BIN) $(PKG_BUILD_DIR)/src/main/emailrelay $(1)/usr/bin/
  75. $(INSTALL_BIN) $(PKG_BUILD_DIR)/src/main/emailrelay-filter-copy $(1)/usr/bin/
  76. $(INSTALL_BIN) $(PKG_BUILD_DIR)/src/main/emailrelay-passwd $(1)/usr/bin/
  77. $(INSTALL_BIN) $(PKG_BUILD_DIR)/src/main/emailrelay-poke $(1)/usr/bin/
  78. $(INSTALL_BIN) $(PKG_BUILD_DIR)/src/main/emailrelay-submit $(1)/usr/bin/
  79. $(INSTALL_DIR) $(1)/etc
  80. $(INSTALL_DATA) files/$(PKG_NAME).auth $(1)/etc/
  81. $(INSTALL_DIR) $(1)/etc/init.d
  82. $(INSTALL_BIN) files/$(PKG_NAME).init $(1)/etc/init.d/$(PKG_NAME)
  83. endef
  84. Package/emailrelay-nossl/install = $(Package/emailrelay/install)
  85. $(eval $(call BuildPackage,emailrelay))
  86. $(eval $(call BuildPackage,emailrelay-nossl))