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.

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