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.

135 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.10.1
  10. PKG_RELEASE:=1
  11. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
  12. PKG_SOURCE_URL:=https://dovecot.org/releases/2.3
  13. PKG_HASH:=6642e62f23b1b23cfac235007ca6e21cb67460cca834689fad450724456eb10c
  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. $(if $(CONFIG_DOVECOT_GSSAPI),--with-gssapi=yes,--with-gssapi=no) \
  65. $(if $(CONFIG_DOVECOT_LDAP),--with-ldap=yes,--with-ldap=no) \
  66. $(if $(CONFIG_DOVECOT_MYSQL),--with-mysql=yes,--with-mysql=no) \
  67. $(if $(CONFIG_DOVECOT_PGSQL),--with-pgsql=yes,--with-pgsql=no) \
  68. $(if $(CONFIG_DOVECOT_SQLITE),--with-sqlite=yes,--with-sqlite=no) \
  69. $(if $(CONFIG_DOVECOT_ICU),--with-icu=yes,--with-icu=no)
  70. CONFIGURE_VARS += \
  71. RPCGEN= \
  72. i_cv_signed_size_t=no \
  73. i_cv_signed_time_t=no \
  74. i_cv_gmtime_max_time_t=32 \
  75. i_cv_mmap_plays_with_write=yes \
  76. i_cv_fd_passing=yes \
  77. i_cv_c99_vsnprintf=yes \
  78. lib_cv_va_copy=yes \
  79. lib_cv_va_copy=yes \
  80. lib_cv___va_copy=yes \
  81. lib_cv_va_val_copy=yes \
  82. ac_cv_prog_KRB5CONFIG="krb5-config"
  83. define Build/InstallDev
  84. $(INSTALL_DIR) $(1)/usr/include $(1)/usr/lib
  85. $(CP) $(PKG_INSTALL_DIR)/usr/include/dovecot $(1)/usr/include/
  86. $(CP) $(PKG_INSTALL_DIR)/usr/lib/dovecot $(1)/usr/lib/
  87. $(call libtool_remove_files,$(1))
  88. endef
  89. define Package/dovecot/install
  90. $(INSTALL_DIR) $(1)/etc/init.d
  91. $(INSTALL_BIN) ./files/dovecot.init $(1)/etc/init.d/dovecot
  92. $(INSTALL_DIR) $(1)/etc/dovecot
  93. $(CP) $(PKG_INSTALL_DIR)/usr/share/doc/dovecot/example-config/* $(1)/etc/dovecot/
  94. $(INSTALL_DIR) $(1)/usr/lib/dovecot
  95. $(CP) $(PKG_INSTALL_DIR)/usr/lib/dovecot/* $(1)/usr/lib/dovecot/
  96. rm $(1)/usr/lib/dovecot/dovecot-config
  97. find $(1)/usr/lib/dovecot/ -name "*.a" -o -name "*.la" | $(XARGS) rm -f
  98. $(INSTALL_DIR) $(1)/usr/libexec/dovecot
  99. $(CP) $(PKG_INSTALL_DIR)/usr/libexec/dovecot/* $(1)/usr/libexec/dovecot/
  100. $(INSTALL_DIR) $(1)/usr/bin
  101. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/doveconf $(1)/usr/bin/
  102. $(INSTALL_DIR) $(1)/usr/sbin
  103. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/* $(1)/usr/sbin/
  104. endef
  105. define Package/dovecot-utils/install
  106. $(INSTALL_DIR) $(1)/usr/bin
  107. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/doveadm $(1)/usr/bin/
  108. $(CP) $(PKG_INSTALL_DIR)/usr/bin/dsync $(1)/usr/bin/
  109. endef
  110. $(eval $(call BuildPackage,dovecot))
  111. $(eval $(call BuildPackage,dovecot-utils))