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.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.6.8
  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:=55ff95a304d888b56d07d9c62327ab9bfe26532c9c2a2ed6aefc43bea1b659fb
  15. PKG_LICENSE:=GPL-3.0+
  16. PKG_LICENSE_FILES:=COPYING
  17. PKG_MAINTAINER:=
  18. PKG_BUILD_PARALLEL:=1
  19. PKG_INSTALL:=1
  20. PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(BUILD_VARIANT)/$(PKG_NAME)-$(PKG_VERSION)
  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+= +libopenssl +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. ifneq ($(CONFIG_USE_UCLIBC),)
  86. CONFIGURE_ARGS += --disable-gai-idn
  87. endif
  88. MAKE_FLAGS :=
  89. ifeq ($(BUILD_VARIANT),ssl)
  90. CONFIGURE_ARGS += \
  91. --with-tls=openssl
  92. endif
  93. ifeq ($(BUILD_VARIANT),nossl)
  94. CONFIGURE_ARGS += \
  95. --with-tls=no
  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. ln -sf ../bin/msmtp $(1)/usr/sbin/sendmail
  107. ln -sf ../bin/msmtp $(1)/usr/lib/sendmail
  108. endef
  109. Package/msmtp-nossl/conffiles = $(Package/msmtp/conffiles)
  110. Package/msmtp-nossl/install = $(Package/msmtp/install)
  111. define Package/msmtp-queue/install
  112. $(INSTALL_DIR) $(1)/usr/bin
  113. $(INSTALL_BIN) $(PKG_BUILD_DIR)/scripts/msmtpq/msmtp{q,-queue} $(1)/usr/bin/
  114. $(INSTALL_BIN) $(PKG_BUILD_DIR)/scripts/msmtpqueue/msmtp-{en,list,run}queue.sh $(1)/usr/bin/
  115. endef
  116. $(eval $(call BuildPackage,msmtp))
  117. $(eval $(call BuildPackage,msmtp-nossl))
  118. $(eval $(call BuildPackage,msmtp-queue))
  119. $(eval $(call BuildPackage,msmtp-mta))