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.

136 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.18
  10. PKG_RELEASE:=$(AUTORELEASE)
  11. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
  12. PKG_SOURCE_URL:=https://dovecot.org/releases/2.3
  13. PKG_HASH:=06e73f668c6c093c45bdeeeb7c20398ab8dc49317234f4b5781ac5e2cc5d6c33
  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_CONFIG_DEPENDS:= \
  19. CONFIG_DOVECOT_GSSAPI \
  20. CONFIG_DOVECOT_LDAP \
  21. CONFIG_DOVECOT_MYSQL \
  22. CONFIG_DOVECOT_PGSQL \
  23. CONFIG_DOVECOT_SQLITE \
  24. CONFIG_DOVECOT_ICU
  25. PKG_FIXUP:=autoreconf
  26. PKG_INSTALL:=1
  27. PKG_BUILD_PARALLEL:=1
  28. include $(INCLUDE_DIR)/package.mk
  29. # iconv is needed when compiling with MySQL support. iconv will also be used by
  30. # dovecot itself.
  31. include $(INCLUDE_DIR)/nls.mk
  32. define Package/dovecot
  33. SECTION:=mail
  34. CATEGORY:=Mail
  35. TITLE:=An IMAP and POP3 daemon
  36. URL:=https://www.dovecot.org/
  37. 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)
  38. USERID:=dovecot=59:dovecot=59 dovenull=60:dovenull=60
  39. ABI_VERSION:=$(PKG_VERSION)
  40. endef
  41. define Package/dovecot/description
  42. Dovecot is a program which provides POP3 and IMAP services.
  43. endef
  44. define Package/dovecot/config
  45. source "$(SOURCE)/Config.in"
  46. endef
  47. define Package/dovecot/conffiles
  48. /etc/dovecot/
  49. endef
  50. define Package/dovecot-utils
  51. SECTION:=mail
  52. CATEGORY:=Mail
  53. DEPENDS:=+dovecot
  54. TITLE:=doveadm and dsync utilities for Dovecot
  55. endef
  56. CONFIGURE_ARGS += \
  57. --libexecdir=/usr/libexec \
  58. --without-libunwind \
  59. --without-pam \
  60. --with-notify=dnotify \
  61. --without-lzma \
  62. --without-lz4 \
  63. --without-sodium \
  64. --without-zstd \
  65. $(if $(CONFIG_DOVECOT_GSSAPI),--with-gssapi=yes,--with-gssapi=no) \
  66. $(if $(CONFIG_DOVECOT_LDAP),--with-ldap=yes,--with-ldap=no) \
  67. $(if $(CONFIG_DOVECOT_MYSQL),--with-mysql=yes,--with-mysql=no) \
  68. $(if $(CONFIG_DOVECOT_PGSQL),--with-pgsql=yes,--with-pgsql=no) \
  69. $(if $(CONFIG_DOVECOT_SQLITE),--with-sqlite=yes,--with-sqlite=no) \
  70. $(if $(CONFIG_DOVECOT_ICU),--with-icu=yes,--with-icu=no)
  71. CONFIGURE_VARS += \
  72. RPCGEN= \
  73. i_cv_signed_size_t=no \
  74. i_cv_signed_time_t=no \
  75. i_cv_gmtime_max_time_t=32 \
  76. i_cv_mmap_plays_with_write=yes \
  77. i_cv_fd_passing=yes \
  78. i_cv_c99_vsnprintf=yes \
  79. lib_cv_va_copy=yes \
  80. lib_cv_va_copy=yes \
  81. lib_cv___va_copy=yes \
  82. lib_cv_va_val_copy=yes \
  83. ac_cv_prog_KRB5CONFIG="krb5-config"
  84. define Build/InstallDev
  85. $(INSTALL_DIR) $(1)/usr/include $(1)/usr/lib
  86. $(CP) $(PKG_INSTALL_DIR)/usr/include/dovecot $(1)/usr/include/
  87. $(CP) $(PKG_INSTALL_DIR)/usr/lib/dovecot $(1)/usr/lib/
  88. $(call libtool_remove_files,$(1))
  89. endef
  90. define Package/dovecot/install
  91. $(INSTALL_DIR) $(1)/etc/init.d
  92. $(INSTALL_BIN) ./files/dovecot.init $(1)/etc/init.d/dovecot
  93. $(INSTALL_DIR) $(1)/etc/dovecot
  94. $(CP) $(PKG_INSTALL_DIR)/usr/share/doc/dovecot/example-config/* $(1)/etc/dovecot/
  95. $(INSTALL_DIR) $(1)/usr/lib/dovecot
  96. $(CP) $(PKG_INSTALL_DIR)/usr/lib/dovecot/* $(1)/usr/lib/dovecot/
  97. rm $(1)/usr/lib/dovecot/dovecot-config
  98. find $(1)/usr/lib/dovecot/ -name "*.a" -o -name "*.la" | $(XARGS) rm -f
  99. $(INSTALL_DIR) $(1)/usr/libexec/dovecot
  100. $(CP) $(PKG_INSTALL_DIR)/usr/libexec/dovecot/* $(1)/usr/libexec/dovecot/
  101. $(INSTALL_DIR) $(1)/usr/bin
  102. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/doveconf $(1)/usr/bin/
  103. $(INSTALL_DIR) $(1)/usr/sbin
  104. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/* $(1)/usr/sbin/
  105. endef
  106. define Package/dovecot-utils/install
  107. $(INSTALL_DIR) $(1)/usr/bin
  108. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/doveadm $(1)/usr/bin/
  109. $(CP) $(PKG_INSTALL_DIR)/usr/bin/dsync $(1)/usr/bin/
  110. endef
  111. $(eval $(call BuildPackage,dovecot))
  112. $(eval $(call BuildPackage,dovecot-utils))