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.

106 lines
3.1 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.31
  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:=034be40907748128d65088a4f59789b2f99ae7b33a88974eae0b6a68ece376a1
  14. PKG_LICENSE:=LGPL-2.1 MIT BSD-3-Clause Unique
  15. PKG_LICENSE_FILES:=COPYING COPYING.LGPL COPYING.MIT
  16. PKG_BUILD_DEPENDS:=libiconv
  17. PKG_FIXUP:=autoreconf
  18. PKG_INSTALL:=1
  19. include $(INCLUDE_DIR)/package.mk
  20. define Package/dovecot
  21. SECTION:=mail
  22. CATEGORY:=Mail
  23. DEPENDS:=+DOVECOT_LDAP:libopenldap +DOVECOT_SQLITE:libsqlite3 +libopenssl +librt +zlib +libbz2 +libcap
  24. TITLE:=An IMAP and POP3 daemon
  25. MAINTAINER:=Lucian Cristian <lucian.cristian@gmail.com>
  26. URL:=http://www.dovecot.org/
  27. USERID:=dovecot=59:dovecot=59
  28. endef
  29. define Package/dovecot/description
  30. Dovecot is a program which provides POP3 and IMAP services.
  31. endef
  32. define Package/dovecot/config
  33. menu "Select dovecot build options"
  34. depends on PACKAGE_dovecot
  35. config DOVECOT_LDAP
  36. bool "LDAP support"
  37. default n
  38. help
  39. Implements LDAP support in dovecot.
  40. config DOVECOT_SQLITE
  41. bool "SQLite support"
  42. default n
  43. help
  44. Implements SQLite DB support in dovecot.
  45. endmenu
  46. endef
  47. CONFIGURE_ARGS += \
  48. --without-gssapi \
  49. --without-pam \
  50. --with-moduledir=/usr/lib/dovecot/modules \
  51. --with-notify=dnotify \
  52. --without-lzma \
  53. --without-lz4 \
  54. --with-icu=no \
  55. $(if $(CONFIG_DOVECOT_LDAP),--with-ldap=yes,--with-ldap=no) \
  56. $(if $(CONFIG_DOVECOT_SQLITE),--with-sqlite=yes,--with-sqlite=no)
  57. CONFIGURE_VARS += \
  58. RPCGEN= \
  59. i_cv_signed_size_t=no \
  60. i_cv_signed_time_t=no \
  61. i_cv_gmtime_max_time_t=32 \
  62. i_cv_mmap_plays_with_write=yes \
  63. i_cv_fd_passing=yes \
  64. i_cv_c99_vsnprintf=yes \
  65. lib_cv_va_copy=yes \
  66. lib_cv_va_copy=yes \
  67. lib_cv___va_copy=yes \
  68. lib_cv_va_val_copy=yes
  69. define Build/InstallDev
  70. $(INSTALL_DIR) $(1)/usr/include $(1)/usr/lib
  71. $(CP) $(PKG_INSTALL_DIR)/usr/include/dovecot $(1)/usr/include/
  72. $(CP) $(PKG_INSTALL_DIR)/usr/lib/dovecot $(1)/usr/lib/
  73. rm -f $(1)/usr/lib/dovecot/*.la
  74. endef
  75. define Package/dovecot/install
  76. $(INSTALL_DIR) $(1)/etc/init.d \
  77. $(1)/etc/dovecot \
  78. $(1)/usr/share/doc/dovecot/example-config \
  79. $(1)/usr/lib/dovecot \
  80. $(1)/usr/bin \
  81. $(1)/usr/sbin
  82. $(CP) $(PKG_INSTALL_DIR)/etc/dovecot/* $(1)/etc/dovecot/
  83. $(CP) $(PKG_INSTALL_DIR)/usr/lib/dovecot/* $(1)/usr/lib/dovecot/
  84. $(CP) $(PKG_INSTALL_DIR)/usr/share/doc/dovecot/example-config $(1)/usr/share/doc/dovecot/example-config
  85. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/doveconf $(1)/usr/bin/
  86. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/* $(1)/usr/sbin/
  87. $(INSTALL_BIN) ./files/dovecot.init $(1)/etc/init.d/dovecot
  88. rm $(1)/usr/lib/dovecot/dovecot-config
  89. find $(1)/usr/lib/dovecot/ -name "*.a" -o -name "*.la" | xargs rm
  90. endef
  91. $(eval $(call BuildPackage,dovecot))