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.

163 lines
5.2 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.5.1
  10. PKG_RELEASE:=3
  11. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
  12. PKG_SOURCE_URL:=https://www.dovecot.org/releases/2.3
  13. PKG_HASH:=d78f9d479e3b2caa808160f86bfec1c9c7b46344d8b14b88f5fa9bbbf8c7c33f
  14. PKG_LICENSE:=LGPL-2.1 MIT BSD-3-Clause Unique
  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. $(if $(CONFIG_DOVECOT_GSSAPI),--with-gssapi=yes,--with-gssapi=no) \
  97. $(if $(CONFIG_DOVECOT_LDAP),--with-ldap=yes,--with-ldap=no) \
  98. $(if $(CONFIG_DOVECOT_MYSQL),--with-mysql=yes,--with-mysql=no) \
  99. $(if $(CONFIG_DOVECOT_PGSQL),--with-pgsql=yes,--with-pgsql=no) \
  100. $(if $(CONFIG_DOVECOT_SQLITE),--with-sqlite=yes,--with-sqlite=no) \
  101. $(if $(CONFIG_DOVECOT_ICU),--with-icu=yes,--with-icu=no)
  102. CONFIGURE_VARS += \
  103. RPCGEN= \
  104. i_cv_signed_size_t=no \
  105. i_cv_signed_time_t=no \
  106. i_cv_gmtime_max_time_t=32 \
  107. i_cv_mmap_plays_with_write=yes \
  108. i_cv_fd_passing=yes \
  109. i_cv_c99_vsnprintf=yes \
  110. lib_cv_va_copy=yes \
  111. lib_cv_va_copy=yes \
  112. lib_cv___va_copy=yes \
  113. lib_cv_va_val_copy=yes \
  114. ac_cv_prog_KRB5CONFIG="krb5-config"
  115. define Build/InstallDev
  116. $(INSTALL_DIR) $(1)/usr/include $(1)/usr/lib
  117. $(CP) $(PKG_INSTALL_DIR)/usr/include/dovecot $(1)/usr/include/
  118. $(CP) $(PKG_INSTALL_DIR)/usr/lib/dovecot $(1)/usr/lib/
  119. rm -f $(1)/usr/lib/dovecot/*.la
  120. endef
  121. define Package/dovecot/install
  122. $(INSTALL_DIR) $(1)/etc/init.d \
  123. $(1)/etc/dovecot \
  124. $(1)/usr/share/doc/dovecot \
  125. $(1)/usr/lib/dovecot \
  126. $(1)/usr/libexec/dovecot \
  127. $(1)/usr/bin \
  128. $(1)/usr/sbin
  129. $(CP) $(PKG_INSTALL_DIR)/etc/dovecot/* $(1)/etc/dovecot/
  130. $(CP) $(PKG_INSTALL_DIR)/usr/lib/dovecot/* $(1)/usr/lib/dovecot/
  131. $(CP) $(PKG_INSTALL_DIR)/usr/libexec/dovecot/* $(1)/usr/libexec/dovecot/
  132. $(CP) $(PKG_INSTALL_DIR)/usr/share/doc/dovecot/example-config $(1)/usr/share/doc/dovecot/
  133. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/doveconf $(1)/usr/bin/
  134. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/* $(1)/usr/sbin/
  135. $(INSTALL_BIN) ./files/dovecot.init $(1)/etc/init.d/dovecot
  136. rm $(1)/usr/lib/dovecot/dovecot-config
  137. find $(1)/usr/lib/dovecot/ -name "*.a" -o -name "*.la" | xargs rm
  138. endef
  139. define Package/dovecot-utils/install
  140. $(INSTALL_DIR) $(1)/usr/bin
  141. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/doveadm $(1)/usr/bin/
  142. $(CP) $(PKG_INSTALL_DIR)/usr/bin/dsync $(1)/usr/bin/
  143. endef
  144. $(eval $(call BuildPackage,dovecot))
  145. $(eval $(call BuildPackage,dovecot-utils))