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.

161 lines
5.0 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.6
  10. PKG_RELEASE:=1
  11. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
  12. PKG_SOURCE_URL:=https://www.dovecot.org/releases/2.3
  13. PKG_HASH:=ed1d8dc1beeae9c6c73deac73a62ef19fe9262fbffd86604a3f690452f5536c7
  14. PKG_LICENSE:=LGPL-2.1-only MIT BSD-3-Clause
  15. PKG_LICENSE_FILES:=COPYING COPYING.LGPL COPYING.MIT
  16. PKG_MAINTAINER:=Lucian Cristian <lucian.cristian@gmail.com>
  17. PKG_BUILD_DEPENDS:=libiconv
  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. 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)
  36. TITLE:=An IMAP and POP3 daemon
  37. URL:=https://www.dovecot.org/
  38. USERID:=dovecot=59:dovecot=59
  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. menu "Select dovecot build options"
  46. depends on PACKAGE_dovecot
  47. config DOVECOT_GSSAPI
  48. bool "GSSAPI support"
  49. default n
  50. help
  51. Implements GSSAPI support in dovecot.
  52. config DOVECOT_LDAP
  53. bool "LDAP support"
  54. default n
  55. help
  56. Implements LDAP support in dovecot.
  57. config DOVECOT_MYSQL
  58. bool "MYSQL support"
  59. default n
  60. help
  61. Implements MYSQL support in dovecot.
  62. config DOVECOT_PGSQL
  63. bool "PostgreSQL support"
  64. default n
  65. help
  66. Implements PostgreSQL support in dovecot.
  67. config DOVECOT_SQLITE
  68. bool "SQLite support"
  69. default n
  70. help
  71. Implements SQLite DB support in dovecot.
  72. config DOVECOT_ICU
  73. bool "Enable i18n features"
  74. default n
  75. help
  76. Enable ICU (International Components for Unicode) support.
  77. endmenu
  78. endef
  79. define Package/dovecot/conffiles
  80. /etc/init.d/dovecot
  81. /etc/dovecot/
  82. endef
  83. define Package/dovecot-utils
  84. SECTION:=mail
  85. CATEGORY:=Mail
  86. DEPENDS:=+dovecot
  87. TITLE:=doveadm and dsync utilities for Dovecot
  88. endef
  89. CONFIGURE_ARGS += \
  90. --libexecdir=/usr/libexec \
  91. --without-pam \
  92. --with-notify=dnotify \
  93. --without-lzma \
  94. --without-lz4 \
  95. --without-sodium \
  96. --without-docs \
  97. $(if $(CONFIG_DOVECOT_GSSAPI),--with-gssapi=yes,--with-gssapi=no) \
  98. $(if $(CONFIG_DOVECOT_LDAP),--with-ldap=yes,--with-ldap=no) \
  99. $(if $(CONFIG_DOVECOT_MYSQL),--with-mysql=yes,--with-mysql=no) \
  100. $(if $(CONFIG_DOVECOT_PGSQL),--with-pgsql=yes,--with-pgsql=no) \
  101. $(if $(CONFIG_DOVECOT_SQLITE),--with-sqlite=yes,--with-sqlite=no) \
  102. $(if $(CONFIG_DOVECOT_ICU),--with-icu=yes,--with-icu=no)
  103. CONFIGURE_VARS += \
  104. RPCGEN= \
  105. i_cv_signed_size_t=no \
  106. i_cv_signed_time_t=no \
  107. i_cv_gmtime_max_time_t=32 \
  108. i_cv_mmap_plays_with_write=yes \
  109. i_cv_fd_passing=yes \
  110. i_cv_c99_vsnprintf=yes \
  111. lib_cv_va_copy=yes \
  112. lib_cv_va_copy=yes \
  113. lib_cv___va_copy=yes \
  114. lib_cv_va_val_copy=yes \
  115. ac_cv_prog_KRB5CONFIG="krb5-config"
  116. define Build/InstallDev
  117. $(INSTALL_DIR) $(1)/usr/include $(1)/usr/lib
  118. $(CP) $(PKG_INSTALL_DIR)/usr/include/dovecot $(1)/usr/include/
  119. $(CP) $(PKG_INSTALL_DIR)/usr/lib/dovecot $(1)/usr/lib/
  120. rm -f $(1)/usr/lib/dovecot/*.la
  121. endef
  122. define Package/dovecot/install
  123. $(INSTALL_DIR) $(1)/etc/init.d \
  124. $(1)/etc/dovecot \
  125. $(1)/usr/lib/dovecot \
  126. $(1)/usr/libexec/dovecot \
  127. $(1)/usr/bin \
  128. $(1)/usr/sbin
  129. $(CP) $(PKG_INSTALL_DIR)/usr/lib/dovecot/* $(1)/usr/lib/dovecot/
  130. $(CP) $(PKG_INSTALL_DIR)/usr/libexec/dovecot/* $(1)/usr/libexec/dovecot/
  131. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/doveconf $(1)/usr/bin/
  132. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/* $(1)/usr/sbin/
  133. $(INSTALL_BIN) ./files/dovecot.init $(1)/etc/init.d/dovecot
  134. rm $(1)/usr/lib/dovecot/dovecot-config
  135. find $(1)/usr/lib/dovecot/ -name "*.a" -o -name "*.la" | xargs rm
  136. endef
  137. define Package/dovecot-utils/install
  138. $(INSTALL_DIR) $(1)/usr/bin
  139. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/doveadm $(1)/usr/bin/
  140. $(CP) $(PKG_INSTALL_DIR)/usr/bin/dsync $(1)/usr/bin/
  141. endef
  142. $(eval $(call BuildPackage,dovecot))
  143. $(eval $(call BuildPackage,dovecot-utils))