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.

136 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.9
  10. PKG_RELEASE:=2
  11. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
  12. PKG_SOURCE_URL:=https://dovecot.org/releases/2.3
  13. PKG_HASH:=df2c53e5a0463c5c52af682fb11c17eb7f79115d95a861a63cd09329fd7daa9f
  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_BUILD_DEPENDS:=libiconv
  19. PKG_CONFIG_DEPENDS:= \
  20. CONFIG_DOVECOT_GSSAPI \
  21. CONFIG_DOVECOT_LDAP \
  22. CONFIG_DOVECOT_MYSQL \
  23. CONFIG_DOVECOT_PGSQL \
  24. CONFIG_DOVECOT_SQLITE \
  25. CONFIG_DOVECOT_ICU
  26. PKG_FIXUP:=autoreconf
  27. PKG_INSTALL:=1
  28. PKG_BUILD_PARALLEL:=1
  29. include $(INCLUDE_DIR)/package.mk
  30. # iconv is needed when compiling with MySQL support. iconv will also be used by
  31. # dovecot itself.
  32. include $(INCLUDE_DIR)/nls.mk
  33. define Package/dovecot
  34. SECTION:=mail
  35. CATEGORY:=Mail
  36. TITLE:=An IMAP and POP3 daemon
  37. URL:=https://www.dovecot.org/
  38. 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)
  39. USERID:=dovecot=59:dovecot=59 dovenull=60:dovenull=60
  40. ABI_VERSION:=$(PKG_VERSION)
  41. endef
  42. define Package/dovecot/description
  43. Dovecot is a program which provides POP3 and IMAP services.
  44. endef
  45. define Package/dovecot/config
  46. source "$(SOURCE)/Config.in"
  47. endef
  48. define Package/dovecot/conffiles
  49. /etc/dovecot/
  50. endef
  51. define Package/dovecot-utils
  52. SECTION:=mail
  53. CATEGORY:=Mail
  54. DEPENDS:=+dovecot
  55. TITLE:=doveadm and dsync utilities for Dovecot
  56. endef
  57. CONFIGURE_ARGS += \
  58. --libexecdir=/usr/libexec \
  59. --without-libunwind \
  60. --without-pam \
  61. --with-notify=dnotify \
  62. --without-lzma \
  63. --without-lz4 \
  64. --without-sodium \
  65. $(if $(CONFIG_DOVECOT_GSSAPI),--with-gssapi=yes,--with-gssapi=no) \
  66. $(if $(CONFIG_DOVECOT_LDAP),--with-ldap=yes,--with-ldap=no) \
  67. $(if $(CONFIG_DOVECOT_MYSQL),--with-mysql=yes,--with-mysql=no) \
  68. $(if $(CONFIG_DOVECOT_PGSQL),--with-pgsql=yes,--with-pgsql=no) \
  69. $(if $(CONFIG_DOVECOT_SQLITE),--with-sqlite=yes,--with-sqlite=no) \
  70. $(if $(CONFIG_DOVECOT_ICU),--with-icu=yes,--with-icu=no)
  71. CONFIGURE_VARS += \
  72. RPCGEN= \
  73. i_cv_signed_size_t=no \
  74. i_cv_signed_time_t=no \
  75. i_cv_gmtime_max_time_t=32 \
  76. i_cv_mmap_plays_with_write=yes \
  77. i_cv_fd_passing=yes \
  78. i_cv_c99_vsnprintf=yes \
  79. lib_cv_va_copy=yes \
  80. lib_cv_va_copy=yes \
  81. lib_cv___va_copy=yes \
  82. lib_cv_va_val_copy=yes \
  83. ac_cv_prog_KRB5CONFIG="krb5-config"
  84. define Build/InstallDev
  85. $(INSTALL_DIR) $(1)/usr/include $(1)/usr/lib
  86. $(CP) $(PKG_INSTALL_DIR)/usr/include/dovecot $(1)/usr/include/
  87. $(CP) $(PKG_INSTALL_DIR)/usr/lib/dovecot $(1)/usr/lib/
  88. $(call libtool_remove_files,$(1))
  89. endef
  90. define Package/dovecot/install
  91. $(INSTALL_DIR) $(1)/etc/init.d
  92. $(INSTALL_BIN) ./files/dovecot.init $(1)/etc/init.d/dovecot
  93. $(INSTALL_DIR) $(1)/etc/dovecot
  94. $(CP) $(PKG_INSTALL_DIR)/usr/share/doc/dovecot/example-config/* $(1)/etc/dovecot/
  95. $(INSTALL_DIR) $(1)/usr/lib/dovecot
  96. $(CP) $(PKG_INSTALL_DIR)/usr/lib/dovecot/* $(1)/usr/lib/dovecot/
  97. rm $(1)/usr/lib/dovecot/dovecot-config
  98. find $(1)/usr/lib/dovecot/ -name "*.a" -o -name "*.la" | $(XARGS) rm -f
  99. $(INSTALL_DIR) $(1)/usr/libexec/dovecot
  100. $(CP) $(PKG_INSTALL_DIR)/usr/libexec/dovecot/* $(1)/usr/libexec/dovecot/
  101. $(INSTALL_DIR) $(1)/usr/bin
  102. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/doveconf $(1)/usr/bin/
  103. $(INSTALL_DIR) $(1)/usr/sbin
  104. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/* $(1)/usr/sbin/
  105. endef
  106. define Package/dovecot-utils/install
  107. $(INSTALL_DIR) $(1)/usr/bin
  108. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/doveadm $(1)/usr/bin/
  109. $(CP) $(PKG_INSTALL_DIR)/usr/bin/dsync $(1)/usr/bin/
  110. endef
  111. $(eval $(call BuildPackage,dovecot))
  112. $(eval $(call BuildPackage,dovecot-utils))