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.

141 lines
3.6 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.5
  11. PKG_RELEASE:=2
  12. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
  13. PKG_SOURCE_URL:=https://marlam.de/msmtp/releases
  14. PKG_HASH:=1613daced9c47b8c028224fc076799c2a4d72923e242be4e9e5c984cbbbb9f39
  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-or-later
  18. PKG_LICENSE_FILES:=COPYING
  19. PKG_CPE_ID:=cpe:/a:marlam:msmtp
  20. PKG_INSTALL:=1
  21. PKG_BUILD_PARALLEL:=1
  22. include $(INCLUDE_DIR)/package.mk
  23. include $(INCLUDE_DIR)/nls.mk
  24. define Package/msmtp/Default
  25. SECTION:=mail
  26. CATEGORY:=Mail
  27. DEPENDS:=$(INTL_DEPENDS)
  28. TITLE:=Simple sendmail SMTP forwarding
  29. URL:=https://marlam.de/msmtp
  30. endef
  31. define Package/msmtp/Default/description
  32. msmtp is an SMTP client. In the default mode, it transmits a mail to
  33. an SMTP server (for example at a free mail provider) which does the
  34. delivery. To use this program with your mail user agent (MUA), create
  35. a configuration file with your mail account(s) and tell your MUA to
  36. call msmtp instead of /usr/sbin/sendmail.
  37. endef
  38. define Package/msmtp
  39. $(call Package/msmtp/Default)
  40. DEPENDS+= +libgnutls +ca-bundle
  41. TITLE+= (with SSL support)
  42. VARIANT:=ssl
  43. DEFAULT_VARIANT:=1
  44. endef
  45. define Package/msmtp/conffiles
  46. /etc/msmtprc
  47. endef
  48. define Package/msmtp/description
  49. $(call Package/msmtp/Default/description)
  50. This package is built with SSL support.
  51. endef
  52. define Package/msmtp-nossl
  53. $(call Package/msmtp/Default)
  54. TITLE+= (without SSL support)
  55. VARIANT:=nossl
  56. PROVIDES:=msmtp
  57. endef
  58. define Package/msmtp-nossl/description
  59. $(call Package/msmtp/Default/description)
  60. This package is built without SSL support.
  61. endef
  62. define Package/msmtp-mta
  63. $(call Package/msmtp/Default)
  64. TITLE+= (as MTA)
  65. DEPENDS+=+msmtp
  66. ALTERNATIVES:=\
  67. 100:/usr/sbin/sendmail:/usr/bin/msmtp \
  68. 100:/usr/lib/sendmail:/usr/bin/msmtp
  69. endef
  70. define Package/msmtp-mta/description
  71. $(call Package/msmtp/Default/description)
  72. This package add a link from sendmail to msmtp
  73. and is built with SSL support.
  74. endef
  75. define Package/msmtp-queue
  76. $(call Package/msmtp/Default)
  77. DEPENDS+= +bash +msmtp
  78. TITLE+= (queue scripts)
  79. endef
  80. define Package/msmtp-queue/description
  81. $(call Package/msmtp/Default/description)
  82. This package contains the msmtp queue scripts.
  83. endef
  84. CONFIGURE_ARGS += \
  85. --disable-rpath \
  86. --without-libintl-prefix \
  87. --without-libgsasl \
  88. --without-libidn \
  89. --without-libsecret \
  90. --without-macosx-keyring \
  91. --without-msmtpd
  92. ifeq ($(BUILD_VARIANT),ssl)
  93. CONFIGURE_ARGS += --with-tls=gnutls
  94. else
  95. CONFIGURE_ARGS += --without-tls
  96. endif
  97. define Package/msmtp/install
  98. $(INSTALL_DIR) $(1)/etc
  99. $(INSTALL_CONF) $(PKG_BUILD_DIR)/doc/msmtprc-system.example \
  100. $(1)/etc/msmtprc
  101. $(INSTALL_DIR) $(1)/usr/bin
  102. $(CP) $(PKG_INSTALL_DIR)/usr/bin/msmtp $(1)/usr/bin/
  103. endef
  104. define Package/msmtp-mta/install
  105. $(INSTALL_DIR) $(1)/usr/sbin $(1)/usr/lib
  106. endef
  107. Package/msmtp-nossl/conffiles = $(Package/msmtp/conffiles)
  108. Package/msmtp-nossl/install = $(Package/msmtp/install)
  109. define Package/msmtp-queue/install
  110. $(INSTALL_DIR) $(1)/usr/bin
  111. $(INSTALL_BIN) $(PKG_BUILD_DIR)/scripts/msmtpq/msmtp{q,-queue} $(1)/usr/bin/
  112. $(INSTALL_BIN) $(PKG_BUILD_DIR)/scripts/msmtpqueue/msmtp-{en,list,run}queue.sh $(1)/usr/bin/
  113. endef
  114. $(eval $(call BuildPackage,msmtp))
  115. $(eval $(call BuildPackage,msmtp-nossl))
  116. $(eval $(call BuildPackage,msmtp-queue))
  117. $(eval $(call BuildPackage,msmtp-mta))