You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

147 lines
3.7 KiB

  1. #
  2. # Copyright (C) 2009 David Cooper <dave@kupesoft.com>
  3. # Copyright (C) 2009-2016 OpenWrt.org
  4. #
  5. # This is free software, licensed under the GNU General Public License v2.
  6. # See /LICENSE for more information.
  7. #
  8. include $(TOPDIR)/rules.mk
  9. PKG_NAME:=msmtp
  10. PKG_VERSION:=1.8.2
  11. PKG_RELEASE:=1
  12. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
  13. PKG_SOURCE_URL:=https://marlam.de/msmtp/releases
  14. PKG_HASH:=d1185c1969ed00d0e2c57dbcd5eb09a9f82156042b21309d558f761978a58793
  15. PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(BUILD_VARIANT)/$(PKG_NAME)-$(PKG_VERSION)
  16. PKG_MAINTAINER:=Rosen Penev <rosenp@gmail.com>
  17. PKG_LICENSE:=GPL-3.0+
  18. PKG_LICENSE_FILES:=COPYING
  19. PKG_BUILD_PARALLEL:=1
  20. PKG_INSTALL:=1
  21. include $(INCLUDE_DIR)/package.mk
  22. include $(INCLUDE_DIR)/nls.mk
  23. define Package/msmtp/Default
  24. SECTION:=mail
  25. CATEGORY:=Mail
  26. DEPENDS:=$(INTL_DEPENDS)
  27. TITLE:=Simple sendmail SMTP forwarding
  28. URL:=https://marlam.de/msmtp
  29. endef
  30. define Package/msmtp/Default/description
  31. msmtp is an SMTP client. In the default mode, it transmits a mail to
  32. an SMTP server (for example at a free mail provider) which does the
  33. delivery. To use this program with your mail user agent (MUA), create
  34. a configuration file with your mail account(s) and tell your MUA to
  35. call msmtp instead of /usr/sbin/sendmail.
  36. endef
  37. define Package/msmtp
  38. $(call Package/msmtp/Default)
  39. DEPENDS+= +libgnutls +ca-bundle
  40. TITLE+= (with SSL support)
  41. VARIANT:=ssl
  42. endef
  43. define Package/msmtp/conffiles
  44. /etc/msmtprc
  45. endef
  46. define Package/msmtp/description
  47. $(call Package/msmtp/Default/description)
  48. This package is built with SSL support.
  49. endef
  50. define Package/msmtp-nossl
  51. $(call Package/msmtp/Default)
  52. TITLE+= (without SSL support)
  53. VARIANT:=nossl
  54. endef
  55. define Package/msmtp-nossl/description
  56. $(call Package/msmtp/Default/description)
  57. This package is built without SSL support.
  58. endef
  59. define Package/msmtp-mta
  60. $(call Package/msmtp/Default)
  61. TITLE+= (as MTA)
  62. DEPENDS+=@(PACKAGE_msmtp||PACKAGE_msmtp-nossl)
  63. endef
  64. define Package/msmtp-mta/description
  65. $(call Package/msmtp/Default/description)
  66. This package add a link from sendmail to msmtp
  67. and is built with SSL support.
  68. endef
  69. define Package/msmtp-queue
  70. $(call Package/msmtp/Default)
  71. DEPENDS+= +bash @(PACKAGE_msmtp||PACKAGE_msmtp-nossl)
  72. TITLE+= (queue scripts)
  73. endef
  74. define Package/msmtp-queue/description
  75. $(call Package/msmtp/Default/description)
  76. This package contains the msmtp queue scripts.
  77. endef
  78. CONFIGURE_ARGS += \
  79. --disable-rpath \
  80. --without-libintl-prefix \
  81. --without-libgsasl \
  82. --without-libidn \
  83. --without-libsecret \
  84. --without-macosx-keyring \
  85. --without-msmtpd
  86. ifneq ($(CONFIG_USE_UCLIBC),)
  87. CONFIGURE_ARGS += --disable-gai-idn
  88. endif
  89. MAKE_FLAGS :=
  90. ifeq ($(BUILD_VARIANT),ssl)
  91. CONFIGURE_ARGS += \
  92. --with-tls=gnutls
  93. endif
  94. ifeq ($(BUILD_VARIANT),nossl)
  95. CONFIGURE_ARGS += \
  96. --with-tls=no
  97. endif
  98. define Package/msmtp/install
  99. $(INSTALL_DIR) $(1)/etc
  100. $(INSTALL_CONF) $(PKG_BUILD_DIR)/doc/msmtprc-system.example \
  101. $(1)/etc/msmtprc
  102. $(INSTALL_DIR) $(1)/usr/bin
  103. $(CP) $(PKG_INSTALL_DIR)/usr/bin/msmtp $(1)/usr/bin/
  104. endef
  105. define Package/msmtp-mta/install
  106. $(INSTALL_DIR) $(1)/usr/sbin $(1)/usr/lib
  107. ln -sf ../bin/msmtp $(1)/usr/sbin/sendmail
  108. ln -sf ../bin/msmtp $(1)/usr/lib/sendmail
  109. endef
  110. Package/msmtp-nossl/conffiles = $(Package/msmtp/conffiles)
  111. Package/msmtp-nossl/install = $(Package/msmtp/install)
  112. define Package/msmtp-queue/install
  113. $(INSTALL_DIR) $(1)/usr/bin
  114. $(INSTALL_BIN) $(PKG_BUILD_DIR)/scripts/msmtpq/msmtp{q,-queue} $(1)/usr/bin/
  115. $(INSTALL_BIN) $(PKG_BUILD_DIR)/scripts/msmtpqueue/msmtp-{en,list,run}queue.sh $(1)/usr/bin/
  116. endef
  117. $(eval $(call BuildPackage,msmtp))
  118. $(eval $(call BuildPackage,msmtp-nossl))
  119. $(eval $(call BuildPackage,msmtp-queue))
  120. $(eval $(call BuildPackage,msmtp-mta))