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.

138 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.4
  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:=e5dd7fe95bc8e2f5eea3e4894ec9628252f30bd700a7fd1a568b10efa91129f7
  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_CPE_ID:=cpe:/a:marlam:msmtp
  20. PKG_BUILD_PARALLEL:=1
  21. PKG_INSTALL:=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. 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. endef
  56. define Package/msmtp-nossl/description
  57. $(call Package/msmtp/Default/description)
  58. This package is built without SSL support.
  59. endef
  60. define Package/msmtp-mta
  61. $(call Package/msmtp/Default)
  62. TITLE+= (as MTA)
  63. DEPENDS+=@(PACKAGE_msmtp||PACKAGE_msmtp-nossl)
  64. endef
  65. define Package/msmtp-mta/description
  66. $(call Package/msmtp/Default/description)
  67. This package add a link from sendmail to msmtp
  68. and is built with SSL support.
  69. endef
  70. define Package/msmtp-queue
  71. $(call Package/msmtp/Default)
  72. DEPENDS+= +bash @(PACKAGE_msmtp||PACKAGE_msmtp-nossl)
  73. TITLE+= (queue scripts)
  74. endef
  75. define Package/msmtp-queue/description
  76. $(call Package/msmtp/Default/description)
  77. This package contains the msmtp queue scripts.
  78. endef
  79. CONFIGURE_ARGS += \
  80. --disable-rpath \
  81. --without-libintl-prefix \
  82. --without-libgsasl \
  83. --without-libidn \
  84. --without-libsecret \
  85. --without-macosx-keyring \
  86. --without-msmtpd
  87. ifeq ($(BUILD_VARIANT),ssl)
  88. CONFIGURE_ARGS += --with-tls=gnutls
  89. else
  90. CONFIGURE_ARGS += --without-tls
  91. endif
  92. define Package/msmtp/install
  93. $(INSTALL_DIR) $(1)/etc
  94. $(INSTALL_CONF) $(PKG_BUILD_DIR)/doc/msmtprc-system.example \
  95. $(1)/etc/msmtprc
  96. $(INSTALL_DIR) $(1)/usr/bin
  97. $(CP) $(PKG_INSTALL_DIR)/usr/bin/msmtp $(1)/usr/bin/
  98. endef
  99. define Package/msmtp-mta/install
  100. $(INSTALL_DIR) $(1)/usr/sbin $(1)/usr/lib
  101. ln -sf ../bin/msmtp $(1)/usr/sbin/sendmail
  102. ln -sf ../bin/msmtp $(1)/usr/lib/sendmail
  103. endef
  104. Package/msmtp-nossl/conffiles = $(Package/msmtp/conffiles)
  105. Package/msmtp-nossl/install = $(Package/msmtp/install)
  106. define Package/msmtp-queue/install
  107. $(INSTALL_DIR) $(1)/usr/bin
  108. $(INSTALL_BIN) $(PKG_BUILD_DIR)/scripts/msmtpq/msmtp{q,-queue} $(1)/usr/bin/
  109. $(INSTALL_BIN) $(PKG_BUILD_DIR)/scripts/msmtpqueue/msmtp-{en,list,run}queue.sh $(1)/usr/bin/
  110. endef
  111. $(eval $(call BuildPackage,msmtp))
  112. $(eval $(call BuildPackage,msmtp-nossl))
  113. $(eval $(call BuildPackage,msmtp-queue))
  114. $(eval $(call BuildPackage,msmtp-mta))