From f9cc7d5aa9d62af74c3f1ddf5ec706ee9826d967 Mon Sep 17 00:00:00 2001 From: Xiangfu Liu Date: Mon, 22 Nov 2010 10:50:08 +0800 Subject: [PATCH] add msmtp-queue package. when it goto upstream, we will delete it Signed-off-by: Xiangfu Liu --- msmtp-queue/Makefile | 116 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 116 insertions(+) create mode 100644 msmtp-queue/Makefile diff --git a/msmtp-queue/Makefile b/msmtp-queue/Makefile new file mode 100644 index 0000000..533149e --- /dev/null +++ b/msmtp-queue/Makefile @@ -0,0 +1,116 @@ +# +# Copyright (C) 2009 David Cooper +# Copyright (C) 2009-2010 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=msmtp-queue +PKG_VERSION:=1.4.19 +PKG_RELEASE:=3 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 +PKG_SOURCE_URL:=@SF/msmtp +PKG_MD5SUM:=f0afdc943bf7c8a3a3bf3fe1a73072c4 + +PKG_FIXUP:=libtool + +PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(BUILD_VARIANT)/$(PKG_NAME)-$(PKG_VERSION) + +include $(INCLUDE_DIR)/package.mk + +define Package/msmtp-queue/Default + SECTION:=mail + CATEGORY:=Mail + TITLE:=Simple sendmail SMTP forwarding + URL:=http://msmtp.sourceforge.net/ +endef + +define Package/msmtp-queue/Default/conffiles +/etc/msmtprc +endef + +define Package/msmtp-queue/Default/description + msmtp is an SMTP client. In the default mode, it transmits a mail to + an SMTP server (for example at a free mail provider) which does the + delivery. To use this program with your mail user agent (MUA), create + a configuration file with your mail account(s) and tell your MUA to + call msmtp instead of /usr/sbin/sendmail. +endef + +define Package/msmtp-queue +$(call Package/msmtp-queue/Default) + DEPENDS+= +libopenssl + TITLE+= (with SSL support) + VARIANT:=ssl +endef + +define Package/msmtp-queue/conffiles +$(call Package/msmtp-queue/Default/conffiles) +endef + +define Package/msmtp-queue/description +$(call Package/msmtp-queue/Default/description) + This package is built with SSL support. +endef + +define Package/msmtp-queue-nossl +$(call Package/msmtp-queue/Default) + TITLE+= (without SSL support) + VARIANT:=nossl +endef + +define Package/msmtp-queue-nossl/conffiles +$(call Package/msmtp-queue/Default/conffiles) +endef + +define Package/msmtp-queue-nossl/description +$(call Package/msmtp-queue/Default/description) + This package is built without SSL support. +endef + +CONFIGURE_ARGS += \ + --disable-rpath \ + --without-libssl32 \ + --without-libintl \ + --without-libgsasl \ + --without-libidn + +MAKE_FLAGS := + +ifeq ($(BUILD_VARIANT),ssl) + CONFIGURE_ARGS += \ + --with-ssl=openssl \ + --with-libssl-prefix="$(STAGING_DIR)/usr/include" +endif + +ifeq ($(BUILD_VARIANT),nossl) + CONFIGURE_ARGS += \ + --with-ssl=no +endif + +define Package/msmtp-queue/install + $(INSTALL_DIR) $(1)/etc + $(INSTALL_CONF) $(PKG_BUILD_DIR)/doc/msmtprc-system.example \ + $(1)/etc/msmtprc + $(INSTALL_DIR) $(1)/usr/bin + $(INSTALL_BIN) $(PKG_BUILD_DIR)/src/msmtp $(1)/usr/bin/msmtp + $(INSTALL_BIN) $(PKG_BUILD_DIR)/scripts/msmtpqueue/msmtp-enqueue.sh $(1)/usr/bin + $(INSTALL_BIN) $(PKG_BUILD_DIR)/scripts/msmtpqueue/msmtp-listqueue.sh $(1)/usr/bin + $(INSTALL_BIN) $(PKG_BUILD_DIR)/scripts/msmtpqueue/msmtp-runqueue.sh $(1)/usr/bin + $(INSTALL_DIR) $(1)/usr/sbin +endef + +define Package/msmtp-queue/postinstall + ln -sf ../bin/msmtp $${IPKG_INSTROOT}/usr/sbin/sendmail +endef + +Package/msmtp-queue-nossl/install = $(Package/msmtp-queue/install) +Package/msmtp-queue-nossl/postinstall = $(Package/msmtp-queue/postinstall) + +$(eval $(call BuildPackage,msmtp-queue)) +$(eval $(call BuildPackage,msmtp-queue-nossl)) +