[packages] pciutils: update to 3.1.6
[openwrt/svn-archive/archive.git] / mail / msmtp / 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
12 PKG_VERSION:=1.4.19
13 PKG_RELEASE:=1
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 include $(INCLUDE_DIR)/package.mk
22
23 define Package/msmtp/Default
24 SECTION:=mail
25 CATEGORY:=Mail
26 TITLE:=Simple sendmail SMTP forwarding
27 URL:=http://msmtp.sourceforge.net/
28 endef
29
30 define Package/msmtp/Default/conffiles
31 /etc/msmtprc
32 endef
33
34 define Package/msmtp/Default/description
35 msmtp is an SMTP client. In the default mode, it transmits a mail to
36 an SMTP server (for example at a free mail provider) which does the
37 delivery. To use this program with your mail user agent (MUA), create
38 a configuration file with your mail account(s) and tell your MUA to
39 call msmtp instead of /usr/sbin/sendmail.
40 endef
41
42 define Package/msmtp
43 $(call Package/msmtp/Default)
44 DEPENDS+= +libopenssl
45 TITLE+= (with SSL support)
46 endef
47
48 define Package/msmtp/conffiles
49 $(call Package/msmtp/Default/conffiles)
50 endef
51
52 define Package/msmtp/description
53 $(call Package/msmtp/Default/description)
54 This package is built with SSL support.
55 endef
56
57 define Package/msmtp-nossl
58 $(call Package/msmtp/Default)
59 TITLE+= (without SSL support)
60 endef
61
62 define Package/msmtp-nossl/conffiles
63 $(call Package/msmtp/Default/conffiles)
64 endef
65
66 define Package/msmtp-nossl/description
67 $(call Package/msmtp/Default/description)
68 This package is built without SSL support.
69 endef
70
71 define Build/Template
72
73 $(STAMP_BUILT)-$(2): $(STAMP_PREPARED)
74 -$(MAKE) -C $(PKG_BUILD_DIR) clean
75 $(call Build/Configure/Default,$(3))
76 $(MAKE) -C $(PKG_BUILD_DIR)
77 ( cd $(PKG_BUILD_DIR)/src; mv -f msmtp msmtp-$(2) )
78 touch $$@
79
80 $(STAMP_BUILT): $(STAMP_BUILT)-$(2)
81
82 define Package/$(1)/install
83 $(INSTALL_DIR) $$(1)/etc
84 $(INSTALL_CONF) $(PKG_BUILD_DIR)/doc/msmtprc-system.example \
85 $$(1)/etc/msmtprc
86 $(INSTALL_DIR) $$(1)/usr/bin
87 $(INSTALL_BIN) $(PKG_BUILD_DIR)/src/msmtp-$(2) $$(1)/usr/bin/msmtp
88 $(INSTALL_DIR) $$(1)/usr/sbin
89 ln -sf /usr/bin/msmtp $$(1)/usr/sbin/sendmail
90 endef
91
92 endef
93
94 CONFIGURE_ARGS += \
95 --disable-rpath \
96 --without-libssl32 \
97 --without-libintl \
98 --without-libgsasl \
99 --without-libidn
100
101 ifneq ($(SDK)$(CONFIG_PACKAGE_msmtp),)
102 define Build/with-ssl
103 $(call Build/Template,msmtp,with-ssl, \
104 --with-ssl=openssl \
105 --with-libssl-prefix="$(STAGING_DIR)/usr/include" \
106 )
107 endef
108 endif
109 $(eval $(Build/with-ssl))
110
111 ifneq ($(SDK)$(CONFIG_PACKAGE_msmtp-nossl),)
112 define Build/without-ssl
113 $(call Build/Template,msmtp-nossl,without-ssl, \
114 --with-ssl=no \
115 )
116 endef
117 endif
118 $(eval $(Build/without-ssl))
119
120 $(eval $(call BuildPackage,msmtp))
121 $(eval $(call BuildPackage,msmtp-nossl))
122