Makefile (3685B)
1 # 2 # Copyright (C) 2009 David Cooper <dave@kupesoft.com> 3 # Copyright (C) 2009-2016 OpenWrt.org 4 # 5 # This is free software, licensed under the GNU General Public License v2. 6 # See /LICENSE for more information. 7 # 8 9 include $(TOPDIR)/rules.mk 10 11 PKG_NAME:=msmtp 12 PKG_VERSION:=1.6.2 13 PKG_RELEASE:=3 14 15 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz 16 PKG_SOURCE_URL:=@SF/msmtp 17 PKG_MD5SUM:=3baca93c7e5f1aa9d36a2e5b38739ab9 18 19 PKG_LICENSE:=GPL-3.0+ 20 PKG_LICENSE_FILES:=COPYING 21 PKG_MAINTAINER:=Nicolas Thill <nico@openwrt.org> 22 23 PKG_FIXUP:=autoreconf 24 PKG_INSTALL:=1 25 26 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(BUILD_VARIANT)/$(PKG_NAME)-$(PKG_VERSION) 27 28 include $(INCLUDE_DIR)/package.mk 29 include $(INCLUDE_DIR)/nls.mk 30 31 define Package/msmtp/Default 32 SECTION:=mail 33 CATEGORY:=Mail 34 DEPENDS:=$(INTL_DEPENDS) 35 TITLE:=Simple sendmail SMTP forwarding 36 URL:=http://msmtp.sourceforge.net/ 37 endef 38 39 define Package/msmtp/Default/description 40 msmtp is an SMTP client. In the default mode, it transmits a mail to 41 an SMTP server (for example at a free mail provider) which does the 42 delivery. To use this program with your mail user agent (MUA), create 43 a configuration file with your mail account(s) and tell your MUA to 44 call msmtp instead of /usr/sbin/sendmail. 45 endef 46 47 define Package/msmtp 48 $(call Package/msmtp/Default) 49 DEPENDS+= +libopenssl +ca-bundle 50 TITLE+= (with SSL support) 51 VARIANT:=ssl 52 endef 53 54 define Package/msmtp/conffiles 55 /etc/msmtprc 56 endef 57 58 define Package/msmtp/description 59 $(call Package/msmtp/Default/description) 60 This package is built with SSL support. 61 endef 62 63 define Package/msmtp-nossl 64 $(call Package/msmtp/Default) 65 TITLE+= (without SSL support) 66 VARIANT:=nossl 67 endef 68 69 define Package/msmtp-nossl/description 70 $(call Package/msmtp/Default/description) 71 This package is built without SSL support. 72 endef 73 74 define Package/msmtp-mta 75 $(call Package/msmtp/Default) 76 TITLE+= (as MTA) 77 DEPENDS+=@(PACKAGE_msmtp||PACAKGE_msmtp-nossl) 78 endef 79 80 define Package/msmtp-mta/description 81 $(call Package/msmtp/Default/description) 82 This package add a link from sendmail to msmtp 83 and is built with SSL support. 84 endef 85 86 define Package/msmtp-queue 87 $(call Package/msmtp/Default) 88 DEPENDS+= +bash @(PACKAGE_msmtp||PACKAGE_msmtp-nossl) 89 TITLE+= (queue scripts) 90 endef 91 92 define Package/msmtp-queue/description 93 $(call Package/msmtp/Default/description) 94 This package contains the msmtp queue scripts. 95 endef 96 97 CONFIGURE_ARGS += \ 98 --disable-rpath \ 99 --without-libintl-prefix \ 100 --without-libgsasl \ 101 --without-libidn \ 102 --without-libsecret \ 103 --without-macosx-keyring \ 104 105 ifneq ($(CONFIG_USE_UCLIBC),) 106 CONFIGURE_ARGS += --disable-gai-idn 107 endif 108 109 MAKE_FLAGS := 110 111 ifeq ($(BUILD_VARIANT),ssl) 112 CONFIGURE_ARGS += \ 113 --with-tls=openssl 114 endif 115 116 ifeq ($(BUILD_VARIANT),nossl) 117 CONFIGURE_ARGS += \ 118 --with-tls=no 119 endif 120 121 define Package/msmtp/install 122 $(INSTALL_DIR) $(1)/etc 123 $(INSTALL_CONF) $(PKG_BUILD_DIR)/doc/msmtprc-system.example \ 124 $(1)/etc/msmtprc 125 $(INSTALL_DIR) $(1)/usr/bin 126 $(CP) $(PKG_INSTALL_DIR)/usr/bin/msmtp $(1)/usr/bin/ 127 endef 128 129 define Package/msmtp-mta/install 130 $(INSTALL_DIR) $(1)/usr/sbin $(1)/usr/lib 131 ln -sf ../bin/msmtp $(1)/usr/sbin/sendmail 132 ln -sf ../bin/msmtp $(1)/usr/lib/sendmail 133 endef 134 135 Package/msmtp-nossl/conffiles = $(Package/msmtp/conffiles) 136 Package/msmtp-nossl/install = $(Package/msmtp/install) 137 138 define Package/msmtp-queue/install 139 $(INSTALL_DIR) $(1)/usr/bin 140 $(INSTALL_BIN) $(PKG_BUILD_DIR)/scripts/msmtpq/msmtp{q,-queue} $(1)/usr/bin/ 141 $(INSTALL_BIN) $(PKG_BUILD_DIR)/scripts/msmtpqueue/msmtp-{en,list,run}queue.sh $(1)/usr/bin/ 142 endef 143 144 $(eval $(call BuildPackage,msmtp)) 145 $(eval $(call BuildPackage,msmtp-nossl)) 146 $(eval $(call BuildPackage,msmtp-queue)) 147 $(eval $(call BuildPackage,msmtp-mta))