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.

155 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.2.35
  10. PKG_RELEASE:=1
  11. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
  12. PKG_SOURCE_URL:=http://www.dovecot.org/releases/2.2
  13. PKG_HASH:=cce15db2fc5233386b63a3cf21c465c09e6e55014ed66c4f184b7d221a47180c
  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:=http://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. $(if $(CONFIG_DOVECOT_GSSAPI),--with-gssapi=yes,--with-gssapi=no) \
  92. $(if $(CONFIG_DOVECOT_LDAP),--with-ldap=yes,--with-ldap=no) \
  93. $(if $(CONFIG_DOVECOT_MYSQL),--with-mysql=yes,--with-mysql=no) \
  94. $(if $(CONFIG_DOVECOT_PGSQL),--with-pgsql=yes,--with-pgsql=no) \
  95. $(if $(CONFIG_DOVECOT_SQLITE),--with-sqlite=yes,--with-sqlite=no) \
  96. $(if $(CONFIG_DOVECOT_ICU),--with-icu=yes,--with-icu=no)
  97. CONFIGURE_VARS += \
  98. RPCGEN= \
  99. i_cv_signed_size_t=no \
  100. i_cv_signed_time_t=no \
  101. i_cv_gmtime_max_time_t=32 \
  102. i_cv_mmap_plays_with_write=yes \
  103. i_cv_fd_passing=yes \
  104. i_cv_c99_vsnprintf=yes \
  105. lib_cv_va_copy=yes \
  106. lib_cv_va_copy=yes \
  107. lib_cv___va_copy=yes \
  108. lib_cv_va_val_copy=yes
  109. define Build/InstallDev
  110. $(INSTALL_DIR) $(1)/usr/include $(1)/usr/lib
  111. $(CP) $(PKG_INSTALL_DIR)/usr/include/dovecot $(1)/usr/include/
  112. $(CP) $(PKG_INSTALL_DIR)/usr/lib/dovecot $(1)/usr/lib/
  113. rm -f $(1)/usr/lib/dovecot/*.la
  114. endef
  115. define Package/dovecot/install
  116. $(INSTALL_DIR) $(1)/etc/init.d \
  117. $(1)/etc/dovecot \
  118. $(1)/usr/share/doc/dovecot \
  119. $(1)/usr/lib/dovecot \
  120. $(1)/usr/bin \
  121. $(1)/usr/sbin
  122. $(CP) $(PKG_INSTALL_DIR)/etc/dovecot/* $(1)/etc/dovecot/
  123. $(CP) $(PKG_INSTALL_DIR)/usr/lib/dovecot/* $(1)/usr/lib/dovecot/
  124. $(CP) $(PKG_INSTALL_DIR)/usr/share/doc/dovecot/example-config $(1)/usr/share/doc/dovecot/
  125. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/doveconf $(1)/usr/bin/
  126. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/* $(1)/usr/sbin/
  127. $(INSTALL_BIN) ./files/dovecot.init $(1)/etc/init.d/dovecot
  128. rm $(1)/usr/lib/dovecot/dovecot-config
  129. find $(1)/usr/lib/dovecot/ -name "*.a" -o -name "*.la" | xargs rm
  130. endef
  131. define Package/dovecot-utils/install
  132. $(INSTALL_DIR) $(1)/usr/bin
  133. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/doveadm $(1)/usr/bin/
  134. $(CP) $(PKG_INSTALL_DIR)/usr/bin/dsync $(1)/usr/bin/
  135. endef
  136. $(eval $(call BuildPackage,dovecot))
  137. $(eval $(call BuildPackage,dovecot-utils))