|
@@ -0,0 +1,136 @@
|
|
1
|
+#
|
|
2
|
+# Copyright (C) 2009 David Cooper <dave@kupesoft.com>
|
|
3
|
+# Copyright (C) 2009-2015 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.1
|
|
13
|
+PKG_RELEASE:=1
|
|
14
|
+
|
|
15
|
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
|
|
16
|
+PKG_SOURCE_URL:=@SF/msmtp
|
|
17
|
+PKG_MD5SUM:=6ebba4809bbc665b8a665a018d1a5ee1
|
|
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
|
+
|
|
30
|
+define Package/msmtp/Default
|
|
31
|
+ SECTION:=mail
|
|
32
|
+ CATEGORY:=Mail
|
|
33
|
+ TITLE:=Simple sendmail SMTP forwarding
|
|
34
|
+ URL:=http://msmtp.sourceforge.net/
|
|
35
|
+endef
|
|
36
|
+
|
|
37
|
+define Package/msmtp/Default/description
|
|
38
|
+ msmtp is an SMTP client. In the default mode, it transmits a mail to
|
|
39
|
+ an SMTP server (for example at a free mail provider) which does the
|
|
40
|
+ delivery. To use this program with your mail user agent (MUA), create
|
|
41
|
+ a configuration file with your mail account(s) and tell your MUA to
|
|
42
|
+ call msmtp instead of /usr/sbin/sendmail.
|
|
43
|
+endef
|
|
44
|
+
|
|
45
|
+define Package/msmtp
|
|
46
|
+$(call Package/msmtp/Default)
|
|
47
|
+ DEPENDS+= +libopenssl
|
|
48
|
+ TITLE+= (with SSL support)
|
|
49
|
+ VARIANT:=ssl
|
|
50
|
+endef
|
|
51
|
+
|
|
52
|
+define Package/msmtp/conffiles
|
|
53
|
+/etc/msmtprc
|
|
54
|
+endef
|
|
55
|
+
|
|
56
|
+define Package/msmtp/description
|
|
57
|
+$(call Package/msmtp/Default/description)
|
|
58
|
+ This package is built with SSL support.
|
|
59
|
+endef
|
|
60
|
+
|
|
61
|
+define Package/msmtp-nossl
|
|
62
|
+$(call Package/msmtp/Default)
|
|
63
|
+ TITLE+= (without SSL support)
|
|
64
|
+ VARIANT:=nossl
|
|
65
|
+endef
|
|
66
|
+
|
|
67
|
+define Package/msmtp-nossl/description
|
|
68
|
+$(call Package/msmtp/Default/description)
|
|
69
|
+ This package is built without SSL support.
|
|
70
|
+endef
|
|
71
|
+
|
|
72
|
+define Package/msmtp-queue
|
|
73
|
+$(call Package/msmtp/Default)
|
|
74
|
+ DEPENDS+= +bash
|
|
75
|
+ TITLE+= (queue scripts)
|
|
76
|
+endef
|
|
77
|
+
|
|
78
|
+define Package/msmtp-queue/description
|
|
79
|
+$(call Package/msmtp/Default/description)
|
|
80
|
+ This package contains the msmtp queue scripts.
|
|
81
|
+endef
|
|
82
|
+
|
|
83
|
+CONFIGURE_ARGS += \
|
|
84
|
+ --disable-rpath \
|
|
85
|
+ --without-libintl-prefix \
|
|
86
|
+ --without-libgsasl \
|
|
87
|
+ --without-libidn \
|
|
88
|
+ --without-gnome-keyring \
|
|
89
|
+ --without-macosx-keyring \
|
|
90
|
+
|
|
91
|
+MAKE_FLAGS :=
|
|
92
|
+
|
|
93
|
+ifeq ($(BUILD_VARIANT),ssl)
|
|
94
|
+ CONFIGURE_ARGS += \
|
|
95
|
+ --with-ssl=openssl
|
|
96
|
+endif
|
|
97
|
+
|
|
98
|
+ifeq ($(BUILD_VARIANT),nossl)
|
|
99
|
+ CONFIGURE_ARGS += \
|
|
100
|
+ --with-ssl=no
|
|
101
|
+endif
|
|
102
|
+
|
|
103
|
+define Package/msmtp/install
|
|
104
|
+ $(INSTALL_DIR) $(1)/etc
|
|
105
|
+ $(INSTALL_CONF) $(PKG_BUILD_DIR)/doc/msmtprc-system.example \
|
|
106
|
+ $(1)/etc/msmtprc
|
|
107
|
+ $(INSTALL_DIR) $(1)/usr/bin
|
|
108
|
+ $(CP) $(PKG_INSTALL_DIR)/usr/bin/msmtp $(1)/usr/bin/
|
|
109
|
+endef
|
|
110
|
+
|
|
111
|
+define Package/msmtp/postinst
|
|
112
|
+ [ -e $${IPKG_INSTROOT}/usr/sbin/sendmail ] || {
|
|
113
|
+ mkdir -p $${IPKG_INSTROOT}/usr/sbin
|
|
114
|
+ ln -sf ../bin/msmtp $${IPKG_INSTROOT}/usr/sbin/sendmail
|
|
115
|
+ }
|
|
116
|
+endef
|
|
117
|
+
|
|
118
|
+define Package/msmtp/prerm
|
|
119
|
+ [ "../bin/msmtp" = "$(readlink -qs $${IPKG_INSTROOT}/usr/sbin/sendmail)" ] && {
|
|
120
|
+ rm -f $${IPKG_INSTROOT}/usr/sbin/sendmail
|
|
121
|
+ }
|
|
122
|
+endef
|
|
123
|
+
|
|
124
|
+Package/msmtp-nossl/conffiles = $(Package/msmtp/conffiles)
|
|
125
|
+Package/msmtp-nossl/install = $(Package/msmtp/install)
|
|
126
|
+Package/msmtp-nossl/postinst = $(Package/msmtp/postinst)
|
|
127
|
+
|
|
128
|
+define Package/msmtp-queue/install
|
|
129
|
+ $(INSTALL_DIR) $(1)/usr/bin
|
|
130
|
+ $(INSTALL_BIN) $(PKG_BUILD_DIR)/scripts/msmtpq/msmtp{q,-queue} $(1)/usr/bin/
|
|
131
|
+ $(INSTALL_BIN) $(PKG_BUILD_DIR)/scripts/msmtpqueue/msmtp-{en,list,run}queue.sh $(1)/usr/bin/
|
|
132
|
+endef
|
|
133
|
+
|
|
134
|
+$(eval $(call BuildPackage,msmtp))
|
|
135
|
+$(eval $(call BuildPackage,msmtp-nossl))
|
|
136
|
+$(eval $(call BuildPackage,msmtp-queue))
|