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.

134 lines
3.8 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.7.2
  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:=666ce084760a47e601d49a9be3c7993c48789d332631e8dfb45f443b367b1260
  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_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. 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-pam \
  59. --with-notify=dnotify \
  60. --without-lzma \
  61. --without-lz4 \
  62. --without-sodium \
  63. $(if $(CONFIG_DOVECOT_GSSAPI),--with-gssapi=yes,--with-gssapi=no) \
  64. $(if $(CONFIG_DOVECOT_LDAP),--with-ldap=yes,--with-ldap=no) \
  65. $(if $(CONFIG_DOVECOT_MYSQL),--with-mysql=yes,--with-mysql=no) \
  66. $(if $(CONFIG_DOVECOT_PGSQL),--with-pgsql=yes,--with-pgsql=no) \
  67. $(if $(CONFIG_DOVECOT_SQLITE),--with-sqlite=yes,--with-sqlite=no) \
  68. $(if $(CONFIG_DOVECOT_ICU),--with-icu=yes,--with-icu=no)
  69. CONFIGURE_VARS += \
  70. RPCGEN= \
  71. i_cv_signed_size_t=no \
  72. i_cv_signed_time_t=no \
  73. i_cv_gmtime_max_time_t=32 \
  74. i_cv_mmap_plays_with_write=yes \
  75. i_cv_fd_passing=yes \
  76. i_cv_c99_vsnprintf=yes \
  77. lib_cv_va_copy=yes \
  78. lib_cv_va_copy=yes \
  79. lib_cv___va_copy=yes \
  80. lib_cv_va_val_copy=yes \
  81. ac_cv_prog_KRB5CONFIG="krb5-config"
  82. define Build/InstallDev
  83. $(INSTALL_DIR) $(1)/usr/include $(1)/usr/lib
  84. $(CP) $(PKG_INSTALL_DIR)/usr/include/dovecot $(1)/usr/include/
  85. $(CP) $(PKG_INSTALL_DIR)/usr/lib/dovecot $(1)/usr/lib/
  86. $(call libtool_remove_files,$(1))
  87. endef
  88. define Package/dovecot/install
  89. $(INSTALL_DIR) $(1)/etc/init.d
  90. $(INSTALL_BIN) ./files/dovecot.init $(1)/etc/init.d/dovecot
  91. $(INSTALL_DIR) $(1)/etc/dovecot
  92. $(CP) $(PKG_INSTALL_DIR)/usr/share/doc/dovecot/example-config/* $(1)/etc/dovecot/
  93. $(INSTALL_DIR) $(1)/usr/lib/dovecot
  94. $(CP) $(PKG_INSTALL_DIR)/usr/lib/dovecot/* $(1)/usr/lib/dovecot/
  95. rm $(1)/usr/lib/dovecot/dovecot-config
  96. find $(1)/usr/lib/dovecot/ -name "*.a" -o -name "*.la" | $(XARGS) rm -f
  97. $(INSTALL_DIR) $(1)/usr/libexec/dovecot
  98. $(CP) $(PKG_INSTALL_DIR)/usr/libexec/dovecot/* $(1)/usr/libexec/dovecot/
  99. $(INSTALL_DIR) $(1)/usr/bin
  100. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/doveconf $(1)/usr/bin/
  101. $(INSTALL_DIR) $(1)/usr/sbin
  102. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/* $(1)/usr/sbin/
  103. endef
  104. define Package/dovecot-utils/install
  105. $(INSTALL_DIR) $(1)/usr/bin
  106. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/doveadm $(1)/usr/bin/
  107. $(CP) $(PKG_INSTALL_DIR)/usr/bin/dsync $(1)/usr/bin/
  108. endef
  109. $(eval $(call BuildPackage,dovecot))
  110. $(eval $(call BuildPackage,dovecot-utils))