msmtp-queue/Makefile |
1 | | # |
2 | | # Copyright (C) 2009 David Cooper <dave@kupesoft.com> |
3 | | # Copyright (C) 2009-2010 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-queue |
12 | | PKG_VERSION:=1.4.19 |
13 | | PKG_RELEASE:=3 |
14 | | |
15 | | PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 |
16 | | PKG_SOURCE_URL:=@SF/msmtp |
17 | | PKG_MD5SUM:=f0afdc943bf7c8a3a3bf3fe1a73072c4 |
18 | | |
19 | | PKG_FIXUP:=libtool |
20 | | |
21 | | PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(BUILD_VARIANT)/$(PKG_NAME)-$(PKG_VERSION) |
22 | | |
23 | | include $(INCLUDE_DIR)/package.mk |
24 | | |
25 | | define Package/msmtp-queue/Default |
26 | | SECTION:=mail |
27 | | CATEGORY:=Mail |
28 | | TITLE:=Simple sendmail SMTP forwarding |
29 | | URL:=http://msmtp.sourceforge.net/ |
30 | | endef |
31 | | |
32 | | define Package/msmtp-queue/Default/conffiles |
33 | | /etc/msmtprc |
34 | | endef |
35 | | |
36 | | define Package/msmtp-queue/Default/description |
37 | | msmtp is an SMTP client. In the default mode, it transmits a mail to |
38 | | an SMTP server (for example at a free mail provider) which does the |
39 | | delivery. To use this program with your mail user agent (MUA), create |
40 | | a configuration file with your mail account(s) and tell your MUA to |
41 | | call msmtp instead of /usr/sbin/sendmail. |
42 | | endef |
43 | | |
44 | | define Package/msmtp-queue |
45 | | $(call Package/msmtp-queue/Default) |
46 | | DEPENDS+= +libopenssl |
47 | | TITLE+= (with SSL support) |
48 | | VARIANT:=ssl |
49 | | endef |
50 | | |
51 | | define Package/msmtp-queue/conffiles |
52 | | $(call Package/msmtp-queue/Default/conffiles) |
53 | | endef |
54 | | |
55 | | define Package/msmtp-queue/description |
56 | | $(call Package/msmtp-queue/Default/description) |
57 | | This package is built with SSL support. |
58 | | endef |
59 | | |
60 | | define Package/msmtp-queue-nossl |
61 | | $(call Package/msmtp-queue/Default) |
62 | | TITLE+= (without SSL support) |
63 | | VARIANT:=nossl |
64 | | endef |
65 | | |
66 | | define Package/msmtp-queue-nossl/conffiles |
67 | | $(call Package/msmtp-queue/Default/conffiles) |
68 | | endef |
69 | | |
70 | | define Package/msmtp-queue-nossl/description |
71 | | $(call Package/msmtp-queue/Default/description) |
72 | | This package is built without SSL support. |
73 | | endef |
74 | | |
75 | | CONFIGURE_ARGS += \ |
76 | | --disable-rpath \ |
77 | | --without-libssl32 \ |
78 | | --without-libintl \ |
79 | | --without-libgsasl \ |
80 | | --without-libidn |
81 | | |
82 | | MAKE_FLAGS := |
83 | | |
84 | | ifeq ($(BUILD_VARIANT),ssl) |
85 | | CONFIGURE_ARGS += \ |
86 | | --with-ssl=openssl \ |
87 | | --with-libssl-prefix="$(STAGING_DIR)/usr/include" |
88 | | endif |
89 | | |
90 | | ifeq ($(BUILD_VARIANT),nossl) |
91 | | CONFIGURE_ARGS += \ |
92 | | --with-ssl=no |
93 | | endif |
94 | | |
95 | | define Package/msmtp-queue/install |
96 | | $(INSTALL_DIR) $(1)/etc |
97 | | $(INSTALL_CONF) $(PKG_BUILD_DIR)/doc/msmtprc-system.example \ |
98 | | $(1)/etc/msmtprc |
99 | | $(INSTALL_DIR) $(1)/usr/bin |
100 | | $(INSTALL_BIN) $(PKG_BUILD_DIR)/src/msmtp $(1)/usr/bin/msmtp |
101 | | $(INSTALL_BIN) $(PKG_BUILD_DIR)/scripts/msmtpqueue/msmtp-enqueue.sh $(1)/usr/bin |
102 | | $(INSTALL_BIN) $(PKG_BUILD_DIR)/scripts/msmtpqueue/msmtp-listqueue.sh $(1)/usr/bin |
103 | | $(INSTALL_BIN) $(PKG_BUILD_DIR)/scripts/msmtpqueue/msmtp-runqueue.sh $(1)/usr/bin |
104 | | $(INSTALL_DIR) $(1)/usr/sbin |
105 | | endef |
106 | | |
107 | | define Package/msmtp-queue/postinstall |
108 | | ln -sf ../bin/msmtp $${IPKG_INSTROOT}/usr/sbin/sendmail |
109 | | endef |
110 | | |
111 | | Package/msmtp-queue-nossl/install = $(Package/msmtp-queue/install) |
112 | | Package/msmtp-queue-nossl/postinstall = $(Package/msmtp-queue/postinstall) |
113 | | |
114 | | $(eval $(call BuildPackage,msmtp-queue)) |
115 | | $(eval $(call BuildPackage,msmtp-queue-nossl)) |
116 | | |