2 # Copyright (C) 2009 David Cooper <dave@kupesoft.com>
3 # Copyright (C) 2009-2016 OpenWrt.org
5 # This is free software, licensed under the GNU General Public License v2.
6 # See /LICENSE for more information.
9 include $(TOPDIR
)/rules.mk
15 PKG_SOURCE
:=$(PKG_NAME
)-$(PKG_VERSION
).
tar.xz
16 PKG_SOURCE_URL
:=@SF
/msmtp
17 PKG_HASH
:=da15db1f62bd0201fce5310adb89c86188be91cd745b7cb3b62b81a501e7fb5e
20 PKG_LICENSE_FILES
:=COPYING
21 PKG_MAINTAINER
:=Nicolas Thill
<nico@openwrt.org
>
26 PKG_BUILD_DIR
:=$(BUILD_DIR
)/$(PKG_NAME
)-$(BUILD_VARIANT
)/$(PKG_NAME
)-$(PKG_VERSION
)
28 include $(INCLUDE_DIR
)/package.mk
29 include $(INCLUDE_DIR
)/nls.mk
31 define Package
/msmtp
/Default
34 DEPENDS
:=$(INTL_DEPENDS
)
35 TITLE
:=Simple sendmail SMTP forwarding
36 URL
:=http
://msmtp.sourceforge.net
/
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.
48 $(call Package
/msmtp
/Default
)
49 DEPENDS
+= +libopenssl
+ca-bundle
50 TITLE
+= (with SSL support
)
54 define Package
/msmtp
/conffiles
58 define Package
/msmtp
/description
59 $(call Package
/msmtp
/Default
/description
)
60 This package is built with SSL support.
63 define Package
/msmtp-nossl
64 $(call Package
/msmtp
/Default
)
65 TITLE
+= (without SSL support
)
69 define Package
/msmtp-nossl
/description
70 $(call Package
/msmtp
/Default
/description
)
71 This package is built without SSL support.
74 define Package
/msmtp-mta
75 $(call Package
/msmtp
/Default
)
77 DEPENDS
+=@
(PACKAGE_msmtp||PACAKGE_msmtp-nossl
)
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.
86 define Package
/msmtp-queue
87 $(call Package
/msmtp
/Default
)
88 DEPENDS
+= +bash @
(PACKAGE_msmtp||PACKAGE_msmtp-nossl
)
89 TITLE
+= (queue scripts
)
92 define Package
/msmtp-queue
/description
93 $(call Package
/msmtp
/Default
/description
)
94 This package contains the msmtp queue scripts.
99 --without-libintl-prefix \
102 --without-libsecret \
103 --without-macosx-keyring \
105 ifneq ($(CONFIG_USE_UCLIBC
),)
106 CONFIGURE_ARGS
+= --disable-gai-idn
111 ifeq ($(BUILD_VARIANT
),ssl
)
116 ifeq ($(BUILD_VARIANT
),nossl
)
121 define Package
/msmtp
/install
122 $(INSTALL_DIR
) $(1)/etc
123 $(INSTALL_CONF
) $(PKG_BUILD_DIR
)/doc
/msmtprc-system.example \
125 $(INSTALL_DIR
) $(1)/usr
/bin
126 $(CP
) $(PKG_INSTALL_DIR
)/usr
/bin
/msmtp
$(1)/usr
/bin
/
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
135 Package
/msmtp-nossl
/conffiles
= $(Package
/msmtp
/conffiles
)
136 Package
/msmtp-nossl
/install = $(Package
/msmtp
/install)
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
/
144 $(eval
$(call BuildPackage
,msmtp
))
145 $(eval
$(call BuildPackage
,msmtp-nossl
))
146 $(eval
$(call BuildPackage
,msmtp-queue
))
147 $(eval
$(call BuildPackage
,msmtp-mta
))