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