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.

156 lines
4.9 KiB

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