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.

135 lines
3.9 KiB

  1. #
  2. # Copyright (C) 2006-2018 OpenWrt.org
  3. #
  4. # This is free software, licensed under the GNU General Public License v2.
  5. # See /LICENSE for more information.
  6. #
  7. include $(TOPDIR)/rules.mk
  8. PKG_NAME:=dovecot
  9. PKG_VERSION:=2.3.7.2
  10. PKG_RELEASE:=1
  11. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
  12. PKG_SOURCE_URL:=https://dovecot.org/releases/2.3
  13. PKG_HASH:=666ce084760a47e601d49a9be3c7993c48789d332631e8dfb45f443b367b1260
  14. PKG_MAINTAINER:=Lucian Cristian <lucian.cristian@gmail.com>
  15. PKG_LICENSE:=LGPL-2.1-only MIT BSD-3-Clause
  16. PKG_LICENSE_FILES:=COPYING COPYING.LGPL COPYING.MIT
  17. PKG_CPE_ID:=cpe:/a:dovecot:dovecot
  18. PKG_BUILD_DEPENDS:=libiconv
  19. PKG_CONFIG_DEPENDS:= \
  20. CONFIG_DOVECOT_GSSAPI \
  21. CONFIG_DOVECOT_LDAP \
  22. CONFIG_DOVECOT_MYSQL \
  23. CONFIG_DOVECOT_PGSQL \
  24. CONFIG_DOVECOT_SQLITE \
  25. CONFIG_DOVECOT_ICU
  26. PKG_FIXUP:=autoreconf
  27. PKG_INSTALL:=1
  28. PKG_BUILD_PARALLEL:=1
  29. include $(INCLUDE_DIR)/package.mk
  30. # iconv is needed when compiling with MySQL support. iconv will also be used by
  31. # dovecot itself.
  32. include $(INCLUDE_DIR)/nls.mk
  33. define Package/dovecot
  34. SECTION:=mail
  35. CATEGORY:=Mail
  36. TITLE:=An IMAP and POP3 daemon
  37. URL:=https://www.dovecot.org/
  38. DEPENDS:=+DOVECOT_GSSAPI:krb5-libs +DOVECOT_LDAP:libopenldap +DOVECOT_MYSQL:libmysqlclient +DOVECOT_PGSQL:libpq +DOVECOT_SQLITE:libsqlite3 +libopenssl +librt +zlib +libbz2 +libcap +DOVECOT_ICU:icu $(ICONV_DEPENDS)
  39. USERID:=dovecot=59:dovecot=59 dovenull=60:dovenull=60
  40. ABI_VERSION:=$(PKG_VERSION)
  41. endef
  42. define Package/dovecot/description
  43. Dovecot is a program which provides POP3 and IMAP services.
  44. endef
  45. define Package/dovecot/config
  46. source "$(SOURCE)/Config.in"
  47. endef
  48. define Package/dovecot/conffiles
  49. /etc/dovecot/
  50. endef
  51. define Package/dovecot-utils
  52. SECTION:=mail
  53. CATEGORY:=Mail
  54. DEPENDS:=+dovecot
  55. TITLE:=doveadm and dsync utilities for Dovecot
  56. endef
  57. CONFIGURE_ARGS += \
  58. --libexecdir=/usr/libexec \
  59. --without-pam \
  60. --with-notify=dnotify \
  61. --without-lzma \
  62. --without-lz4 \
  63. --without-sodium \
  64. $(if $(CONFIG_DOVECOT_GSSAPI),--with-gssapi=yes,--with-gssapi=no) \
  65. $(if $(CONFIG_DOVECOT_LDAP),--with-ldap=yes,--with-ldap=no) \
  66. $(if $(CONFIG_DOVECOT_MYSQL),--with-mysql=yes,--with-mysql=no) \
  67. $(if $(CONFIG_DOVECOT_PGSQL),--with-pgsql=yes,--with-pgsql=no) \
  68. $(if $(CONFIG_DOVECOT_SQLITE),--with-sqlite=yes,--with-sqlite=no) \
  69. $(if $(CONFIG_DOVECOT_ICU),--with-icu=yes,--with-icu=no)
  70. CONFIGURE_VARS += \
  71. RPCGEN= \
  72. i_cv_signed_size_t=no \
  73. i_cv_signed_time_t=no \
  74. i_cv_gmtime_max_time_t=32 \
  75. i_cv_mmap_plays_with_write=yes \
  76. i_cv_fd_passing=yes \
  77. i_cv_c99_vsnprintf=yes \
  78. lib_cv_va_copy=yes \
  79. lib_cv_va_copy=yes \
  80. lib_cv___va_copy=yes \
  81. lib_cv_va_val_copy=yes \
  82. ac_cv_prog_KRB5CONFIG="krb5-config"
  83. define Build/InstallDev
  84. $(INSTALL_DIR) $(1)/usr/include $(1)/usr/lib
  85. $(CP) $(PKG_INSTALL_DIR)/usr/include/dovecot $(1)/usr/include/
  86. $(CP) $(PKG_INSTALL_DIR)/usr/lib/dovecot $(1)/usr/lib/
  87. $(call libtool_remove_files,$(1))
  88. endef
  89. define Package/dovecot/install
  90. $(INSTALL_DIR) $(1)/etc/init.d
  91. $(INSTALL_BIN) ./files/dovecot.init $(1)/etc/init.d/dovecot
  92. $(INSTALL_DIR) $(1)/etc/dovecot
  93. $(CP) $(PKG_INSTALL_DIR)/usr/share/doc/dovecot/example-config/* $(1)/etc/dovecot/
  94. $(INSTALL_DIR) $(1)/usr/lib/dovecot
  95. $(CP) $(PKG_INSTALL_DIR)/usr/lib/dovecot/* $(1)/usr/lib/dovecot/
  96. rm $(1)/usr/lib/dovecot/dovecot-config
  97. find $(1)/usr/lib/dovecot/ -name "*.a" -o -name "*.la" | $(XARGS) rm -f
  98. $(INSTALL_DIR) $(1)/usr/libexec/dovecot
  99. $(CP) $(PKG_INSTALL_DIR)/usr/libexec/dovecot/* $(1)/usr/libexec/dovecot/
  100. $(INSTALL_DIR) $(1)/usr/bin
  101. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/doveconf $(1)/usr/bin/
  102. $(INSTALL_DIR) $(1)/usr/sbin
  103. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/* $(1)/usr/sbin/
  104. endef
  105. define Package/dovecot-utils/install
  106. $(INSTALL_DIR) $(1)/usr/bin
  107. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/doveadm $(1)/usr/bin/
  108. $(CP) $(PKG_INSTALL_DIR)/usr/bin/dsync $(1)/usr/bin/
  109. endef
  110. $(eval $(call BuildPackage,dovecot))
  111. $(eval $(call BuildPackage,dovecot-utils))