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.

140 lines
3.4 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.7
  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:=9a53bcdc244ec5b1a806934ecc7746d9d09db581f587bedf597e9da2f48c51f1
  15. PKG_MAINTAINER:=
  16. PKG_LICENSE:=GPL-3.0-or-later
  17. PKG_LICENSE_FILES:=COPYING
  18. PKG_CPE_ID:=cpe:/a:marlam:msmtp
  19. PKG_INSTALL:=1
  20. PKG_BUILD_PARALLEL:=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. DEFAULT_VARIANT:=1
  43. endef
  44. define Package/msmtp/conffiles
  45. /etc/msmtprc
  46. endef
  47. define Package/msmtp/description
  48. $(call Package/msmtp/Default/description)
  49. This package is built with SSL support.
  50. endef
  51. define Package/msmtp-nossl
  52. $(call Package/msmtp/Default)
  53. TITLE+= (without SSL support)
  54. VARIANT:=nossl
  55. PROVIDES:=msmtp
  56. endef
  57. define Package/msmtp-nossl/description
  58. $(call Package/msmtp/Default/description)
  59. This package is built without SSL support.
  60. endef
  61. define Package/msmtp-mta
  62. $(call Package/msmtp/Default)
  63. TITLE+= (as MTA)
  64. DEPENDS+=+msmtp
  65. ALTERNATIVES:=\
  66. 100:/usr/sbin/sendmail:/usr/bin/msmtp \
  67. 100:/usr/lib/sendmail:/usr/bin/msmtp
  68. endef
  69. define Package/msmtp-mta/description
  70. $(call Package/msmtp/Default/description)
  71. This package add a link from sendmail to msmtp
  72. and is built with SSL support.
  73. endef
  74. define Package/msmtp-queue
  75. $(call Package/msmtp/Default)
  76. DEPENDS+= +bash +msmtp
  77. TITLE+= (queue scripts)
  78. endef
  79. define Package/msmtp-queue/description
  80. $(call Package/msmtp/Default/description)
  81. This package contains the msmtp queue scripts.
  82. endef
  83. CONFIGURE_ARGS += \
  84. --disable-rpath \
  85. --without-libintl-prefix \
  86. --without-libgsasl \
  87. --without-libidn \
  88. --without-libsecret \
  89. --without-macosx-keyring \
  90. --without-msmtpd
  91. ifeq ($(BUILD_VARIANT),ssl)
  92. CONFIGURE_ARGS += --with-tls=gnutls
  93. else
  94. CONFIGURE_ARGS += --without-tls
  95. endif
  96. define Package/msmtp/install
  97. $(INSTALL_DIR) $(1)/etc
  98. $(INSTALL_CONF) $(PKG_BUILD_DIR)/doc/msmtprc-system.example \
  99. $(1)/etc/msmtprc
  100. $(INSTALL_DIR) $(1)/usr/bin
  101. $(CP) $(PKG_INSTALL_DIR)/usr/bin/msmtp $(1)/usr/bin/
  102. endef
  103. define Package/msmtp-mta/install
  104. $(INSTALL_DIR) $(1)/usr/sbin $(1)/usr/lib
  105. endef
  106. Package/msmtp-nossl/conffiles = $(Package/msmtp/conffiles)
  107. Package/msmtp-nossl/install = $(Package/msmtp/install)
  108. define Package/msmtp-queue/install
  109. $(INSTALL_DIR) $(1)/usr/bin
  110. $(INSTALL_BIN) $(PKG_BUILD_DIR)/scripts/msmtpq/msmtp{q,-queue} $(1)/usr/bin/
  111. $(INSTALL_BIN) $(PKG_BUILD_DIR)/scripts/msmtpqueue/msmtp-{en,list,run}queue.sh $(1)/usr/bin/
  112. endef
  113. $(eval $(call BuildPackage,msmtp))
  114. $(eval $(call BuildPackage,msmtp-nossl))
  115. $(eval $(call BuildPackage,msmtp-queue))
  116. $(eval $(call BuildPackage,msmtp-mta))