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