source: packages/mail/msmtp/Makefile @ 19901

Last change on this file since 19901 was 19901, checked in by florian, 6 years ago

[package] switch mstmp to using build variants (#6723)

File size: 2.5 KB
Line 
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
9include $(TOPDIR)/rules.mk
10
11PKG_NAME:=msmtp
12PKG_VERSION:=1.4.19
13PKG_RELEASE:=1
14
15PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
16PKG_SOURCE_URL:=@SF/msmtp
17PKG_MD5SUM:=f0afdc943bf7c8a3a3bf3fe1a73072c4
18
19PKG_FIXUP:=libtool
20
21PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(BUILD_VARIANT)/$(PKG_NAME)-$(PKG_VERSION)
22
23include $(INCLUDE_DIR)/package.mk
24
25define Package/msmtp/Default
26  SECTION:=mail
27  CATEGORY:=Mail
28  TITLE:=Simple sendmail SMTP forwarding
29  URL:=http://msmtp.sourceforge.net/
30endef
31
32define Package/msmtp/Default/conffiles
33/etc/msmtprc
34endef
35
36define Package/msmtp/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.
42endef
43
44define Package/msmtp
45$(call Package/msmtp/Default)
46  DEPENDS+= +libopenssl
47  TITLE+= (with SSL support)
48  VARIANT:=ssl
49endef
50
51define Package/msmtp/conffiles
52$(call Package/msmtp/Default/conffiles)
53endef
54
55define Package/msmtp/description
56$(call Package/msmtp/Default/description)
57 This package is built with SSL support.
58endef
59
60define Package/msmtp-nossl
61$(call Package/msmtp/Default)
62  TITLE+= (without SSL support)
63  VARIANT:=nossl
64endef
65
66define Package/msmtp-nossl/conffiles
67$(call Package/msmtp/Default/conffiles)
68endef
69
70define Package/msmtp-nossl/description
71$(call Package/msmtp/Default/description)
72 This package is built without SSL support.
73endef
74
75CONFIGURE_ARGS += \
76        --disable-rpath \
77        --without-libssl32 \
78        --without-libintl \
79        --without-libgsasl \
80        --without-libidn
81
82MAKE_FLAGS :=
83
84ifeq ($(BUILD_VARIANT),ssl)
85        CONFIGURE_ARGS += \
86                --with-ssl=openssl \
87                --with-libssl-prefix="$(STAGING_DIR)/usr/include"
88endif
89
90ifeq ($(BUILD_VARIANT),nossl)
91        CONFIGURE_ARGS += \
92                --with-ssl=no
93endif
94
95define Package/msmtp/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_DIR) $(1)/usr/sbin
102        ln -sf /usr/bin/msmtp $(1)/usr/sbin/sendmail
103endef
104
105Package/msmtp-nossl/install = $(Package/msmtp/install)
106
107$(eval $(call BuildPackage,msmtp))
108$(eval $(call BuildPackage,msmtp-nossl))
109
Note: See TracBrowser for help on using the repository browser.