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.1 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.4
  10. PKG_RELEASE:=2
  11. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
  12. PKG_SOURCE_URL:=https://www.dovecot.org/releases/2.3
  13. PKG_HASH:=d91b76eff8df6185c1799f1b279f780105bdeeea27e3286b42f4cab18efbef05
  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. include $(INCLUDE_DIR)/package.mk
  28. # iconv is needed when compiling with MySQL support. iconv will also be used by
  29. # dovecot itself.
  30. include $(INCLUDE_DIR)/nls.mk
  31. define Package/dovecot
  32. SECTION:=mail
  33. CATEGORY:=Mail
  34. 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)
  35. TITLE:=An IMAP and POP3 daemon
  36. URL:=https://www.dovecot.org/
  37. USERID:=dovecot=59:dovecot=59
  38. ABI_VERSION:=$(PKG_VERSION)
  39. endef
  40. define Package/dovecot/description
  41. Dovecot is a program which provides POP3 and IMAP services.
  42. endef
  43. define Package/dovecot/config
  44. menu "Select dovecot build options"
  45. depends on PACKAGE_dovecot
  46. config DOVECOT_GSSAPI
  47. bool "GSSAPI support"
  48. default n
  49. help
  50. Implements GSSAPI support in dovecot.
  51. config DOVECOT_LDAP
  52. bool "LDAP support"
  53. default n
  54. help
  55. Implements LDAP support in dovecot.
  56. config DOVECOT_MYSQL
  57. bool "MYSQL support"
  58. default n
  59. help
  60. Implements MYSQL support in dovecot.
  61. config DOVECOT_PGSQL
  62. bool "PostgreSQL support"
  63. default n
  64. help
  65. Implements PostgreSQL support in dovecot.
  66. config DOVECOT_SQLITE
  67. bool "SQLite support"
  68. default n
  69. help
  70. Implements SQLite DB support in dovecot.
  71. config DOVECOT_ICU
  72. bool "Enable i18n features"
  73. default n
  74. help
  75. Enable ICU (International Components for Unicode) support.
  76. endmenu
  77. endef
  78. define Package/dovecot/conffiles
  79. /etc/init.d/dovecot
  80. /etc/dovecot/
  81. endef
  82. define Package/dovecot-utils
  83. SECTION:=mail
  84. CATEGORY:=Mail
  85. DEPENDS:=+dovecot
  86. TITLE:=doveadm and dsync utilities for Dovecot
  87. endef
  88. CONFIGURE_ARGS += \
  89. --libexecdir=/usr/libexec \
  90. --without-pam \
  91. --with-notify=dnotify \
  92. --without-lzma \
  93. --without-lz4 \
  94. --without-sodium \
  95. $(if $(CONFIG_DOVECOT_GSSAPI),--with-gssapi=yes,--with-gssapi=no) \
  96. $(if $(CONFIG_DOVECOT_LDAP),--with-ldap=yes,--with-ldap=no) \
  97. $(if $(CONFIG_DOVECOT_MYSQL),--with-mysql=yes,--with-mysql=no) \
  98. $(if $(CONFIG_DOVECOT_PGSQL),--with-pgsql=yes,--with-pgsql=no) \
  99. $(if $(CONFIG_DOVECOT_SQLITE),--with-sqlite=yes,--with-sqlite=no) \
  100. $(if $(CONFIG_DOVECOT_ICU),--with-icu=yes,--with-icu=no)
  101. CONFIGURE_VARS += \
  102. RPCGEN= \
  103. i_cv_signed_size_t=no \
  104. i_cv_signed_time_t=no \
  105. i_cv_gmtime_max_time_t=32 \
  106. i_cv_mmap_plays_with_write=yes \
  107. i_cv_fd_passing=yes \
  108. i_cv_c99_vsnprintf=yes \
  109. lib_cv_va_copy=yes \
  110. lib_cv_va_copy=yes \
  111. lib_cv___va_copy=yes \
  112. lib_cv_va_val_copy=yes
  113. define Build/InstallDev
  114. $(INSTALL_DIR) $(1)/usr/include $(1)/usr/lib
  115. $(CP) $(PKG_INSTALL_DIR)/usr/include/dovecot $(1)/usr/include/
  116. $(CP) $(PKG_INSTALL_DIR)/usr/lib/dovecot $(1)/usr/lib/
  117. rm -f $(1)/usr/lib/dovecot/*.la
  118. endef
  119. define Package/dovecot/install
  120. $(INSTALL_DIR) $(1)/etc/init.d \
  121. $(1)/etc/dovecot \
  122. $(1)/usr/share/doc/dovecot \
  123. $(1)/usr/lib/dovecot \
  124. $(1)/usr/libexec/dovecot \
  125. $(1)/usr/bin \
  126. $(1)/usr/sbin
  127. $(CP) $(PKG_INSTALL_DIR)/etc/dovecot/* $(1)/etc/dovecot/
  128. $(CP) $(PKG_INSTALL_DIR)/usr/lib/dovecot/* $(1)/usr/lib/dovecot/
  129. $(CP) $(PKG_INSTALL_DIR)/usr/libexec/dovecot/* $(1)/usr/libexec/dovecot/
  130. $(CP) $(PKG_INSTALL_DIR)/usr/share/doc/dovecot/example-config $(1)/usr/share/doc/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))